[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r9107 - in /fsf/trunk/libc: ./ include/ sysdeps/i386/fpu/ sysdeps/ieee754/dbl-64/ sysdeps/ieee754/flt-32/ sysdeps/ieee754/ld...
- To: commits@xxxxxxxxxx
- Subject: [commits] r9107 - in /fsf/trunk/libc: ./ include/ sysdeps/i386/fpu/ sysdeps/ieee754/dbl-64/ sysdeps/ieee754/flt-32/ sysdeps/ieee754/ld...
- From: eglibc@xxxxxxxxxx
- Date: Tue, 20 Oct 2009 07:05:14 -0000
Author: eglibc
Date: Tue Oct 20 00:05:13 2009
New Revision: 9107
Log:
Import glibc-mainline for 2009-10-20
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/include/math.h
fsf/trunk/libc/sysdeps/i386/fpu/s_expm1.S
fsf/trunk/libc/sysdeps/i386/fpu/s_expm1f.S
fsf/trunk/libc/sysdeps/i386/fpu/s_expm1l.S
fsf/trunk/libc/sysdeps/ieee754/dbl-64/w_exp.c
fsf/trunk/libc/sysdeps/ieee754/flt-32/w_expf.c
fsf/trunk/libc/sysdeps/ieee754/ldbl-96/w_expl.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Tue Oct 20 00:05:13 2009
@@ -1,3 +1,14 @@
+2009-10-19 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * include/math.h: Add hidden protos for __exp/__expf/__expl.
+ * sysdeps/ieee754/dbl-64/w_exp.c: Add hidden alias.
+ * sysdeps/ieee754/flt-32/w_expf.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/w_expl.c: Likewise.
+ * sysdeps/i386/fpu/s_expm1.S: Call __exp to handle overflow.
+ * sysdeps/i386/fpu/s_expm1f.S: Call __expf to handle overflow.
+ * sysdeps/i386/fpu/s_expm1l.S: Call __expl instead of
+ __ieee751_expl to handle overflow.
+
2009-10-14 David S. Miller <davem@xxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/sparc/sparc32/____longjmp_chk.S: New file.
Modified: fsf/trunk/libc/include/math.h
==============================================================================
--- fsf/trunk/libc/include/math.h (original)
+++ fsf/trunk/libc/include/math.h Tue Oct 20 00:05:13 2009
@@ -22,9 +22,12 @@
libm_hidden_proto (__fpclassify)
libm_hidden_proto (__fpclassifyf)
+libm_hidden_proto (__exp)
+libm_hidden_proto (__expf)
# ifndef __NO_LONG_DOUBLE_MATH
libm_hidden_proto (__fpclassifyl)
+libm_hidden_proto (__expl)
libm_hidden_proto (__expm1l)
# endif
Modified: fsf/trunk/libc/sysdeps/i386/fpu/s_expm1.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/s_expm1.S (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/s_expm1.S Tue Oct 20 00:05:13 2009
@@ -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 @@
.text
ENTRY(__expm1)
+ movzwl 4+6(%esp), %eax
+ xorb $0x80, %ah // invert sign bit (now 1 is "positive")
+ cmpl $0xc086, %eax // is num >= 704?
+ jae HIDDEN_JUMPTARGET (__exp)
+
fldl 4(%esp) // x
fxam // Is NaN or +-Inf?
fstsw %ax
Modified: fsf/trunk/libc/sysdeps/i386/fpu/s_expm1f.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/s_expm1f.S (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/s_expm1f.S Tue Oct 20 00:05:13 2009
@@ -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 @@
.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
Modified: fsf/trunk/libc/sysdeps/i386/fpu/s_expm1l.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/s_expm1l.S (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/s_expm1l.S Tue Oct 20 00:05:13 2009
@@ -22,6 +22,7 @@
/* Using: e^x - 1 = 2^(x * log2(e)) - 1 */
+#include <sysdep.h>
#include <machine/asm.h>
#ifdef __ELF__
@@ -51,7 +52,7 @@
movzwl 4+8(%esp), %eax // load sign bit and 15-bit exponent
xorb $0x80, %ah // invert sign bit (now 1 is "positive")
cmpl $0xc006, %eax // is num positive and exp >= 6 (number is >= 128.0)?
- jae __ieee754_expl // (if num is denormal, it is at least >= 64.0)
+ jae HIDDEN_JUMPTARGET (__expl) // (if num is denormal, it is at least >= 64.0)
fldt 4(%esp) // x
fxam // Is NaN or +-Inf?
Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/w_exp.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/w_exp.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/w_exp.c Tue Oct 20 00:05:13 2009
@@ -51,6 +51,7 @@
return z;
#endif
}
+hidden_def (__exp)
weak_alias (__exp, exp)
#ifdef NO_LONG_DOUBLE
strong_alias (__exp, __expl)
Modified: fsf/trunk/libc/sysdeps/ieee754/flt-32/w_expf.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/flt-32/w_expf.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/flt-32/w_expf.c Tue Oct 20 00:05:13 2009
@@ -56,4 +56,5 @@
return z;
#endif
}
+hidden_def (__expf)
weak_alias (__expf, expf)
Modified: fsf/trunk/libc/sysdeps/ieee754/ldbl-96/w_expl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-96/w_expl.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-96/w_expl.c Tue Oct 20 00:05:13 2009
@@ -57,4 +57,5 @@
return z;
#endif
}
+hidden_def (__expl)
weak_alias (__expl, expl)