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