summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-03-20 03:21:13 +0000
committerUlrich Drepper <drepper@redhat.com>1997-03-20 03:21:13 +0000
commitd69e5f014e9e05e03d5ee41fb79ad98dea21f195 (patch)
tree47a08872cbcfa24054b1d4b44c1f19908a35be9d
parent630ee40e9240f415e01b7b338938fc9d84d81253 (diff)
Handle x == +-0 as a special case since expm1(-0) == -0.
-rw-r--r--sysdeps/libm-i387/s_expm1.S8
-rw-r--r--sysdeps/libm-i387/s_expm1f.S8
-rw-r--r--sysdeps/libm-i387/s_expm1l.S8
3 files changed, 15 insertions, 9 deletions
diff --git a/sysdeps/libm-i387/s_expm1.S b/sysdeps/libm-i387/s_expm1.S
index e1b198d604..92beaf0776 100644
--- a/sysdeps/libm-i387/s_expm1.S
+++ b/sysdeps/libm-i387/s_expm1.S
@@ -51,15 +51,17 @@ ENTRY(__expm1)
fldl 4(%esp) // x
fxam // Is NaN or +-Inf?
fstsw %ax
+ movb $0x45, %ch
+ andb %ah, %ch
+ cmpb $0x40, %ch
+ je 3f // If +-0, jump.
#ifdef PIC
call 1f
1: popl %edx
addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %edx
#endif
- movb $0x45, %ch
- andb %ah, %ch
cmpb $0x05, %ch
- je 2f // Is +-Inf, jump.
+ je 2f // If +-Inf, jump.
fldt MO(l2e) // log2(e) : x
fmulp // log2(e)*x
diff --git a/sysdeps/libm-i387/s_expm1f.S b/sysdeps/libm-i387/s_expm1f.S
index 8626fee45d..45a60fe010 100644
--- a/sysdeps/libm-i387/s_expm1f.S
+++ b/sysdeps/libm-i387/s_expm1f.S
@@ -51,15 +51,17 @@ ENTRY(__expm1f)
flds 4(%esp) // x
fxam // Is NaN or +-Inf?
fstsw %ax
+ movb $0x45, %ch
+ andb %ah, %ch
+ cmpb $0x40, %ch
+ je 3f // If +-0, jump.
#ifdef PIC
call 1f
1: popl %edx
addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %edx
#endif
- movb $0x45, %ch
- andb %ah, %ch
cmpb $0x05, %ch
- je 2f // Is +-Inf, jump.
+ je 2f // If +-Inf, jump.
fldt MO(l2e) // log2(e) : x
fmulp // log2(e)*x
diff --git a/sysdeps/libm-i387/s_expm1l.S b/sysdeps/libm-i387/s_expm1l.S
index 46290ca4a9..13fa698cc7 100644
--- a/sysdeps/libm-i387/s_expm1l.S
+++ b/sysdeps/libm-i387/s_expm1l.S
@@ -51,15 +51,17 @@ ENTRY(__expm1l)
fldt 4(%esp) // x
fxam // Is NaN or +-Inf?
fstsw %ax
+ movb $0x45, %ch
+ andb %ah, %ch
+ cmpb $0x40, %ch
+ je 3f // If +-0, jump.
#ifdef PIC
call 1f
1: popl %edx
addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %edx
#endif
- movb $0x45, %ch
- andb %ah, %ch
cmpb $0x05, %ch
- je 2f // Is +-Inf, jump.
+ je 2f // If +-Inf, jump.
fldt MO(l2e) // log2(e) : x
fmulp // log2(e)*x