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