diff options
Diffstat (limited to 'libc-top-half/musl/src/math/mips/sqrtf.c')
-rw-r--r-- | libc-top-half/musl/src/math/mips/sqrtf.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/math/mips/sqrtf.c b/libc-top-half/musl/src/math/mips/sqrtf.c new file mode 100644 index 0000000..84090d2 --- /dev/null +++ b/libc-top-half/musl/src/math/mips/sqrtf.c @@ -0,0 +1,16 @@ +#if !defined(__mips_soft_float) && __mips >= 2 + +#include <math.h> + +float sqrtf(float x) +{ + float r; + __asm__("sqrt.s %0,%1" : "=f"(r) : "f"(x)); + return r; +} + +#else + +#include "../sqrtf.c" + +#endif |