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