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