math: fix expm1l on x86_64 (avoid underflow for large negative x)
[oweals/musl.git] / src / math / x86_64 / acosl.s
index 92c2987079067f1e3a100db0f0c59c83688d5e8b..88e01b49a2bbe72cbb3332e15fa71a9134a4a99c 100644 (file)
@@ -1,20 +1,16 @@
+# see ../i386/acos.s
+
 .global acosl
 .type acosl,@function
 acosl:
        fldt 8(%rsp)
+1:     fld %st(0)
        fld1
-       fld %st(1)
-       fld1
-       fsubp
-       fxch %st(2)
-       faddp
-       fdivp
+       fsub %st(0),%st(1)
+       fadd %st(2)
+       fmulp
        fsqrt
-       fld1
+       fabs
        fxch %st(1)
        fpatan
-       fld1
-       fld1
-       faddp
-       fmulp
        ret