diff options
Diffstat (limited to 'libc-top-half/musl/src/math/powerpc/fma.c')
-rw-r--r-- | libc-top-half/musl/src/math/powerpc/fma.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/math/powerpc/fma.c b/libc-top-half/musl/src/math/powerpc/fma.c new file mode 100644 index 0000000..0eb2ba1 --- /dev/null +++ b/libc-top-half/musl/src/math/powerpc/fma.c @@ -0,0 +1,15 @@ +#include <math.h> + +#if defined(_SOFT_FLOAT) || defined(__NO_FPRS__) || defined(BROKEN_PPC_D_ASM) + +#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 |