remove i386 asm for single and double precision exp-family functions
authorRich Felker <dalias@aerifal.cx>
Thu, 6 Feb 2020 21:29:49 +0000 (16:29 -0500)
committerRich Felker <dalias@aerifal.cx>
Thu, 6 Feb 2020 21:46:15 +0000 (16:46 -0500)
these did not truncate excess precision in the return value. fixing
them looks like considerable work, and the current C code seems to
outperform them significantly anyway.

long double functions are left in place because they are not subject
to excess precision issues and probably better than the C code.

src/math/i386/exp.c [deleted file]
src/math/i386/exp2.s [deleted file]
src/math/i386/exp2f.s [deleted file]
src/math/i386/exp2l.s
src/math/i386/exp_ld.s
src/math/i386/expf.s [deleted file]
src/math/i386/expm1.s [deleted file]
src/math/i386/expm1f.s [deleted file]
src/math/i386/expm1l.s

diff --git a/src/math/i386/exp.c b/src/math/i386/exp.c
deleted file mode 100644 (file)
index 1128228..0000000
+++ /dev/null
@@ -1 +0,0 @@
-// see exp_ld.s
diff --git a/src/math/i386/exp2.s b/src/math/i386/exp2.s
deleted file mode 100644 (file)
index f335a3e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-# see exp.s
diff --git a/src/math/i386/exp2f.s b/src/math/i386/exp2f.s
deleted file mode 100644 (file)
index f335a3e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-# see exp.s
index f335a3e5277ed7fe0c0eb8a2d5302dfd13c1e749..8125761d1058a5c125856c3ebaa6005e9e3e3946 100644 (file)
@@ -1 +1 @@
-# see exp.s
+# see exp_ld.s
index df87c49728b2f0496921b09db8b6caeaf55441d0..99cba01fa172ffb7425142b2c3c773ae328c17fc 100644 (file)
@@ -1,35 +1,8 @@
-.global expm1f
-.type expm1f,@function
-expm1f:
-       flds 4(%esp)
-       mov 4(%esp),%eax
-       add %eax,%eax
-       cmp $0x01000000,%eax
-       jae 1f
-               # subnormal x, return x with underflow
-       fld %st(0)
-       fmul %st(1)
-       fstps 4(%esp)
-       ret
-
 .global expm1l
 .type expm1l,@function
 expm1l:
        fldt 4(%esp)
-       jmp 1f
-
-.global expm1
-.type expm1,@function
-expm1:
-       fldl 4(%esp)
-       mov 8(%esp),%eax
-       add %eax,%eax
-       cmp $0x00200000,%eax
-       jae 1f
-               # subnormal x, return x with underflow
-       fsts 4(%esp)
-       ret
-1:     fldl2e
+       fldl2e
        fmulp
        mov $0xc2820000,%eax
        push %eax
@@ -59,12 +32,6 @@ expm1:
        fsubrp
        ret
 
-.global exp2f
-.type exp2f,@function
-exp2f:
-       flds 4(%esp)
-       jmp 1f
-
 .global exp2l
 .global __exp2l
 .hidden __exp2l
@@ -72,26 +39,6 @@ exp2f:
 exp2l:
 __exp2l:
        fldt 4(%esp)
-       jmp 1f
-
-.global expf
-.type expf,@function
-expf:
-       flds 4(%esp)
-       jmp 2f
-
-.global exp
-.type exp,@function
-exp:
-       fldl 4(%esp)
-2:     fldl2e
-       fmulp
-       jmp 1f
-
-.global exp2
-.type exp2,@function
-exp2:
-       fldl 4(%esp)
 1:     sub $12,%esp
        fld %st(0)
        fstpt (%esp)
diff --git a/src/math/i386/expf.s b/src/math/i386/expf.s
deleted file mode 100644 (file)
index f335a3e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-# see exp.s
diff --git a/src/math/i386/expm1.s b/src/math/i386/expm1.s
deleted file mode 100644 (file)
index f335a3e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-# see exp.s
diff --git a/src/math/i386/expm1f.s b/src/math/i386/expm1f.s
deleted file mode 100644 (file)
index f335a3e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-# see exp.s
index f335a3e5277ed7fe0c0eb8a2d5302dfd13c1e749..8125761d1058a5c125856c3ebaa6005e9e3e3946 100644 (file)
@@ -1 +1 @@
-# see exp.s
+# see exp_ld.s