powerpc64: add single-instruction math functions
[musl.git] / src / math / powerpc64 / lrintf.c
blob9070fc03dc41d5801397ca51fd88b0fa0ae4507b
1 #include <math.h>
3 #ifdef _ARCH_PWR5X
5 long lrintf(float x)
7 long n;
8 __asm__ ("fctid %0, %1" : "=d"(n) : "f"(x));
9 return n;
12 #else
14 #include "../lrintf.c"
16 #endif