[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r21129 - in /fsf/trunk/libc: ./ nptl/ nptl/sysdeps/pthread/ ports/ ports/sysdeps/hppa/nptl/ ports/sysdeps/unix/sysv/linux/hp...



Author: eglibc
Date: Fri Oct 12 00:01:47 2012
New Revision: 21129

Log:
Import glibc-mainline for 2012-10-12

Added:
    fsf/trunk/libc/ports/sysdeps/hppa/nptl/shlib-versions
    fsf/trunk/libc/string/test-bcopy.c
    fsf/trunk/libc/string/test-bzero.c
Removed:
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/nptl/ChangeLog
    fsf/trunk/libc/nptl/sysdeps/pthread/pthread.h
    fsf/trunk/libc/ports/ChangeLog.hppa
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h
    fsf/trunk/libc/string/Makefile
    fsf/trunk/libc/string/test-memmove.c
    fsf/trunk/libc/string/test-memset.c
    fsf/trunk/libc/sysdeps/x86_64/multiarch/bcopy.S
    fsf/trunk/libc/sysdeps/x86_64/multiarch/bzero.S
    fsf/trunk/libc/sysdeps/x86_64/multiarch/memset.S

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Oct 12 00:01:47 2012
@@ -1,3 +1,19 @@
+2012-10-11  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
+
+	* string/Makefile (strop-tests): Add bcopy and bzero.
+	* string/test-bcopy.c: New file.
+	* string/test-bzero.c: Likewise.
+	* string/test-memmove.c: Support bcopy test if TEST_BCOPY is
+	defined.
+	* string/test-memset.c: Support bzero test if TEST_BZERO is
+	defined.
+	* sysdeps/x86_64/multiarch/bcopy.S (bcopy): Jump to
+	__libc_memmove.
+	* sysdeps/x86_64/multiarch/bzero.S (__bzero): Jump to
+	__libc_memset.
+	* sysdeps/x86_64/multiarch/memset.S (__libc_memset): New alias
+	of memset.
+
 2012-10-10  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* configure.in: Run $CXX, not cc1plus, to locate C++ headers.

Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Fri Oct 12 00:01:47 2012
@@ -1,3 +1,9 @@
+2012-10-10  Carlos O'Donell  <carlos@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
+	defined __EXCEPTIONS) && defined __USE_GNU]
+	(pthread_cleanup_push_defer_np): Fix formatting.
+
 2012-10-10  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
 
 	[BZ #14652]

Modified: fsf/trunk/libc/nptl/sysdeps/pthread/pthread.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/pthread/pthread.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/pthread/pthread.h Fri Oct 12 00:01:47 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2011, 2012 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2012 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
@@ -694,7 +694,7 @@
     void *__cancel_arg = (arg);						      \
     int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *)     \
 					__cancel_buf.__cancel_jmp_buf, 0);    \
