diff options
Diffstat (limited to 'src/math/i386/llrint.c')
-rw-r--r-- | src/math/i386/llrint.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/math/i386/llrint.c b/src/math/i386/llrint.c new file mode 100644 index 00000000..aa400817 --- /dev/null +++ b/src/math/i386/llrint.c @@ -0,0 +1,8 @@ +#include <math.h> + +long long llrint(double x) +{ + long long r; + __asm__ ("fistpll %0" : "=m"(r) : "t"(x) : "st"); + return r; +} |