diff options
Diffstat (limited to 'src/math/arm/fabs.c')
-rw-r--r-- | src/math/arm/fabs.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/math/arm/fabs.c b/src/math/arm/fabs.c new file mode 100644 index 00000000..f890520a --- /dev/null +++ b/src/math/arm/fabs.c @@ -0,0 +1,15 @@ +#include <math.h> + +#if __ARM_PCS_VFP + +double fabs(double x) +{ + __asm__ ("vabs.f64 %P0, %P1" : "=w"(x) : "w"(x)); + return x; +} + +#else + +#include "../fabs.c" + +#endif |