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