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