diff options
author | Rich Felker <dalias@aerifal.cx> | 2020-02-06 16:29:49 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2020-02-06 16:46:15 -0500 |
commit | a662220df547e5c2446518e74440a7d834f9ebe6 (patch) | |
tree | b4dc5f425de2720a7329198a8173b963ca4375fa /src/math/i386/exp_ld.s | |
parent | 2f0c31c0273b93196185a9d0dd260ee48e057c6d (diff) | |
download | musl-a662220df547e5c2446518e74440a7d834f9ebe6.tar.gz musl-a662220df547e5c2446518e74440a7d834f9ebe6.tar.bz2 musl-a662220df547e5c2446518e74440a7d834f9ebe6.tar.xz musl-a662220df547e5c2446518e74440a7d834f9ebe6.zip |
remove i386 asm for single and double precision exp-family functions
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.
Diffstat (limited to 'src/math/i386/exp_ld.s')
-rw-r--r-- | src/math/i386/exp_ld.s | 55 |
1 files changed, 1 insertions, 54 deletions
diff --git a/src/math/i386/exp_ld.s b/src/math/i386/exp_ld.s index df87c497..99cba01f 100644 --- a/src/math/i386/exp_ld.s +++ b/src/math/i386/exp_ld.s @@ -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) |