diff options
Diffstat (limited to 'src/math/mips/fabsf.c')
-rw-r--r-- | src/math/mips/fabsf.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/math/mips/fabsf.c b/src/math/mips/fabsf.c new file mode 100644 index 00000000..35307be6 --- /dev/null +++ b/src/math/mips/fabsf.c @@ -0,0 +1,16 @@ +#if !defined(__mips_soft_float) && defined(__mips_abs2008) + +#include <math.h> + +float fabsf(float x) +{ + float r; + __asm__("abs.s %0,%1" : "=f"(r) : "f"(x)); + return r; +} + +#else + +#include "../fabsf.c" + +#endif |