about summary refs log tree commit diff
path: root/src/math/powerpc/fma.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/powerpc/fma.c')
-rw-r--r--src/math/powerpc/fma.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/math/powerpc/fma.c b/src/math/powerpc/fma.c
new file mode 100644
index 00000000..fd268f5f
--- /dev/null
+++ b/src/math/powerpc/fma.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#ifdef _SOFT_FLOAT
+
+#include "../fma.c"
+
+#else
+
+double fma(double x, double y, double z)
+{
+	__asm__("fmadd %0, %1, %2, %3" : "=d"(x) : "d"(x), "d"(y), "d"(z));
+	return x;
+}
+
+#endif