new math asm (abs/rounding) for x86_64
[musl] / src / math / x86_64 / fabs.s
diff --git a/src/math/x86_64/fabs.s b/src/math/x86_64/fabs.s
new file mode 100644 (file)
index 0000000..5715005
--- /dev/null
@@ -0,0 +1,9 @@
+.global fabs
+.type fabs,@function
+fabs:
+       xor %eax,%eax
+       dec %rax
+       shr %rax
+       movq %rax,%xmm1
+       andpd %xmm1,%xmm0
+       ret