[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r24221 - in /fsf/trunk/libc: ./ benchtests/ malloc/ scripts/ soft-fp/ sysdeps/ieee754/ldbl-128ibm/ sysdeps/powerpc/nofpu/ sy...
- To: commits@xxxxxxxxxx
- Subject: [Commits] r24221 - in /fsf/trunk/libc: ./ benchtests/ malloc/ scripts/ soft-fp/ sysdeps/ieee754/ldbl-128ibm/ sysdeps/powerpc/nofpu/ sy...
- From: eglibc@xxxxxxxxxx
- Date: Fri, 11 Oct 2013 00:01:47 -0000
Author: eglibc
Date: Fri Oct 11 00:01:46 2013
New Revision: 24221
Log:
Import glibc-mainline for 2013-10-11
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/NEWS
fsf/trunk/libc/benchtests/README
fsf/trunk/libc/malloc/hooks.c
fsf/trunk/libc/scripts/bench.pl
fsf/trunk/libc/soft-fp/extenddftf2.c
fsf/trunk/libc/soft-fp/extendsfdf2.c
fsf/trunk/libc/soft-fp/extendsftf2.c
fsf/trunk/libc/soft-fp/negdf2.c
fsf/trunk/libc/soft-fp/negsf2.c
fsf/trunk/libc/soft-fp/negtf2.c
fsf/trunk/libc/soft-fp/op-common.h
fsf/trunk/libc/soft-fp/soft-fp.h
fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/e_acosl.c
fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/e_asinl.c
fsf/trunk/libc/sysdeps/powerpc/nofpu/Makefile
fsf/trunk/libc/sysdeps/sparc/fpu/libm-test-ulps
fsf/trunk/libc/sysdeps/sparc/sparc32/soft-fp/q_neg.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Oct 11 00:01:46 2013
@@ -1,3 +1,49 @@
+2013-10-10 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/sparc/fpu/libm-test-ulps: Update.
+
+2013-10-10 Joseph Myers <joseph@xxxxxxxxxxxxxxx>
+
+ * sysdeps/powerpc/nofpu/Makefile [$(subdir) = math]
+ (CFLAGS-e_hypotl.c): Add -fno-builtin-fabsl.
+ [$(subdir) = math] (CFLAGS-w_acosl.c): Likewise.
+ [$(subdir) = math] (CFLAGS-w_asinl.c): Likewise.
+ [$(subdir) = math] (CFLAGS-w_atanhl.c): Likewise.
+ [$(subdir) = math] (CFLAGS-w_j0l.c): Likewise.
+ [$(subdir) = math] (CFLAGS-w_j1l.c): Likewise.
+
+ * sysdeps/ieee754/ldbl-128ibm/e_acosl.c (__ieee754_acosl): Check
+ for NaNs before doing comparisons on argument.
+ * sysdeps/ieee754/ldbl-128ibm/e_asinl.c (__ieee754_asinl):
+ Likewise.
+
+2013-10-10 Will Newton <will.newton@xxxxxxxxxx>
+
+ * malloc/hooks.c (memalign_check): Ensure the value of bytes
+ passed to _int_memalign does not overflow.
+
+2013-10-10 Torvald Riegel <triegel@xxxxxxxxxx>
+
+ * scripts/bench.pl: Add include-sources directive.
+ * benchtests/README: Update documentation.
+
+2013-10-10 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * soft-fp/soft-fp.h (FP_INIT_EXCEPTIONS): New macro.
+ * soft-fp/extenddftf2.c (__extenddftf2): Use FP_INIT_EXCEPTIONS
+ instead of FP_INIT_ROUNDMODE.
+ * soft-fp/extendsfdf2.c (__extendsfdf2): Likewise.
+ * soft-fp/extendsftf2.c (__extendsftf2): Likewise.
+
+ [BZ #16034]
+ * soft-fp/op-common.h (_FP_NEG): Document input as raw. Do not
+ copy class of input value.
+ * soft-fp/negdf2.c (__negdf2): Use raw unpacking and packing. Do
+ not handle exceptions.
+ * soft-fp/negsf2.c (__negsf2): Likewise.
+ * soft-fp/negtf2.c (__negtf2): Likewise.
+ * sysdeps/sparc/sparc32/soft-fp/q_neg.c (_Q_neg): Likewise.
+
2013-10-09 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* soft-fp/op-4.h (_FP_FRAC_DISASSEMBLE_4): Remove trailing
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Fri Oct 11 00:01:46 2013
@@ -14,7 +14,7 @@
15734, 15735, 15736, 15748, 15749, 15754, 15760, 15797, 15844, 15849,
15855, 15856, 15857, 15859, 15867, 15886, 15887, 15890, 15892, 15893,
15895, 15897, 15905, 15909, 15919, 15921, 15923, 15939, 15963, 15966,
- 15988.
+ 15988, 16034.
* CVE-2012-4412 The strcoll implementation caches indices and rules for
large collation sequences to optimize multiple passes. This cache
Modified: fsf/trunk/libc/benchtests/README
==============================================================================
--- fsf/trunk/libc/benchtests/README (original)
+++ fsf/trunk/libc/benchtests/README Fri Oct 11 00:01:46 2013
@@ -51,9 +51,12 @@
inputs.
- ret: This should be assigned the type that the function returns. This
directive may be skipped if the function does not return a value.
- - includes: This should be assigned a comma separated list of headers that
+ - includes: This should be assigned a comma-separated list of headers that
need to be included to provide declarations for the function and types it
- may need.
+ may need (specifically, this includes using "#include <header>").
+ - include-sources: This should be assigned a comma-separated list of source
+ files that need to be included to provide definitions of global variables
+ and functions (specifically, this includes using "#include "source").
- name: See following section for instructions on how to use this directive.
Lines beginning with a single hash '#' are treated as comments. See
Modified: fsf/trunk/libc/malloc/hooks.c
==============================================================================
--- fsf/trunk/libc/malloc/hooks.c (original)
+++ fsf/trunk/libc/malloc/hooks.c Fri Oct 11 00:01:46 2013
@@ -361,10 +361,13 @@
if (alignment <= MALLOC_ALIGNMENT) return malloc_check(bytes, NULL);
if (alignment < MINSIZE) alignment = MINSIZE;
- if (bytes+1 == 0) {
- __set_errno (ENOMEM);
- return NULL;
- }
+ /* Check for overflow. */
+ if (bytes > SIZE_MAX - alignment - MINSIZE)
+ {
+ __set_errno (ENOMEM);
+ return 0;
+ }
+
(void)mutex_lock(&main_arena.mutex);
mem = (top_check() >= 0) ? _int_memalign(&main_arena, alignment, bytes+1) :
NULL;
Modified: fsf/trunk/libc/scripts/bench.pl
==============================================================================
--- fsf/trunk/libc/scripts/bench.pl (original)
+++ fsf/trunk/libc/scripts/bench.pl Fri Oct 11 00:01:46 2013
@@ -34,7 +34,8 @@
my $variant = "";
my @curvals;
my %vals;
-my @include_files;
+my @include_headers;
+my @include_sources;
my $incl;
open INPUTS, "<$func-inputs" or die $!;
@@ -43,7 +44,7 @@
chomp;
# Directives.
- if (/^## (\w+): (.*)/) {
+ if (/^## ([\w-]+): (.*)/) {
# Function argument types.
if ($1 eq "args") {
@args = split(":", $2);
@@ -55,7 +56,11 @@
}
elsif ($1 eq "includes") {
- @include_files = split (",", $2);
+ @include_headers = split (",", $2);
+ }
+
+ elsif ($1 eq "include-sources") {
+ @include_sources = split (",", $2);
}
# New variant. This is the only directive allowed in the body of the
@@ -72,6 +77,10 @@
undef @curvals;
next LINE;
}
+
+ else {
+ die "Unknown directive: ".$1;
+ }
}
# Skip over comments.
@@ -86,8 +95,13 @@
# Print the definitions and macros.
-foreach $incl (@include_files) {
+foreach $incl (@include_headers) {
print "#include <" . $incl . ">\n";
+}
+
+# Print the source files.
+foreach $incl (@include_sources) {
+ print "#include \"" . $incl . "\"\n";
}
if (@args > 0) {
Modified: fsf/trunk/libc/soft-fp/extenddftf2.c
==============================================================================
--- fsf/trunk/libc/soft-fp/extenddftf2.c (original)
+++ fsf/trunk/libc/soft-fp/extenddftf2.c Fri Oct 11 00:01:46 2013
@@ -39,7 +39,7 @@
FP_DECL_Q(R);
TFtype r;
- FP_INIT_ROUNDMODE;
+ FP_INIT_EXCEPTIONS;
FP_UNPACK_RAW_D(A, a);
#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
FP_EXTEND(Q,D,4,2,R,A);
Modified: fsf/trunk/libc/soft-fp/extendsfdf2.c
==============================================================================
--- fsf/trunk/libc/soft-fp/extendsfdf2.c (original)
+++ fsf/trunk/libc/soft-fp/extendsfdf2.c Fri Oct 11 00:01:46 2013
@@ -39,7 +39,7 @@
FP_DECL_D(R);
DFtype r;
- FP_INIT_ROUNDMODE;
+ FP_INIT_EXCEPTIONS;
FP_UNPACK_RAW_S(A, a);
#if _FP_W_TYPE_SIZE < _FP_FRACBITS_D
FP_EXTEND(D,S,2,1,R,A);
Modified: fsf/trunk/libc/soft-fp/extendsftf2.c
==============================================================================
--- fsf/trunk/libc/soft-fp/extendsftf2.c (original)
+++ fsf/trunk/libc/soft-fp/extendsftf2.c Fri Oct 11 00:01:46 2013
@@ -39,7 +39,7 @@
FP_DECL_Q(R);
TFtype r;
- FP_INIT_ROUNDMODE;
+ FP_INIT_EXCEPTIONS;
FP_UNPACK_RAW_S(A, a);
#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
FP_EXTEND(Q,S,4,1,R,A);
Modified: fsf/trunk/libc/soft-fp/negdf2.c
==============================================================================
--- fsf/trunk/libc/soft-fp/negdf2.c (original)
+++ fsf/trunk/libc/soft-fp/negdf2.c Fri Oct 11 00:01:46 2013
@@ -33,15 +33,12 @@
DFtype __negdf2(DFtype a)
{
- FP_DECL_EX;
FP_DECL_D(A); FP_DECL_D(R);
DFtype r;
- FP_UNPACK_D(A, a);
+ FP_UNPACK_RAW_D(A, a);
FP_NEG_D(R, A);
- FP_PACK_D(r, R);
- FP_CLEAR_EXCEPTIONS;
- FP_HANDLE_EXCEPTIONS;
+ FP_PACK_RAW_D(r, R);
return r;
}
Modified: fsf/trunk/libc/soft-fp/negsf2.c
==============================================================================
--- fsf/trunk/libc/soft-fp/negsf2.c (original)
+++ fsf/trunk/libc/soft-fp/negsf2.c Fri Oct 11 00:01:46 2013
@@ -33,15 +33,12 @@
SFtype __negsf2(SFtype a)
{
- FP_DECL_EX;
FP_DECL_S(A); FP_DECL_S(R);
SFtype r;
- FP_UNPACK_S(A, a);
+ FP_UNPACK_RAW_S(A, a);
FP_NEG_S(R, A);
- FP_PACK_S(r, R);
- FP_CLEAR_EXCEPTIONS;
- FP_HANDLE_EXCEPTIONS;
+ FP_PACK_RAW_S(r, R);
return r;
}
Modified: fsf/trunk/libc/soft-fp/negtf2.c
==============================================================================
--- fsf/trunk/libc/soft-fp/negtf2.c (original)
+++ fsf/trunk/libc/soft-fp/negtf2.c Fri Oct 11 00:01:46 2013
@@ -33,15 +33,12 @@
TFtype __negtf2(TFtype a)
{
- FP_DECL_EX;
FP_DECL_Q(A); FP_DECL_Q(R);
TFtype r;
- FP_UNPACK_Q(A, a);
+ FP_UNPACK_RAW_Q(A, a);
FP_NEG_Q(R, A);
- FP_PACK_Q(r, R);
- FP_CLEAR_EXCEPTIONS;
- FP_HANDLE_EXCEPTIONS;
+ FP_PACK_RAW_Q(r, R);
return r;
}
Modified: fsf/trunk/libc/soft-fp/op-common.h
==============================================================================
--- fsf/trunk/libc/soft-fp/op-common.h (original)
+++ fsf/trunk/libc/soft-fp/op-common.h Fri Oct 11 00:01:46 2013
@@ -771,14 +771,12 @@
/*
- * Main negation routine. FIXME -- when we care about setting exception
- * bits reliably, this will not do. We should examine all of the fp classes.
+ * Main negation routine. The input value is raw.
*/
#define _FP_NEG(fs, wc, R, X) \
do { \
_FP_FRAC_COPY_##wc(R, X); \
- R##_c = X##_c; \
R##_e = X##_e; \
R##_s = 1 ^ X##_s; \
} while (0)
Modified: fsf/trunk/libc/soft-fp/soft-fp.h
==============================================================================
--- fsf/trunk/libc/soft-fp/soft-fp.h (original)
+++ fsf/trunk/libc/soft-fp/soft-fp.h Fri Oct 11 00:01:46 2013
@@ -101,8 +101,16 @@
#define FP_DECL_EX int _fex = 0
#endif
+/* Initialize any machine-specific state used in FP_ROUNDMODE,
+ FP_TRAPPING_EXCEPTIONS or FP_HANDLE_EXCEPTIONS. */
#ifndef FP_INIT_ROUNDMODE
#define FP_INIT_ROUNDMODE do {} while (0)
+#endif
+
+/* Initialize any machine-specific state used in
+ FP_HANDLE_EXCEPTIONS. */
+#ifndef FP_INIT_EXCEPTIONS
+#define FP_INIT_EXCEPTIONS FP_INIT_ROUNDMODE
#endif
#ifndef FP_HANDLE_EXCEPTIONS
Modified: fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/e_acosl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/e_acosl.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/e_acosl.c Fri Oct 11 00:01:46 2013
@@ -153,6 +153,8 @@
{
long double a, z, r, w, p, q, s, t, f2;
+ if (__glibc_unlikely (__isnanl (x)))
+ return x + x;
a = __builtin_fabsl (x);
if (a == 1.0L)
{
Modified: fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/e_asinl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/e_asinl.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/e_asinl.c Fri Oct 11 00:01:46 2013
@@ -134,6 +134,8 @@
long double a, t, w, p, q, c, r, s;
int flag;
+ if (__glibc_unlikely (__isnanl (x)))
+ return x + x;
flag = 0;
a = __builtin_fabsl (x);
if (a == 1.0L) /* |x|>= 1 */
Modified: fsf/trunk/libc/sysdeps/powerpc/nofpu/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/nofpu/Makefile (original)
+++ fsf/trunk/libc/sysdeps/powerpc/nofpu/Makefile Fri Oct 11 00:01:46 2013
@@ -14,6 +14,7 @@
# gcc-4.1.1 and may be too late for gcc-4.2. So we need these flags
# until the fix in a gcc release and glibc drops support for earlier
# versions of gcc.
+CFLAGS-e_hypotl.c += -fno-builtin-fabsl
CFLAGS-e_powl.c += -fno-builtin-fabsl
CFLAGS-s_ccoshl.c += -fno-builtin-fabsl
CFLAGS-s_csinhl.c += -fno-builtin-fabsl
@@ -21,4 +22,9 @@
CFLAGS-s_clog10l.c += -fno-builtin-fabsl
CFLAGS-s_csinl.c += -fno-builtin-fabsl
CFLAGS-s_csqrtl.c += -fno-builtin-fabsl
+CFLAGS-w_acosl.c += -fno-builtin-fabsl
+CFLAGS-w_asinl.c += -fno-builtin-fabsl
+CFLAGS-w_atanhl.c += -fno-builtin-fabsl
+CFLAGS-w_j0l.c += -fno-builtin-fabsl
+CFLAGS-w_j1l.c += -fno-builtin-fabsl
endif
Modified: fsf/trunk/libc/sysdeps/sparc/fpu/libm-test-ulps
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/fpu/libm-test-ulps (original)
+++ fsf/trunk/libc/sysdeps/sparc/fpu/libm-test-ulps Fri Oct 11 00:01:46 2013
@@ -7505,11 +7505,58 @@
Test "gamma (-0.5)":
ildouble: 1
ldouble: 1
+Test "gamma (-0x1p-10)":
+double: 1
+idouble: 1
+Test "gamma (-0x1p-15)":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "gamma (-0x1p-20)":
+double: 1
+idouble: 1
+Test "gamma (-0x1p-25)":
+ildouble: 1
+ldouble: 1
+Test "gamma (-0x1p-30)":
+ildouble: 1
+ldouble: 1
+Test "gamma (-0x1p-40)":
+ildouble: 1
+ldouble: 1
+Test "gamma (-0x1p-5)":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "gamma (-0x1p-64)":
+ildouble: 1
+ldouble: 1
Test "gamma (0.7)":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "gamma (0x1p-10)":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "gamma (0x1p-30)":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "gamma (0x1p-5)":
+ildouble: 1
+ldouble: 1
+Test "gamma (0x1p-60)":
+ildouble: 1
+ldouble: 1
+Test "gamma (0x1p-70)":
ildouble: 1
ldouble: 1
Test "gamma (1.2)":
@@ -7725,6 +7772,17 @@
float: 2
idouble: 2
ifloat: 2
+Test "jn (2, 0x1p1023)":
+ildouble: 1
+ldouble: 1
+Test "jn (2, 0x1p127)":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "jn (2, 0x1p16383)":
+ildouble: 2
+ldouble: 2
Test "jn (2, 2.4048255576957729)":
double: 2
float: 1
@@ -7802,11 +7860,58 @@
Test "lgamma (-0.5)":
ildouble: 1
ldouble: 1
+Test "lgamma (-0x1p-10)":
+double: 1
+idouble: 1
+Test "lgamma (-0x1p-15)":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "lgamma (-0x1p-20)":
+double: 1
+idouble: 1
+Test "lgamma (-0x1p-25)":
+ildouble: 1
+ldouble: 1
+Test "lgamma (-0x1p-30)":
+ildouble: 1
+ldouble: 1
+Test "lgamma (-0x1p-40)":
+ildouble: 1
+ldouble: 1
+Test "lgamma (-0x1p-5)":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "lgamma (-0x1p-64)":
+ildouble: 1
+ldouble: 1
Test "lgamma (0.7)":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "lgamma (0x1p-10)":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "lgamma (0x1p-30)":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "lgamma (0x1p-5)":
+ildouble: 1
+ldouble: 1
+Test "lgamma (0x1p-60)":
+ildouble: 1
+ldouble: 1
+Test "lgamma (0x1p-70)":
ildouble: 1
ldouble: 1
Test "lgamma (1.2)":
@@ -9239,7 +9344,9 @@
ldouble: 5
Test "yn (10, 1.0)":
double: 1
-idouble: 1
+float: 2
+idouble: 1
+ifloat: 2
ildouble: 1
ldouble: 1
Test "yn (10, 10.0)":
@@ -9251,7 +9358,25 @@
ldouble: 2
Test "yn (10, 2.0)":
double: 2
+float: 1
idouble: 2
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "yn (2, 0x1.ffff62p+99)":
+double: 1
+idouble: 1
+Test "yn (2, 0x1p1023)":
+ildouble: 1
+ldouble: 1
+Test "yn (2, 0x1p127)":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "yn (2, 0x1p16383)":
ildouble: 2
ldouble: 2
Test "yn (3, 0.125)":
Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/soft-fp/q_neg.c
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/soft-fp/q_neg.c (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/soft-fp/q_neg.c Fri Oct 11 00:01:46 2013
@@ -24,7 +24,6 @@
long double _Q_neg(const long double a)
{
- FP_DECL_EX;
long double c = a;
#if (__BYTE_ORDER == __BIG_ENDIAN)
@@ -36,11 +35,9 @@
#else
FP_DECL_Q(A); FP_DECL_Q(C);
- FP_UNPACK_Q(A, a);
+ FP_UNPACK_RAW_Q(A, a);
FP_NEG_Q(C, A);
- FP_PACK_Q(c, C);
+ FP_PACK_RAW_Q(c, C);
#endif
- FP_CLEAR_EXCEPTIONS;
- FP_HANDLE_EXCEPTIONS;
return c;
}
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits