diff options
author | Andreas Schwab <schwab@redhat.com> | 2009-10-19 21:23:15 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-10-19 21:23:15 -0700 |
commit | b7805d0ba8948fcf5e406bf52530d9aba99f5954 (patch) | |
tree | 4cf6a9d4462778f3813492393059d095bd91c17a /sysdeps/i386/fpu/s_expm1f.S | |
parent | a0902db9fe8f4cfc6b0b0344558166f5b230b806 (diff) | |
download | glibc-b7805d0ba8948fcf5e406bf52530d9aba99f5954.tar.gz glibc-b7805d0ba8948fcf5e406bf52530d9aba99f5954.tar.xz glibc-b7805d0ba8948fcf5e406bf52530d9aba99f5954.zip |
Correct errno handling in expm1.
Diffstat (limited to 'sysdeps/i386/fpu/s_expm1f.S')
-rw-r--r-- | sysdeps/i386/fpu/s_expm1f.S | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/i386/fpu/s_expm1f.S b/sysdeps/i386/fpu/s_expm1f.S index 88adb75b86..8645107274 100644 --- a/sysdeps/i386/fpu/s_expm1f.S +++ b/sysdeps/i386/fpu/s_expm1f.S @@ -22,6 +22,7 @@ /* Using: e^x - 1 = 2^(x * log2(e)) - 1 */ +#include <sysdep.h> #include <machine/asm.h> #ifdef __ELF__ @@ -48,6 +49,11 @@ l2e: .tfloat 1.442695040888963407359924681002 .text ENTRY(__expm1f) + movzwl 4+2(%esp), %eax + xorb $0x80, %ah // invert sign bit (now 1 is "positive") + cmpl $0xc2b1, %eax // is num >= 88.5? + jae HIDDEN_JUMPTARGET (__expf) + flds 4(%esp) // x fxam // Is NaN or +-Inf? fstsw %ax |