-    if (__glibc_unlikely (__not_first_call))			      \
+    if (__glibc_unlikely (__not_first_call))				      \
       {									      \
 	__cancel_routine (__cancel_arg);				      \
 	__pthread_unwind_next (&__cancel_buf);				      \

Modified: fsf/trunk/libc/ports/ChangeLog.hppa
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.hppa (original)
+++ fsf/trunk/libc/ports/ChangeLog.hppa Fri Oct 12 00:01:47 2012
@@ -1,3 +1,11 @@
+2012-10-10  Carlos O'Donell  <carlos@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/hppa/nptl/pthread.h: Update.
+
+	* sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c: Removed.
+
+	* sysdeps/hppa/nptl/shlib-versions: New file.
+
 2012-10-02  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Fix clone

Added: fsf/trunk/libc/ports/sysdeps/hppa/nptl/shlib-versions
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/hppa/nptl/shlib-versions (added)
+++ fsf/trunk/libc/ports/sysdeps/hppa/nptl/shlib-versions Fri Oct 12 00:01:47 2012
@@ -1,0 +1,1 @@
+hppa.*-.*-linux.*      libpthread=0            GLIBC_2.2

Removed: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c (removed)
@@ -1,108 +1,0 @@
-/* Special .init and .fini section support for HPPA.  NPTL version.
-   Copyright (C) 2005 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.
-
-   In addition to the permissions in the GNU Lesser General Public
-   License, the Free Software Foundation gives you unlimited
-   permission to link the compiled version of this file with other
-   programs, and to distribute those programs without any restriction
-   coming from the use of this file.  (The Lesser General Public
-   License restrictions do apply in other respects; for example, they
-   cover modification of the file, and distribution when not linked
-   into another program.)
-
-   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/>.  */
-
-/* This file is compiled into assembly code which is then munged by a sed
-   script into two files: crti.s and crtn.s.
-
-   * crti.s puts a function prologue at the beginning of the
-   .init and .fini sections and defines global symbols for
-   those addresses, so they can be called as functions.
-
-   * crtn.s puts the corresponding function epilogues
-   in the .init and .fini sections. */
-
-/* If we use the standard C version, the linkage table pointer won't
-   be properly preserved due to the splitting up of function prologues
-   and epilogues.  Therefore we write these in assembly to make sure
-   they do the right thing.  */
-
-__asm__ (
-"#include \"defs.h\"\n"
-"\n"
-"/*@HEADER_ENDS*/\n"
-"\n"
-"/*@_init_PROLOG_BEGINS*/\n"
-"	.section .init\n"
-"	.align 4\n"
-"	.globl _init\n"
-"	.type _init,@function\n"
-"_init:\n"
-"	stw	%rp,-20(%sp)\n"
-"	stwm	%r4,64(%sp)\n"
-"	stw	%r19,-32(%sp)\n"
-"	bl	__pthread_initialize_minimal_internal,%rp\n"
-"	copy	%r19,%r4	/* delay slot */\n"
-"	copy	%r4,%r19\n"
-"/*@_init_PROLOG_ENDS*/\n"
-"\n"
-"/*@_init_EPILOG_BEGINS*/\n"
-"/* Here is the tail end of _init.  */\n"
-"	.section .init\n"
-"	ldw	-84(%sp),%rp\n"
-"	copy	%r4,%r19\n"
-"	bv	%r0(%rp)\n"
-"_end_init:\n"
-"	ldwm	-64(%sp),%r4\n"
-"\n"
-"/* Our very own unwind info, because the assembler can't handle\n"
-"   functions split into two or more pieces.  */\n"
-"	.section .PARISC.unwind,\"a\",@progbits\n"
-"	.extern _init\n"
-"	.word	_init, _end_init\n"
-"	.byte	0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n"
-"\n"
-"/*@_init_EPILOG_ENDS*/\n"
-"\n"
-"/*@_fini_PROLOG_BEGINS*/\n"
-"	.section .fini\n"
-"	.align 4\n"
-"	.globl _fini\n"
-"	.type _fini,@function\n"
-"_fini:\n"
-"	stw	%rp,-20(%sp)\n"
-"	stwm	%r4,64(%sp)\n"
-"	stw	%r19,-32(%sp)\n"
-"	copy	%r19,%r4\n"
-"/*@_fini_PROLOG_ENDS*/\n"
-"\n"
-"/*@_fini_EPILOG_BEGINS*/\n"
-"	.section .fini\n"
-"	ldw	-84(%sp),%rp\n"
-"	copy	%r4,%r19\n"
-"	bv	%r0(%rp)\n"
-"_end_fini:\n"
-"	ldwm	-64(%sp),%r4\n"
-"\n"
-"	.section .PARISC.unwind,\"a\",@progbits\n"
-"	.extern _fini\n"
-"	.word	_fini, _end_fini\n"
-"	.byte	0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n"
-"\n"
-"/*@_fini_EPILOG_ENDS*/\n"
-"\n"
-"/*@TRAILER_BEGINS*/\n"
-);

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h Fri Oct 12 00:01:47 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2011, 2012 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2012 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
@@ -21,7 +21,6 @@
 #include <features.h>
 #include <endian.h>
 #include <sched.h>
-#define __need_timespec
 #include <time.h>
 
 #include <bits/pthreadtypes.h>
@@ -84,7 +83,7 @@
 
 
 /* Mutex initializers.  */
-#if __WORDSIZE == 64
+#ifdef __PTHREAD_MUTEX_HAVE_PREV
 # define PTHREAD_MUTEX_INITIALIZER \
   { { 0, 0, 0, 0, 0, 0, { 0, 0 } } }
 # ifdef __USE_GNU
@@ -119,11 +118,20 @@
   PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
 };
 
+/* Define __PTHREAD_RWLOCK_INT_FLAGS_SHARED to 1 if pthread_rwlock_t
+   has the shared field.  All 64-bit architectures have the shared field
+   in pthread_rwlock_t.  */
+#ifndef __PTHREAD_RWLOCK_INT_FLAGS_SHARED
+# if __WORDSIZE == 64
+#  define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1
+# endif
+#endif
+
 /* Read-write lock initializers.  */
 # define PTHREAD_RWLOCK_INITIALIZER \
   { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
 # ifdef __USE_GNU
-#  if __WORDSIZE == 64
+#  ifdef __PTHREAD_RWLOCK_INT_FLAGS_SHARED
 #   define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
   { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,					      \
 	PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
@@ -651,7 +659,7 @@
     void *__cancel_arg = (arg);						      \
     int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *)     \
 					__cancel_buf.__cancel_jmp_buf, 0);    \
-    if (__builtin_expect (__not_first_call, 0))				      \
+    if (__glibc_unlikely (__not_first_call))				      \
       {									      \
 	__cancel_routine (__cancel_arg);				      \
 	__pthread_unwind_next (&__cancel_buf);				      \
@@ -686,7 +694,7 @@
     void *__cancel_arg = (arg);						      \
     int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *)     \
 					__cancel_buf.__cancel_jmp_buf, 0);    \
-    if (__builtin_expect (__not_first_call, 0))				      \
+    if (__glibc_unlikely (__not_first_call))				      \
       {									      \
 	__cancel_routine (__cancel_arg);				      \
 	__pthread_unwind_next (&__cancel_buf);				      \
@@ -723,7 +731,7 @@
 
 /* Function used in the macros.  */
 struct __jmp_buf_tag;
-extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROW;
+extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROWNL;
 
 
 /* Mutex handling.  */

Modified: fsf/trunk/libc/string/Makefile
==============================================================================
--- fsf/trunk/libc/string/Makefile (original)
+++ fsf/trunk/libc/string/Makefile Fri Oct 12 00:01:47 2012
@@ -49,7 +49,7 @@
 		   stpcpy stpncpy strcat strchr strcmp strcpy strcspn	\
 		   strlen strncmp strncpy strpbrk strrchr strspn memmem	\
 		   strstr strcasestr strnlen strcasecmp strncasecmp	\
-		   strncat rawmemchr strchrnul
+		   strncat rawmemchr strchrnul bcopy bzero
 tests		:= tester inl-tester noinl-tester testcopy test-ffs	\
 		   tst-strlen stratcliff tst-svc tst-inlcall		\
 		   bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap	\

Added: fsf/trunk/libc/string/test-bcopy.c
==============================================================================
--- fsf/trunk/libc/string/test-bcopy.c (added)
+++ fsf/trunk/libc/string/test-bcopy.c Fri Oct 12 00:01:47 2012
@@ -1,0 +1,20 @@
+/* Test and measure bcopy functions.
+   Copyright (C) 2012 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/>.  */
+
+#define TEST_BCOPY
+#include "test-memmove.c"

Added: fsf/trunk/libc/string/test-bzero.c
==============================================================================
--- fsf/trunk/libc/string/test-bzero.c (added)
+++ fsf/trunk/libc/string/test-bzero.c Fri Oct 12 00:01:47 2012
@@ -1,0 +1,19 @@
+/* Test and measure bzero functions.
+   Copyright (C) 2012 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/>.  */
+#define TEST_BZERO
+#include "test-memset.c"

Modified: fsf/trunk/libc/string/test-memmove.c
==============================================================================
--- fsf/trunk/libc/string/test-memmove.c (original)
+++ fsf/trunk/libc/string/test-memmove.c Fri Oct 12 00:01:47 2012
@@ -1,5 +1,5 @@
 /* Test and measure memmove functions.
-   Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1999-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Jakub Jelinek <jakub@xxxxxxxxxx>, 1999.
 
@@ -20,11 +20,26 @@
 #define TEST_MAIN
 #include "test-string.h"
 
+char *simple_memmove (char *, const char *, size_t);
+
+#ifdef TEST_BCOPY
+typedef void (*proto_t) (const char *, char *, size_t);
+void simple_bcopy (const char *, char *, size_t);
+
+IMPL (simple_bcopy, 0)
+IMPL (bcopy, 1)
+
+void
+simple_bcopy (const char *src, char *dst, size_t n)
+{
+  simple_memmove (dst, src, n);
+}
+#else
 typedef char *(*proto_t) (char *, const char *, size_t);
-char *simple_memmove (char *, const char *, size_t);
 
 IMPL (simple_memmove, 0)
 IMPL (memmove, 1)
+#endif
 
 char *
 simple_memmove (char *dst, const char *src, size_t n)
@@ -47,9 +62,12 @@
 do_one_test (impl_t *impl, char *dst, char *src, const char *orig_src,
 	     size_t len)
 {
+  memcpy (src, orig_src, len);
+#ifdef TEST_BCOPY
+  CALL (impl, src, dst, len);
+#else
   char *res;
 
-  memcpy (src, orig_src, len);
   res = CALL (impl, dst, src, len);
   if (res != dst)
     {
@@ -58,6 +76,7 @@
       ret = 1;
       return;
     }
+#endif
 
   if (memcmp (dst, orig_src, len) != 0)
     {
@@ -77,7 +96,11 @@
       for (i = 0; i < 32; ++i)
 	{
 	  HP_TIMING_NOW (start);
+#ifdef TEST_BCOPY
+	  CALL (impl, src, dst, len);
+#else
 	  CALL (impl, dst, src, len);
+#endif
 	  HP_TIMING_NOW (stop);
 	  HP_TIMING_BEST (best_time, start, stop);
 	}
@@ -123,7 +146,9 @@
   size_t srcstart, srcend, dststart, dstend;
   int c;
   unsigned char *p1, *p2;
+#ifndef TEST_BCOPY
   unsigned char *res;
+#endif
 
   for (n = 0; n < ITERATIONS; n++)
     {
@@ -178,6 +203,9 @@
 	{
 	  memset (p2 + dststart, c, dstend - dststart);
 	  memcpy (p2 + srcstart, p1 + srcstart, srcend - srcstart);
+#ifdef TEST_BCOPY
+	  CALL (impl, (char *) (p2 + align1), (char *) (p2 + align2), len);
+#else
 	  res = (unsigned char *) CALL (impl,
 					(char *) (p2 + align2),
 					(char *) (p2 + align1), len);
@@ -187,6 +215,7 @@
 		     n, impl->name, align1, align2, len, res, p2 + align2);
 	      ret = 1;
 	    }
+#endif
 	  if (memcmp (p1 + align1, p2 + align2, len))
 	    {
 	      error (0, 0, "Iteration %zd - different strings, %s (%zd, %zd, %zd)",

Modified: fsf/trunk/libc/string/test-memset.c
==============================================================================
--- fsf/trunk/libc/string/test-memset.c (original)
+++ fsf/trunk/libc/string/test-memset.c Fri Oct 12 00:01:47 2012
@@ -1,5 +1,5 @@
 /* Test and measure memset functions.
-   Copyright (C) 1999, 2002, 2003, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1999-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Jakub Jelinek <jakub@xxxxxxxxxx>, 1999.
 
@@ -21,13 +21,42 @@
 #define MIN_PAGE_SIZE 131072
 #include "test-string.h"
 
+char *simple_memset (char *, int, size_t);
+
+#ifdef TEST_BZERO
+typedef void (*proto_t) (char *, size_t);
+void simple_bzero (char *, size_t);
+void builtin_bzero (char *, size_t);
+
+IMPL (simple_bzero, 0)
+IMPL (builtin_bzero, 0)
+IMPL (bzero, 1)
+
+void
+simple_bzero (char *s, size_t n)
+{
+  simple_memset (s, 0, n);
+}
+
+void
+builtin_bzero (char *s, size_t n)
+{
+  __builtin_bzero (s, n);
+}
+#else
 typedef char *(*proto_t) (char *, int, size_t);
-char *simple_memset (char *, int, size_t);
 char *builtin_memset (char *, int, size_t);
 
 IMPL (simple_memset, 0)
 IMPL (builtin_memset, 0)
 IMPL (memset, 1)
+
+char *
+builtin_memset (char *s, int c, size_t n)
+{
+  return __builtin_memset (s, c, n);
+}
+#endif
 
 char *
 simple_memset (char *s, int c, size_t n)
@@ -38,20 +67,20 @@
   return s;
 }
 
-char *
-builtin_memset (char *s, int c, size_t n)
-{
-  return __builtin_memset (s, c, n);
-}
-
 static void
-do_one_test (impl_t *impl, char *s, int c, size_t n)
-{
+do_one_test (impl_t *impl, char *s, int c __attribute ((unused)), size_t n)
+{
+  char tstbuf[n];
+#ifdef TEST_BZERO
+  simple_bzero (tstbuf, n);
+  CALL (impl, s, n);
+  if (memcmp (s, tstbuf, n) != 0)
+#else
   char *res = CALL (impl, s, c, n);
-  char tstbuf[n];
   if (res != s
       || simple_memset (tstbuf, c, n) != tstbuf
       || memcmp (s, tstbuf, n) != 0)
+#endif
     {
       error (0, 0, "Wrong result in function %s", impl->name);
       ret = 1;
@@ -68,7 +97,12 @@
       for (i = 0; i < 32; ++i)
 	{
 	  HP_TIMING_NOW (start);
+#ifdef TEST_BZERO
+	  CALL (impl, s, n);
+#else
 	  CALL (impl, s, c, n);
+#endif
+
 	  HP_TIMING_NOW (stop);
 	  HP_TIMING_BEST (best_time, start, stop);
 	}
@@ -94,6 +128,7 @@
     putchar ('\n');
 }
 
+#ifndef TEST_BZERO
 static void
 do_random_tests (void)
 {
@@ -178,12 +213,13 @@
 	}
     }
 }
+#endif
 
 int
 test_main (void)
 {
   size_t i;
-  int c;
+  int c = 0;
 
   test_init ();
 
@@ -192,7 +228,9 @@
     printf ("\t%s", impl->name);
   putchar ('\n');
 
+#ifndef TEST_BZERO
   for (c = -65; c <= 130; c += 65)
+#endif
     {
       for (i = 0; i < 18; ++i)
 	do_test (0, c, 1 << i);
@@ -208,7 +246,10 @@
       do_test (2, c, 25);
     }
 
+#ifndef TEST_BZERO
   do_random_tests ();
+#endif
+
   return ret;
 }
 

Modified: fsf/trunk/libc/sysdeps/x86_64/multiarch/bcopy.S
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/multiarch/bcopy.S (original)
+++ fsf/trunk/libc/sysdeps/x86_64/multiarch/bcopy.S Fri Oct 12 00:01:47 2012
@@ -3,5 +3,5 @@
 	.text
 ENTRY(bcopy)
 	xchg	%rdi, %rsi
-	jmp	HIDDEN_BUILTIN_JUMPTARGET(memmove)
+	jmp	__libc_memmove	/* Branch to IFUNC memmove.  */
 END(bcopy)

Modified: fsf/trunk/libc/sysdeps/x86_64/multiarch/bzero.S
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/multiarch/bzero.S (original)
+++ fsf/trunk/libc/sysdeps/x86_64/multiarch/bzero.S Fri Oct 12 00:01:47 2012
@@ -1,5 +1,5 @@
-/* Multiple versions of bzero
-   Copyright (C) 2010 Free Software Foundation, Inc.
+/* bzero.  x86-64 version.
+   Copyright (C) 2010-2012 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
@@ -21,35 +21,8 @@
 
 	.text
 ENTRY(__bzero)
-	.type	__bzero, @gnu_indirect_function
-	cmpl	$0, __cpu_features+KIND_OFFSET(%rip)
-	jne	1f
-	call	__init_cpu_features
-1:	leaq	__bzero_x86_64(%rip), %rax
-	testl	$bit_Prefer_SSE_for_memop, __cpu_features+FEATURE_OFFSET+index_Prefer_SSE_for_memop(%rip)
-	jz	2f
-	leaq	__bzero_sse2(%rip), %rax
-2:	ret
-END(__bzero)
-
-	.type	__bzero_sse2, @function
-__bzero_sse2:
-	cfi_startproc
-	CALL_MCOUNT
 	mov	%rsi,%rdx	/* Adjust parameter.  */
 	xorl	%esi,%esi	/* Fill with 0s.  */
-	jmp	__memset_sse2
-	cfi_endproc
-	.size __bzero_sse2, .-__bzero_sse2
-
-	.type	__bzero_x86_64, @function
-__bzero_x86_64:
-	cfi_startproc
-	CALL_MCOUNT
-	mov	%rsi,%rdx	/* Adjust parameter.  */
-	xorl	%esi,%esi	/* Fill with 0s.  */
-	jmp	__memset_x86_64
-	cfi_endproc
-	.size __bzero_x86_64, .-__bzero_x86_64
-
+	jmp	__libc_memset	/* Branch to IFUNC memset.  */
+END(__bzero)
 weak_alias (__bzero, bzero)

Modified: fsf/trunk/libc/sysdeps/x86_64/multiarch/memset.S
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/multiarch/memset.S (original)
+++ fsf/trunk/libc/sysdeps/x86_64/multiarch/memset.S Fri Oct 12 00:01:47 2012
@@ -1,5 +1,5 @@
 /* Multiple versions of memset
-   Copyright (C) 2010 Free Software Foundation, Inc.
+   Copyright (C) 2010-2012 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
@@ -32,6 +32,11 @@
 	leaq	__memset_sse2(%rip), %rax
 2:	ret
 END(memset)
+
+/* Define internal IFUNC memset for bzero.  */
+	.globl __libc_memset
+	.hidden __libc_memset
+	__libc_memset = memset
 
 # define USE_SSE2 1
 

_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits