diff options
Diffstat (limited to 'libc-top-half/musl/src/math/powerpc64/trunc.c')
-rw-r--r-- | libc-top-half/musl/src/math/powerpc64/trunc.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/math/powerpc64/trunc.c b/libc-top-half/musl/src/math/powerpc64/trunc.c new file mode 100644 index 0000000..5791854 --- /dev/null +++ b/libc-top-half/musl/src/math/powerpc64/trunc.c @@ -0,0 +1,15 @@ +#include <math.h> + +#ifdef _ARCH_PWR5X + +double trunc(double x) +{ + __asm__ ("friz %0, %1" : "=d"(x) : "d"(x)); + return x; +} + +#else + +#include "../trunc.c" + +#endif |