summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/math/powerpc64/round.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/math/powerpc64/round.c')
-rw-r--r--libc-top-half/musl/src/math/powerpc64/round.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/math/powerpc64/round.c b/libc-top-half/musl/src/math/powerpc64/round.c
new file mode 100644
index 0000000..4b9318e
--- /dev/null
+++ b/libc-top-half/musl/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