xref: /haiku/src/system/libroot/posix/musl/math/arm64/lrint.c (revision 9f739dd2e868114ce19ae73afcff07caf2ddb8b6)
1 #include <math.h>
2 
3 long lrint(double x)
4 {
5 	long n;
6 	__asm__ (
7 		"frintx %d1, %d1\n"
8 		"fcvtzs %x0, %d1\n" : "=r"(n), "+w"(x));
9 	return n;
10 }
11