[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r6692 - in /fsf/trunk/libc: ChangeLog scripts/gen-as-const.awk sysdeps/i386/fpu/s_expm1l.S sysdeps/x86_64/fpu/s_expm1l.S
- To: commits@xxxxxxxxxx
- Subject: [commits] r6692 - in /fsf/trunk/libc: ChangeLog scripts/gen-as-const.awk sysdeps/i386/fpu/s_expm1l.S sysdeps/x86_64/fpu/s_expm1l.S
- From: eglibc@xxxxxxxxxx
- Date: Wed, 06 Aug 2008 07:05:17 -0000
Author: eglibc
Date: Wed Aug 6 00:05:15 2008
New Revision: 6692
Log:
Import glibc-mainline for 2008-08-06
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/scripts/gen-as-const.awk
fsf/trunk/libc/sysdeps/i386/fpu/s_expm1l.S
fsf/trunk/libc/sysdeps/x86_64/fpu/s_expm1l.S
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Wed Aug 6 00:05:15 2008
@@ -1,3 +1,13 @@
+2008-08-05 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * scripts/gen-as-const.awk: Use 32-bit values on 32-bit platforms.
+
+ [BZ #5794]
+ * sysdeps/i386/fpu/s_expm1l.S: Simply use exp implementation for large
+ parameters.
+ * sysdeps/x86_64/fpu/s_expm1l.S: Likewise.
+ Patch by Denys Vlasenko <dvlasenk@xxxxxxxxxx>.
+
2008-08-03 Ulrich Drepper <drepper@xxxxxxxxxx>
* nscd/connections.c (main_loop_poll): Pass a buffer which is
@@ -83,7 +93,7 @@
* sysdeps/posix/getaddrinfo.c (gaih_inet): Raise size of initial
buffer passed to NSS functions.
- * nscd/connections.c (nscd_init): Type if preprocessor directive.
+ * nscd/connections.c (nscd_init): Typo in preprocessor directive.
* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_PACCEPT):
Define.
Modified: fsf/trunk/libc/scripts/gen-as-const.awk
==============================================================================
--- fsf/trunk/libc/scripts/gen-as-const.awk (original)
+++ fsf/trunk/libc/scripts/gen-as-const.awk Wed Aug 6 00:05:15 2008
@@ -16,12 +16,20 @@
if (test) {
print "\n#include <inttypes.h>";
print "\n#include <stdio.h>";
+ print "\n#if __WORDSIZE__ == 64";
+ print "\ntypedef uint64_t c_t;";
print "\n#define U(n) UINT64_C (n)";
+ print "\n#define PRI PRId64";
+ print "\n#else";
+ print "\ntypedef uint32_t c_t;";
+ print "\n#define U(n) UINT32_C (n)";
+ print "\n#define PRI PRId32";
+ print "\n#endif";
print "\nstatic int do_test (void)\n{\n int bad = 0, good = 0;\n";
print "#define TEST(name, source, expr) \\\n" \
- " if (U (asconst_##name) != (uint64_t) (expr)) { ++bad;" \
- " fprintf (stderr, \"%s: %s is %\" PRId64 \" but %s is %\"PRId64 \"\\n\"," \
- " source, #name, U (asconst_##name), #expr, (uint64_t) (expr));" \
+ " if (U (asconst_##name) != (c_t) (expr)) { ++bad;" \
+ " fprintf (stderr, \"%s: %s is %\" PRI \" but %s is %\"PRI \"\\n\"," \
+ " source, #name, U (asconst_##name), #expr, (c_t) (expr));" \
" } else ++good;\n";
}
else
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 Wed Aug 6 00:05:15 2008
@@ -1,5 +1,5 @@
/* ix87 specific implementation of exp(x)-1.
- Copyright (C) 1996, 1997, 2002, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2002, 2005, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1996.
Based on code by John C. Bowman <bowman@xxxxxxxxxxxxxxxxxxx>.
@@ -48,6 +48,11 @@
.text
ENTRY(__expm1l)
+ 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)
+
fldt 4(%esp) // x
fxam // Is NaN or +-Inf?
fstsw %ax
Modified: fsf/trunk/libc/sysdeps/x86_64/fpu/s_expm1l.S
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/fpu/s_expm1l.S (original)
+++ fsf/trunk/libc/sysdeps/x86_64/fpu/s_expm1l.S Wed Aug 6 00:05:15 2008
@@ -1,5 +1,5 @@
/* ix87 specific implementation of exp(x)-1.
- Copyright (C) 1996, 1997, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2001, 2002, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1996.
Based on code by John C. Bowman <bowman@xxxxxxxxxxxxxxxxxxx>.
@@ -48,6 +48,11 @@
.text
ENTRY(__expm1l)
+ movzwl 8+8(%rsp), %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)
+
fldt 8(%rsp) // x
fxam // Is NaN or +-Inf?
fstsw %ax