[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r23343 - in /fsf/trunk/libc: ./ benchtests/ dlfcn/ elf/ include/ soft-fp/ string/ sysdeps/sh/sh4/fpu/
- To: commits@xxxxxxxxxx
- Subject: [Commits] r23343 - in /fsf/trunk/libc: ./ benchtests/ dlfcn/ elf/ include/ soft-fp/ string/ sysdeps/sh/sh4/fpu/
- From: eglibc@xxxxxxxxxx
- Date: Sat, 22 Jun 2013 00:02:10 -0000
Author: eglibc
Date: Sat Jun 22 00:02:08 2013
New Revision: 23343
Log:
Import glibc-mainline for 2013-06-22
Added:
fsf/trunk/libc/sysdeps/sh/sh4/fpu/fgetexcptflg.c
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/NEWS
fsf/trunk/libc/benchtests/bench-memmove.c
fsf/trunk/libc/benchtests/bench-memset.c
fsf/trunk/libc/config.h.in
fsf/trunk/libc/configure
fsf/trunk/libc/configure.in
fsf/trunk/libc/dlfcn/Makefile
fsf/trunk/libc/elf/dl-dst.h
fsf/trunk/libc/include/libc-symbols.h
fsf/trunk/libc/soft-fp/op-common.h
fsf/trunk/libc/string/memmove.c
fsf/trunk/libc/string/memset.c
fsf/trunk/libc/string/test-memmove.c
fsf/trunk/libc/string/test-memset.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sat Jun 22 00:02:08 2013
@@ -1,3 +1,41 @@
+2013-06-21 Maciej W. Rozycki <macro@xxxxxxxxxxxxxxxx>
+
+ * elf/dl-dst.h (DL_DST_REQUIRED): Remove call to
+ DL_DST_REQ_STATIC.
+ (DL_DST_REQ_STATIC): Remove macro.
+
+2013-06-21 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ [BZ #7006]
+ * soft-fp/op-common.h (_FP_FROM_INT): Do not call _FP_FRAC_SLL
+ with a shift of 0 bits.
+
+2013-06-21 Maciej W. Rozycki <macro@xxxxxxxxxxxxxxxx>
+
+ * dlfcn/Makefile (tststatic2-ENV): Redefine in terms of
+ $(tststatic-ENV).
+
+2013-06-21 Kaz Kojima <kkojima@xxxxxxxxxxxxxx>
+
+ [BZ #15655]
+ * sysdeps/sh/sh4/fpu/fgetexcptflg.c: New file.
+
+2013-06-20 Adhemerval Zanella <azanella@xxxxxxxxxxxxxxxxxx>
+
+ * config.h.in (HAVE_CC_INHIBIT_LOOP_TO_LIBCALL): New define.
+ * configure.in (libc_cv_cc_loop_to_function): Check if compiler
+ accepts -fno-tree-loop-distribute-patterns.
+ * include/libc-symbols.h (inhibit_loop_to_libcall): New macro.
+ * string/memmove.c (MEMMOVE): Disable loop transformation to avoid
+ recursive call.
+ * string/memset.c (memset): Likewise.
+ * string/test-memmove.c (simple_memmove): Disable loop transformation
+ to library calls.
+ * string/test-memset.c (simple_memset): Likewise.
+ * benchtests/bench-memmove.c (simple_memmove): Likewise.
+ * benchtests/bench-memset.c (simple_memset): Likewise.
+ * configure: Regenerated.
+
2013-06-20 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* math/test-misc.c (main): Ignore fesetround failure when failures
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Sat Jun 22 00:02:08 2013
@@ -9,18 +9,19 @@
* The following bugs are resolved with this release:
- 2546, 2560, 5159, 6809, 10060, 10062, 10357, 10686, 11120, 11561, 12387,
- 12515, 12723, 13550, 13889, 13951, 13988, 14142, 14176, 14200, 14256,
- 14280, 14293, 14317, 14327, 14478, 14496, 14582, 14686, 14812, 14888,
- 14894, 14907, 14908, 14909, 14920, 14952, 14964, 14981, 14982, 14985,
- 14991, 14994, 14996, 15000, 15003, 15006, 15007, 15014, 15020, 15023,
- 15036, 15054, 15055, 15062, 15078, 15084, 15085, 15086, 15100, 15160,
- 15214, 15221, 15232, 15234, 15283, 15285, 15287, 15304, 15305, 15307,
- 15309, 15327, 15330, 15335, 15336, 15337, 15339, 15342, 15346, 15359,
- 15361, 15366, 15380, 15381, 15394, 15395, 15405, 15406, 15409, 15416,
- 15418, 15419, 15423, 15424, 15426, 15429, 15431, 15432, 15441, 15442,
- 15448, 15465, 15480, 15485, 15488, 15490, 15492, 15493, 15497, 15506,
- 15529, 15536, 15553, 15577, 15583, 15618, 15627, 15631, 15654.
+ 2546, 2560, 5159, 6809, 7006, 10060, 10062, 10357, 10686, 11120, 11561,
+ 12387, 12515, 12723, 13550, 13889, 13951, 13988, 14142, 14176, 14200,
+ 14256, 14280, 14293, 14317, 14327, 14478, 14496, 14582, 14686, 14812,
+ 14888, 14894, 14907, 14908, 14909, 14920, 14952, 14964, 14981, 14982,
+ 14985, 14991, 14994, 14996, 15000, 15003, 15006, 15007, 15014, 15020,
+ 15023, 15036, 15054, 15055, 15062, 15078, 15084, 15085, 15086, 15100,
+ 15160, 15214, 15221, 15232, 15234, 15283, 15285, 15287, 15304, 15305,
+ 15307, 15309, 15327, 15330, 15335, 15336, 15337, 15339, 15342, 15346,
+ 15359, 15361, 15366, 15380, 15381, 15394, 15395, 15405, 15406, 15409,
+ 15416, 15418, 15419, 15423, 15424, 15426, 15429, 15431, 15432, 15441,
+ 15442, 15448, 15465, 15480, 15485, 15488, 15490, 15492, 15493, 15497,
+ 15506, 15529, 15536, 15553, 15577, 15583, 15618, 15627, 15631, 15654,
+ 15655.
* CVE-2013-0242 Buffer overrun in regexp matcher has been fixed (Bugzilla
#15078).
Modified: fsf/trunk/libc/benchtests/bench-memmove.c
==============================================================================
--- fsf/trunk/libc/benchtests/bench-memmove.c (original)
+++ fsf/trunk/libc/benchtests/bench-memmove.c Sat Jun 22 00:02:08 2013
@@ -46,6 +46,7 @@
#endif
char *
+inhibit_loop_to_libcall
simple_memmove (char *dst, const char *src, size_t n)
{
char *ret = dst;
Modified: fsf/trunk/libc/benchtests/bench-memset.c
==============================================================================
--- fsf/trunk/libc/benchtests/bench-memset.c (original)
+++ fsf/trunk/libc/benchtests/bench-memset.c Sat Jun 22 00:02:08 2013
@@ -63,6 +63,7 @@
#endif
char *
+inhibit_loop_to_libcall
simple_memset (char *s, int c, size_t n)
{
char *r = s, *end = s + n;
Modified: fsf/trunk/libc/config.h.in
==============================================================================
--- fsf/trunk/libc/config.h.in (original)
+++ fsf/trunk/libc/config.h.in Sat Jun 22 00:02:08 2013
@@ -68,6 +68,9 @@
/* Define if the compiler supports __builtin_memset. */
#undef HAVE_BUILTIN_MEMSET
+
+/* Define if compiler accepts -ftree-loop-distribute-patterns. */
+#undef HAVE_CC_INHIBIT_LOOP_TO_LIBCALL
/* Define if the regparm attribute shall be used for local functions
(gcc on ix86 only). */
Modified: fsf/trunk/libc/configure
==============================================================================
--- fsf/trunk/libc/configure (original)
+++ fsf/trunk/libc/configure Sat Jun 22 00:02:08 2013
@@ -598,6 +598,7 @@
have_libcap
have_libaudit
LIBGD
+libc_cv_cc_loop_to_function
libc_cv_cc_submachine
libc_cv_cc_nofma
exceptions
@@ -6933,6 +6934,38 @@
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \
+__attribute__ ((__optimize__))" >&5
+$as_echo_n "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
+__attribute__ ((__optimize__))... " >&6; }
+if ${libc_cv_cc_loop_to_function+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.c <<EOF
+void
+__attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
+foo (void) {}
+EOF
+libc_cv_cc_loop_to_function=no
+if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+then
+ libc_cv_cc_loop_to_function=yes
+fi
+rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_loop_to_function" >&5
+$as_echo "$libc_cv_cc_loop_to_function" >&6; }
+if test $libc_cv_cc_loop_to_function = yes; then
+ $as_echo "#define HAVE_CC_INHIBIT_LOOP_TO_LIBCALL 1" >>confdefs.h
+
+fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgd" >&5
$as_echo_n "checking for libgd... " >&6; }
if test "$with_gd" != "no"; then
Modified: fsf/trunk/libc/configure.in
==============================================================================
--- fsf/trunk/libc/configure.in (original)
+++ fsf/trunk/libc/configure.in Sat Jun 22 00:02:08 2013
@@ -1964,6 +1964,24 @@
fi
AC_SUBST(libc_cv_cc_submachine)
+AC_CACHE_CHECK(if $CC accepts -fno-tree-loop-distribute-patterns with \
+__attribute__ ((__optimize__)), libc_cv_cc_loop_to_function, [dnl
+cat > conftest.c <<EOF
+void
+__attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
+foo (void) {}
+EOF
+libc_cv_cc_loop_to_function=no
+if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c])
+then
+ libc_cv_cc_loop_to_function=yes
+fi
+rm -f conftest*])
+if test $libc_cv_cc_loop_to_function = yes; then
+ AC_DEFINE(HAVE_CC_INHIBIT_LOOP_TO_LIBCALL)
+fi
+AC_SUBST(libc_cv_cc_loop_to_function)
+
dnl Check whether we have the gd library available.
AC_MSG_CHECKING(for libgd)
if test "$with_gd" != "no"; then
Modified: fsf/trunk/libc/dlfcn/Makefile
==============================================================================
--- fsf/trunk/libc/dlfcn/Makefile (original)
+++ fsf/trunk/libc/dlfcn/Makefile Sat Jun 22 00:02:08 2013
@@ -51,7 +51,7 @@
tests-static += tststatic tststatic2
modules-names += modstatic modstatic2
tststatic-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf
-tststatic2-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf
+tststatic2-ENV = $(tststatic-ENV)
endif
extra-test-objs += $(modules-names:=.os)
Modified: fsf/trunk/libc/elf/dl-dst.h
==============================================================================
--- fsf/trunk/libc/elf/dl-dst.h (original)
+++ fsf/trunk/libc/elf/dl-dst.h Sat Jun 22 00:02:08 2013
@@ -55,7 +55,6 @@
First get the origin string if it is not available yet. \
This can only happen for the map of the executable or, when \
auditing, in ld.so. */ \
- DL_DST_REQ_STATIC (l) \
if ((l)->l_origin == NULL) \
{ \
assert ((l)->l_name[0] == '\0' || IS_RTLD (l)); \
@@ -73,15 +72,3 @@
} \
\
__len; })
-
-#ifdef SHARED
-# define DL_DST_REQ_STATIC(l) /* nothing */
-#else
-# define DL_DST_REQ_STATIC(l) \
- if ((l) == NULL) \
- { \
- const char *origin = _dl_get_origin (); \
- dst_len = (origin && origin != (char *) -1 ? strlen (origin) : 0); \
- } \
- else
-#endif
Modified: fsf/trunk/libc/include/libc-symbols.h
==============================================================================
--- fsf/trunk/libc/include/libc-symbols.h (original)
+++ fsf/trunk/libc/include/libc-symbols.h Sat Jun 22 00:02:08 2013
@@ -782,4 +782,14 @@
#define libc_ifunc_hidden_def(name) \
libc_ifunc_hidden_def1 (__GI_##name, name)
+/* Add the compiler optimization to inhibit loop transformation to library
+ calls. This is used to avoid recursive calls in memset and memmove
+ default implementations. */
+#ifdef HAVE_CC_INHIBIT_LOOP_TO_LIBCALL
+# define inhibit_loop_to_libcall \
+ __attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
+#else
+# define inhibit_loop_to_libcall
+#endif
+
#endif /* libc-symbols.h */
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 Sat Jun 22 00:02:08 2013
@@ -1163,8 +1163,9 @@
{ \
/* Exactly representable; shift left. */ \
_FP_FRAC_DISASSEMBLE_##wc(X, ur_, rsize); \
- _FP_FRAC_SLL_##wc(X, (_FP_EXPBIAS_##fs \
- + _FP_FRACBITS_##fs - 1 - X##_e)); \
+ if (_FP_EXPBIAS_##fs + _FP_FRACBITS_##fs - 1 - X##_e > 0) \
+ _FP_FRAC_SLL_##wc(X, (_FP_EXPBIAS_##fs \
+ + _FP_FRACBITS_##fs - 1 - X##_e)); \
} \
else \
{ \
Modified: fsf/trunk/libc/string/memmove.c
==============================================================================
--- fsf/trunk/libc/string/memmove.c (original)
+++ fsf/trunk/libc/string/memmove.c Sat Jun 22 00:02:08 2013
@@ -41,6 +41,7 @@
#endif
rettype
+inhibit_loop_to_libcall
MEMMOVE (a1, a2, len)
a1const void *a1;
a2const void *a2;
Modified: fsf/trunk/libc/string/memset.c
==============================================================================
--- fsf/trunk/libc/string/memset.c (original)
+++ fsf/trunk/libc/string/memset.c Sat Jun 22 00:02:08 2013
@@ -21,6 +21,7 @@
#undef memset
void *
+inhibit_loop_to_libcall
memset (dstpp, c, len)
void *dstpp;
int c;
Modified: fsf/trunk/libc/string/test-memmove.c
==============================================================================
--- fsf/trunk/libc/string/test-memmove.c (original)
+++ fsf/trunk/libc/string/test-memmove.c Sat Jun 22 00:02:08 2013
@@ -47,6 +47,7 @@
#endif
char *
+inhibit_loop_to_libcall
simple_memmove (char *dst, const char *src, size_t n)
{
char *ret = dst;
Modified: fsf/trunk/libc/string/test-memset.c
==============================================================================
--- fsf/trunk/libc/string/test-memset.c (original)
+++ fsf/trunk/libc/string/test-memset.c Sat Jun 22 00:02:08 2013
@@ -64,6 +64,7 @@
#endif
char *
+inhibit_loop_to_libcall
simple_memset (char *s, int c, size_t n)
{
char *r = s, *end = s + n;
Added: fsf/trunk/libc/sysdeps/sh/sh4/fpu/fgetexcptflg.c
==============================================================================
--- fsf/trunk/libc/sysdeps/sh/sh4/fpu/fgetexcptflg.c (added)
+++ fsf/trunk/libc/sysdeps/sh/sh4/fpu/fgetexcptflg.c Sat Jun 22 00:02:08 2013
@@ -1,0 +1,38 @@
+/* Store current representation for exceptions.
+ Copyright (C) 2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+int
+fegetexceptflag (fexcept_t *flagp, int excepts)
+{
+ fpu_control_t temp;
+
+ /* Get the current exceptions. */
+ _FPU_GETCW (temp);
+
+ /* We only save the relevant bits here. In particular, care has to be
+ taken with the CAUSE bits, as an inadvertent restore later on could
+ generate unexpected exceptions. */
+
+ *flagp = temp & excepts & FE_ALL_EXCEPT;
+
+ /* Success. */
+ return 0;
+}
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits