1 #include <math.h> 2 lround(double x)3 long lround(double x) 4 { 5 long n; 6 __asm__ ("fcvtas %x0, %d1" : "=r"(n) : "w"(x)); 7 return n; 8 } 9