diff options
Diffstat (limited to 'libc-top-half/musl/src/math/aarch64/llrintf.c')
-rw-r--r-- | libc-top-half/musl/src/math/aarch64/llrintf.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/math/aarch64/llrintf.c b/libc-top-half/musl/src/math/aarch64/llrintf.c new file mode 100644 index 0000000..12b6804 --- /dev/null +++ b/libc-top-half/musl/src/math/aarch64/llrintf.c @@ -0,0 +1,10 @@ +#include <math.h> + +long long llrintf(float x) +{ + long long n; + __asm__ ( + "frintx %s1, %s1\n" + "fcvtzs %x0, %s1\n" : "=r"(n), "+w"(x)); + return n; +} |