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