summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/math/arm/fabs.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/math/arm/fabs.c')
-rw-r--r--libc-top-half/musl/src/math/arm/fabs.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/math/arm/fabs.c b/libc-top-half/musl/src/math/arm/fabs.c
new file mode 100644
index 0000000..6e1d367
--- /dev/null
+++ b/libc-top-half/musl/src/math/arm/fabs.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if __ARM_PCS_VFP && __ARM_FP&8
+
+double fabs(double x)
+{
+ __asm__ ("vabs.f64 %P0, %P1" : "=w"(x) : "w"(x));
+ return x;
+}
+
+#else
+
+#include "../fabs.c"
+
+#endif