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