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