summaryrefslogtreecommitdiff
path: root/src/math/s390x/fabsl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/s390x/fabsl.c')
-rw-r--r--src/math/s390x/fabsl.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/math/s390x/fabsl.c b/src/math/s390x/fabsl.c
new file mode 100644
index 00000000..65f1005d
--- /dev/null
+++ b/src/math/s390x/fabsl.c
@@ -0,0 +1,15 @@
+#include <math.h>
+
+#if defined(__HTM__) || __ARCH__ >= 9
+
+long double fabsl(long double x)
+{
+ __asm__ ("lpxbr %0, %1" : "=f"(x) : "f"(x));
+ return x;
+}
+
+#else
+
+#include "../fabsl.c"
+
+#endif