diff options
Diffstat (limited to 'src/math/powerpc/sqrt.c')
-rw-r--r-- | src/math/powerpc/sqrt.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/math/powerpc/sqrt.c b/src/math/powerpc/sqrt.c new file mode 100644 index 00000000..8718dbd0 --- /dev/null +++ b/src/math/powerpc/sqrt.c @@ -0,0 +1,15 @@ +#include <math.h> + +#if !defined _SOFT_FLOAT && defined _ARCH_PPCSQ + +double sqrt(double x) +{ + __asm__ ("fsqrt %0, %1\n" : "=d" (x) : "d" (x)); + return x; +} + +#else + +#include "../sqrt.c" + +#endif |