This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch tuliom/multilib updated. glibc-2.17-383-g45f06f1


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, tuliom/multilib has been updated
       via  45f06f145fe4e1bd24ebaf38a4b8707a2e4c4b3b (commit)
       via  2d753391bc0e5b57db029ccda01e83aa6a1844b1 (commit)
       via  aec101aa9897a41f894f4cd9caa14e39fc73d091 (commit)
       via  9d28185fb0575d987791a55961d5e399b9e9b1ef (commit)
       via  0866e9492cbb00b6640b6e88f0c621d2e83cd1c5 (commit)
       via  fd9206a6aaa3acd5f48922396878e24a6de90cef (commit)
      from  c65e47d572d510078cc5faae675bc9ed7f059577 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=45f06f145fe4e1bd24ebaf38a4b8707a2e4c4b3b

commit 45f06f145fe4e1bd24ebaf38a4b8707a2e4c4b3b
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Date:   Tue Apr 2 07:49:03 2013 -0500

    Fixing trailing whitespace

diff --git a/sysdeps/powerpc/powerpc32/multiarch/init-arch.h b/sysdeps/powerpc/powerpc32/multiarch/init-arch.h
index 958b28c..5011215 100644
--- a/sysdeps/powerpc/powerpc32/multiarch/init-arch.h
+++ b/sysdeps/powerpc/powerpc32/multiarch/init-arch.h
@@ -50,4 +50,3 @@
 	     PPC_FEATURE_POWER4;					\
   else if (hwcap & PPC_FEATURE_POWER5)					\
     hwcap |= PPC_FEATURE_POWER4;
-  

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2d753391bc0e5b57db029ccda01e83aa6a1844b1

commit 2d753391bc0e5b57db029ccda01e83aa6a1844b1
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Date:   Sun Mar 31 08:51:41 2013 -0500

    PowerPC: strchr ifunc for PPC32

diff --git a/sysdeps/powerpc/powerpc32/multiarch/Makefile b/sysdeps/powerpc/powerpc32/multiarch/Makefile
index fbf298a..c3a3c58 100644
--- a/sysdeps/powerpc/powerpc32/multiarch/Makefile
+++ b/sysdeps/powerpc/powerpc32/multiarch/Makefile
@@ -5,6 +5,7 @@ sysdep_routines += memcpy-power7 memcpy-a2 memcpy-power6 memcpy-cell \
 		   strncmp-power7 strncmp-power4 strlen-power7 \
                    strcasecmp-power7 strcasecmp_l-power7 \
 		   strnlen-power7 strnlen-c \
+		   strchr-power7 \
 		   mempcpy-power7 mempcpy-c \
 		   memchr-power7 memchr-c \
 		   memrchr-power7 memrchr-c \
diff --git a/sysdeps/powerpc/powerpc32/multiarch/ifunc-impl-list.c b/sysdeps/powerpc/powerpc32/multiarch/ifunc-impl-list.c
index 1399548..faeef4a 100644
--- a/sysdeps/powerpc/powerpc32/multiarch/ifunc-impl-list.c
+++ b/sysdeps/powerpc/powerpc32/multiarch/ifunc-impl-list.c
@@ -142,6 +142,13 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
 	      IFUNC_IMPL_ADD (array, i, strnlen, 1,
 			      __strnlen_ppc32))
 
+  IFUNC_IMPL (i, name, strchr,
+	      IFUNC_IMPL_ADD (array, i, strchr,
+			      hwcap & PPC_FEATURE_HAS_VSX,
+			      __strchr_power7)
+	      IFUNC_IMPL_ADD (array, i, strchr, 1,
+			      __strchr_ppc32))
+
   IFUNC_IMPL (i, name, strchrnul,
 	      IFUNC_IMPL_ADD (array, i, strchrnul,
 			      hwcap & PPC_FEATURE_HAS_VSX,
diff --git a/sysdeps/powerpc/powerpc32/multiarch/rtld-strchr.S b/sysdeps/powerpc/powerpc32/multiarch/rtld-strchr.S
new file mode 100644
index 0000000..d969c0a
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/multiarch/rtld-strchr.S
@@ -0,0 +1 @@
+#include "../strchr.S"
diff --git a/sysdeps/powerpc/powerpc32/power7/strchr.S b/sysdeps/powerpc/powerpc32/multiarch/strchr-power7.S
similarity index 98%
rename from sysdeps/powerpc/powerpc32/power7/strchr.S
rename to sysdeps/powerpc/powerpc32/multiarch/strchr-power7.S
index 0ecadb2..32bc5bb 100644
--- a/sysdeps/powerpc/powerpc32/power7/strchr.S
+++ b/sysdeps/powerpc/powerpc32/multiarch/strchr-power7.S
@@ -21,7 +21,7 @@
 
 /* int [r3] strchr (char *s [r3], int c [r4])  */
 	.machine  power7
-ENTRY (strchr)
+ENTRY (__strchr_power7)
 	CALL_MCOUNT
 	dcbt	0,r3
 	clrrwi	r8,r3,2	      /* Align the address to word boundary.  */
@@ -195,6 +195,4 @@ L(done_null):
 	srwi	r0,r0,3	      /* Convert leading zeros to bytes.  */
 	add	r3,r8,r0      /* Return address of the matching null byte.  */
 	blr
-END (strchr)
-weak_alias (strchr, index)
-libc_hidden_builtin_def (strchr)
+END (__strchr_power7)
diff --git a/sysdeps/powerpc/powerpc32/multiarch/strchr.S b/sysdeps/powerpc/powerpc32/multiarch/strchr.S
new file mode 100644
index 0000000..08f0d90
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/multiarch/strchr.S
@@ -0,0 +1,82 @@
+/* Optimized strchr implementation for PowerPC32.
+   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 <sysdep.h>
+#include <rtld-global-offsets.h>
+
+/* Define multiple versions only for the definition in libc.  */
+#if defined SHARED && !defined NOT_IN_libc
+	.text
+ENTRY(strchr)
+	.type   strchr, @gnu_indirect_function
+# ifdef PIC
+	mflr	r11
+	cfi_register (lr,r11)
+	bcl 	20,31,1f
+1:	mflr	r5
+	addis	r5,r5,_GLOBAL_OFFSET_TABLE_-1b@ha
+	addi	r5,r5,_GLOBAL_OFFSET_TABLE_-1b@l
+	lwz	r6,_rtld_global_ro@got(r5)
+	mtlr	r11
+	cfi_same_value (lr)
+	lwz	r6,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET+4(r6)
+# else
+	lis	r6,(_dl_hwcap+4)@ha
+	lwz	r6,(_dl_hwcap+4)@l(r6)
+# endif
+	/* r5 - got pointer | r6 - _dl_hwcap */
+	andi.	r7,r6,PPC_FEATURE_HAS_VSX
+	bne-	L(power7)
+# ifdef PIC
+	lwz	r3,__strchr_ppc32@got(r5)
+# else
+	lis	r3,__strchr_ppc32@ha
+	lwz	r3,__strchr_ppc32@l(r3)
+# endif
+	blr
+L(power7):
+# ifdef PIC
+	lwz	r3,__strchr_power7@got(r5)
+# else
+	lis	r3,__strchr_power7@ha
+	lwz	r3,__strchr_power7@l(r3)
+# endif
+	blr
+END(strchr)
+
+# undef ENTRY
+# define ENTRY(name)						\
+  .globl C_SYMBOL_NAME(__strchr_ppc32);				\
+  .type C_SYMBOL_NAME(__strchr_ppc32),@function;		\
+  .align ALIGNARG(2);						\
+  C_LABEL(__strchr_ppc32)					\
+  cfi_startproc;						\
+  CALL_MCOUNT
+
+# undef END
+# define END(name)						\
+  cfi_endproc;							\
+  ASM_SIZE_DIRECTIVE(__strchr_ppc32)				\
+
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name)				\
+  .globl __GI_strchr; __GI_strchr = __strchr_ppc32
+
+#endif
+
+#include "../strchr.S"

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aec101aa9897a41f894f4cd9caa14e39fc73d091

commit aec101aa9897a41f894f4cd9caa14e39fc73d091
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Date:   Sun Mar 31 08:16:46 2013 -0500

    PowerPC: strchrnul for PPC32

diff --git a/string/strchrnul.c b/string/strchrnul.c
index 1f63572..719d380 100644
--- a/string/strchrnul.c
+++ b/string/strchrnul.c
@@ -26,6 +26,9 @@
 
 #undef __strchrnul
 #undef strchrnul
+#ifdef STRCHRNUL
+# define __strchrnul STRCHRNUL
+#endif
 
 /* Find the first occurrence of C in S or the final NUL byte.  */
 char *
@@ -165,5 +168,6 @@ __strchrnul (s, c_in)
   /* This should never happen.  */
   return NULL;
 }
-
+#ifndef STRCHRNUL
 weak_alias (__strchrnul, strchrnul)
+#endif
diff --git a/sysdeps/powerpc/powerpc32/multiarch/Makefile b/sysdeps/powerpc/powerpc32/multiarch/Makefile
index 05f3042..fbf298a 100644
--- a/sysdeps/powerpc/powerpc32/multiarch/Makefile
+++ b/sysdeps/powerpc/powerpc32/multiarch/Makefile
@@ -8,5 +8,6 @@ sysdep_routines += memcpy-power7 memcpy-a2 memcpy-power6 memcpy-cell \
 		   mempcpy-power7 mempcpy-c \
 		   memchr-power7 memchr-c \
 		   memrchr-power7 memrchr-c \
-		   rawmemchr-power7 rawmemchr-c
+		   rawmemchr-power7 rawmemchr-c \
+		   strchrnul-power7 strchrnul-c
 endif
diff --git a/sysdeps/powerpc/powerpc32/multiarch/ifunc-impl-list.c b/sysdeps/powerpc/powerpc32/multiarch/ifunc-impl-list.c
index 00f309f..1399548 100644
--- a/sysdeps/powerpc/powerpc32/multiarch/ifunc-impl-list.c
+++ b/sysdeps/powerpc/powerpc32/multiarch/ifunc-impl-list.c
@@ -141,6 +141,13 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
 			      __strnlen_power7)
 	      IFUNC_IMPL_ADD (array, i, strnlen, 1,
 			      __strnlen_ppc32))
+
+  IFUNC_IMPL (i, name, strchrnul,
+	      IFUNC_IMPL_ADD (array, i, strchrnul,
+			      hwcap & PPC_FEATURE_HAS_VSX,
+			      __strchrnul_power7)
+	      IFUNC_IMPL_ADD (array, i, strchrnul, 1,
+			      __strchrnul_ppc32))
 #endif
 
   return i;
diff --git a/sysdeps/powerpc/powerpc32/multiarch/strchrnul-c.c b/sysdeps/powerpc/powerpc32/multiarch/strchrnul-c.c
new file mode 100644
index 0000000..102ea46
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/multiarch/strchrnul-c.c
@@ -0,0 +1,2 @@
+#define STRCHRNUL  __strchrnul_ppc32
+#include "string/strchrnul.c"
diff --git a/sysdeps/powerpc/powerpc32/power7/strchrnul.S b/sysdeps/powerpc/powerpc32/multiarch/strchrnul-power7.S
similarity index 96%
rename from sysdeps/powerpc/powerpc32/power7/strchrnul.S
rename to sysdeps/powerpc/powerpc32/multiarch/strchrnul-power7.S
index d4cacab..fff6be7 100644
--- a/sysdeps/powerpc/powerpc32/power7/strchrnul.S
+++ b/sysdeps/powerpc/powerpc32/multiarch/strchrnul-power7.S
@@ -21,7 +21,7 @@
 
 /* int [r3] strchrnul (char *s [r3], int c [r4])  */
 	.machine  power7
-ENTRY (__strchrnul)
+ENTRY (__strchrnul_power7)
 	CALL_MCOUNT
 	dcbt	0,r3
 	clrrwi	r8,r3,2	      /* Align the address to word boundary.  */
@@ -109,6 +109,4 @@ L(done):
 	srwi	r0,r0,3	      /* Convert leading zeros to bytes.  */
 	add	r3,r8,r0      /* Return address of matching c/null byte.  */
 	blr
-END (__strchrnul)
-weak_alias (__strchrnul,strchrnul)
-libc_hidden_builtin_def (__strchrnul)
+END (__strchrnul_power7)
diff --git a/sysdeps/powerpc/powerpc32/multiarch/strchrnul.c b/sysdeps/powerpc/powerpc32/multiarch/strchrnul.c
new file mode 100644
index 0000000..874dd39
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/multiarch/strchrnul.c
@@ -0,0 +1,37 @@
+/* Multiple versions of strchrnul.
+   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/>.  */
+
+#ifndef NOT_IN_libc
+# include <string.h>
+# include <shlib-compat.h>
+# include "init-arch.h"
+
+extern __typeof (__strchrnul) __strchrnul_ppc32 attribute_hidden;
+extern __typeof (__strchrnul) __strchrnul_power7 attribute_hidden;
+
+/* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle
+   ifunc symbol properly.  */
+libc_ifunc (__strchrnul,
+	    (hwcap & PPC_FEATURE_HAS_VSX)
+            ? __strchrnul_power7
+            : __strchrnul_ppc32);
+
+weak_alias (__strchrnul, strchrnul)
+#else
+#include "string/strchrnul.c"
+#endif

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9d28185fb0575d987791a55961d5e399b9e9b1ef

commit 9d28185fb0575d987791a55961d5e399b9e9b1ef
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Date:   Sat Mar 30 09:10:11 2013 -0500

    PowerPC: fix INIT_ARCH macro for ifunc
    
    Add all the supported ISA on hwcap checking.

diff --git a/sysdeps/powerpc/powerpc32/multiarch/init-arch.h b/sysdeps/powerpc/powerpc32/multiarch/init-arch.h
index 963fc19..958b28c 100644
--- a/sysdeps/powerpc/powerpc32/multiarch/init-arch.h
+++ b/sysdeps/powerpc/powerpc32/multiarch/init-arch.h
@@ -32,5 +32,22 @@
 # define __GLRO(value)  GLRO(value)
 #endif
 
+/* dl_hwcap contains only the latest supported ISA, the macro checks which is
+   and fills the previous ones.  */
 # define INIT_ARCH() \
-  unsigned long int hwcap = __GLRO(dl_hwcap);
+  unsigned long int hwcap = __GLRO(dl_hwcap); 				\
+  if (hwcap & PPC_FEATURE_ARCH_2_06)					\
+    hwcap |= PPC_FEATURE_ARCH_2_05 |					\
+	     PPC_FEATURE_POWER5_PLUS |					\
+             PPC_FEATURE_POWER5 |					\
+	     PPC_FEATURE_POWER4;					\
+  else if (hwcap & PPC_FEATURE_ARCH_2_05)				\
+    hwcap |= PPC_FEATURE_POWER5_PLUS |					\
+	     PPC_FEATURE_POWER5 |					\
+	     PPC_FEATURE_POWER4;					\
+  else if (hwcap & PPC_FEATURE_POWER5_PLUS)				\
+    hwcap |= PPC_FEATURE_POWER5 |					\
+	     PPC_FEATURE_POWER4;					\
+  else if (hwcap & PPC_FEATURE_POWER5)					\
+    hwcap |= PPC_FEATURE_POWER4;
+  

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0866e9492cbb00b6640b6e88f0c621d2e83cd1c5

commit 0866e9492cbb00b6640b6e88f0c621d2e83cd1c5
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Date:   Sat Mar 30 08:41:02 2013 -0500

    PowerPC: rawmemchr ifunc for PPC32

diff --git a/string/rawmemchr.c b/string/rawmemchr.c
index 30fbe87..6f56a1e 100644
--- a/string/rawmemchr.c
+++ b/string/rawmemchr.c
@@ -46,7 +46,9 @@
 #include <sys/types.h>
 
 #undef memchr
-
+#ifdef RAWMEMCHR
+# define __rawmemchr RAWMEMCHR
+#endif
 
 /* Find the first occurrence of C in S.  */
 __ptr_t
@@ -178,5 +180,7 @@ __rawmemchr (s, c_in)
 	}
     }
 }
-libc_hidden_def (__rawmemchr)
+#ifndef RAWMEMCHR
 weak_alias (__rawmemchr, rawmemchr)
+#endif
+libc_hidden_def (__rawmemchr)
diff --git a/sysdeps/powerpc/powerpc32/multiarch/Makefile b/sysdeps/powerpc/powerpc32/multiarch/Makefile
index 7e091ae..05f3042 100644
--- a/sysdeps/powerpc/powerpc32/multiarch/Makefile
+++ b/sysdeps/powerpc/powerpc32/multiarch/Makefile
@@ -7,5 +7,6 @@ sysdep_routines += memcpy-power7 memcpy-a2 memcpy-power6 memcpy-cell \
 		   strnlen-power7 strnlen-c \
 		   mempcpy-power7 mempcpy-c \
 		   memchr-power7 memchr-c \
-		   memrchr-power7 memrchr-c
+		   memrchr-power7 memrchr-c \
+		   rawmemchr-power7 rawmemchr-c
 endif
diff --git a/sysdeps/powerpc/powerpc32/multiarch/ifunc-impl-list.c b/sysdeps/powerpc/powerpc32/multiarch/ifunc-impl-list.c
index 345855f..00f309f 100644
--- a/sysdeps/powerpc/powerpc32/multiarch/ifunc-impl-list.c
+++ b/sysdeps/powerpc/powerpc32/multiarch/ifunc-impl-list.c
@@ -103,6 +103,13 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
 	      IFUNC_IMPL_ADD (array, i, memrchr, 1,
 			      __memrchr_ppc32))
 
+  IFUNC_IMPL (i, name, rawmemchr,
+	      IFUNC_IMPL_ADD (array, i, rawmemchr,
+			      hwcap & PPC_FEATURE_HAS_VSX,
+			      __rawmemchr_power7)
+	      IFUNC_IMPL_ADD (array, i, rawmemchr, 1,
+			      __rawmemchr_ppc32))
+
   IFUNC_IMPL (i, name, strlen,
 	      IFUNC_IMPL_ADD (array, i, strlen, hwcap & PPC_FEATURE_HAS_VSX,
 				__strlen_power7)
diff --git a/sysdeps/powerpc/powerpc32/multiarch/rawmemchr-c.c b/sysdeps/powerpc/powerpc32/multiarch/rawmemchr-c.c
new file mode 100644
index 0000000..cdf2436
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/multiarch/rawmemchr-c.c
@@ -0,0 +1,8 @@
+#define RAWMEMCHR  __rawmemchr_ppc32
+#ifdef SHARED
+# undef libc_hidden_def
+# define libc_hidden_def(name)  \
+  __hidden_ver1 (__rawmemchr_ppc32, __GI___rawmemchr, __rawmemchr_ppc32);
+#endif
+
+#include "string/rawmemchr.c"
diff --git a/sysdeps/powerpc/powerpc32/power7/rawmemchr.S b/sysdeps/powerpc/powerpc32/multiarch/rawmemchr-power7.S
similarity index 96%
rename from sysdeps/powerpc/powerpc32/power7/rawmemchr.S
rename to sysdeps/powerpc/powerpc32/multiarch/rawmemchr-power7.S
index a80c74a..b495393 100644
--- a/sysdeps/powerpc/powerpc32/power7/rawmemchr.S
+++ b/sysdeps/powerpc/powerpc32/multiarch/rawmemchr-power7.S
@@ -21,7 +21,7 @@
 
 /* int [r3] rawmemchr (void *s [r3], int c [r4])  */
 	.machine  power7
-ENTRY (__rawmemchr)
+ENTRY (__rawmemchr_power7)
 	CALL_MCOUNT
 	dcbt	0,r3
 	clrrwi	r8,r3,2	      /* Align the address to word boundary.  */
@@ -94,6 +94,4 @@ L(done):
 	srwi	r0,r0,3	      /* Convert leading zeroes to bytes.  */
 	add	r3,r8,r0      /* Return address of the matching char.  */
 	blr
-END (__rawmemchr)
-weak_alias (__rawmemchr,rawmemchr)
-libc_hidden_builtin_def (__rawmemchr)
+END (__rawmemchr_power7)
diff --git a/sysdeps/powerpc/powerpc32/multiarch/rawmemchr.c b/sysdeps/powerpc/powerpc32/multiarch/rawmemchr.c
new file mode 100644
index 0000000..e751440
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/multiarch/rawmemchr.c
@@ -0,0 +1,37 @@
+/* Multiple versions of rawmemchr.
+   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/>.  */
+
+#ifndef NOT_IN_libc
+# include <string.h>
+# include <shlib-compat.h>
+# include "init-arch.h"
+
+extern __typeof (__rawmemchr) __rawmemchr_ppc32 attribute_hidden;
+extern __typeof (__rawmemchr) __rawmemchr_power7 attribute_hidden;
+
+/* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle
+   ifunc symbol properly.  */
+libc_ifunc (__rawmemchr,
+	    (hwcap & PPC_FEATURE_HAS_VSX)
+            ? __rawmemchr_power7
+            : __rawmemchr_ppc32);
+
+weak_alias (__rawmemchr, rawmemchr)
+#else
+#include "string/rawmemchr.c"
+#endif

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fd9206a6aaa3acd5f48922396878e24a6de90cef

commit fd9206a6aaa3acd5f48922396878e24a6de90cef
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Date:   Fri Mar 29 21:53:54 2013 -0500

    PowerPC: memrchr multilib for PPC32

diff --git a/sysdeps/powerpc/powerpc32/multiarch/Makefile b/sysdeps/powerpc/powerpc32/multiarch/Makefile
index 63ef4a6..7e091ae 100644
--- a/sysdeps/powerpc/powerpc32/multiarch/Makefile
+++ b/sysdeps/powerpc/powerpc32/multiarch/Makefile
@@ -6,5 +6,6 @@ sysdep_routines += memcpy-power7 memcpy-a2 memcpy-power6 memcpy-cell \
                    strcasecmp-power7 strcasecmp_l-power7 \
 		   strnlen-power7 strnlen-c \
 		   mempcpy-power7 mempcpy-c \
-		   memchr-power7 memchr-c
+		   memchr-power7 memchr-c \
+		   memrchr-power7 memrchr-c
 endif
diff --git a/sysdeps/powerpc/powerpc32/multiarch/ifunc-impl-list.c b/sysdeps/powerpc/powerpc32/multiarch/ifunc-impl-list.c
index 49bdb50..345855f 100644
--- a/sysdeps/powerpc/powerpc32/multiarch/ifunc-impl-list.c
+++ b/sysdeps/powerpc/powerpc32/multiarch/ifunc-impl-list.c
@@ -96,6 +96,13 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
 	      IFUNC_IMPL_ADD (array, i, memchr, 1,
 			      __memchr_ppc32))
 
+  IFUNC_IMPL (i, name, memrchr,
+	      IFUNC_IMPL_ADD (array, i, memrchr,
+			      hwcap & PPC_FEATURE_HAS_VSX,
+			      __memrchr_power7)
+	      IFUNC_IMPL_ADD (array, i, memrchr, 1,
+			      __memrchr_ppc32))
+
   IFUNC_IMPL (i, name, strlen,
 	      IFUNC_IMPL_ADD (array, i, strlen, hwcap & PPC_FEATURE_HAS_VSX,
 				__strlen_power7)
diff --git a/sysdeps/powerpc/powerpc32/multiarch/memrchr-c.c b/sysdeps/powerpc/powerpc32/multiarch/memrchr-c.c
new file mode 100644
index 0000000..3de7585
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/multiarch/memrchr-c.c
@@ -0,0 +1,7 @@
+#ifndef NOT_IN_libc
+# define MEMRCHR  __memrchr_ppc32
+# include <string.h>
+extern void *__memrchr_ppc32 (const void *, int, size_t);
+#endif
+
+#include "string/memrchr.c"
diff --git a/sysdeps/powerpc/powerpc32/power7/memrchr.S b/sysdeps/powerpc/powerpc32/multiarch/memrchr-power7.S
similarity index 97%
rename from sysdeps/powerpc/powerpc32/power7/memrchr.S
rename to sysdeps/powerpc/powerpc32/multiarch/memrchr-power7.S
index d1e3fda..0aaf017 100644
--- a/sysdeps/powerpc/powerpc32/power7/memrchr.S
+++ b/sysdeps/powerpc/powerpc32/multiarch/memrchr-power7.S
@@ -21,7 +21,7 @@
 
 /* int [r3] memrchr (char *s [r3], int byte [r4], int size [r5])  */
 	.machine  power7
-ENTRY (__memrchr)
+ENTRY (__memrchr_power7)
 	CALL_MCOUNT
 	dcbt	0,r3
 	mr	r7,r3
@@ -170,6 +170,4 @@ L(loop_small):
 	ble	L(null)
 	b	L(loop_small)
 
-END (__memrchr)
-weak_alias (__memrchr, memrchr)
-libc_hidden_builtin_def (memrchr)
+END (__memrchr_power7)
diff --git a/sysdeps/powerpc/powerpc32/multiarch/memrchr.c b/sysdeps/powerpc/powerpc32/multiarch/memrchr.c
new file mode 100644
index 0000000..b94267b
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/multiarch/memrchr.c
@@ -0,0 +1,37 @@
+/* Multiple versions of memrchr.
+   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/>.  */
+
+#ifndef NOT_IN_libc
+# include <string.h>
+# include <shlib-compat.h>
+# include "init-arch.h"
+
+extern __typeof (__memrchr) __memrchr_ppc32 attribute_hidden;
+extern __typeof (__memrchr) __memrchr_power7 attribute_hidden;
+
+/* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle
+   ifunc symbol properly.  */
+libc_ifunc (__memrchr,
+	    (hwcap & PPC_FEATURE_HAS_VSX)
+            ? __memrchr_power7
+            : __memrchr_ppc32);
+
+weak_alias (__memrchr, memrchr)
+#else
+#include "string/memrchr.c"
+#endif

-----------------------------------------------------------------------

Summary of changes:
 string/rawmemchr.c                                 |    8 +-
 string/strchrnul.c                                 |    6 +-
 sysdeps/powerpc/powerpc32/multiarch/Makefile       |    6 +-
 .../powerpc/powerpc32/multiarch/ifunc-impl-list.c  |   28 +++
 sysdeps/powerpc/powerpc32/multiarch/init-arch.h    |   18 ++-
 sysdeps/powerpc/powerpc32/multiarch/memrchr-c.c    |    7 +
 .../powerpc/powerpc32/multiarch/memrchr-power7.S   |  173 +++++++++++++++++
 sysdeps/powerpc/powerpc32/multiarch/memrchr.c      |   37 ++++
 sysdeps/powerpc/powerpc32/multiarch/rawmemchr-c.c  |    8 +
 .../powerpc/powerpc32/multiarch/rawmemchr-power7.S |   97 ++++++++++
 sysdeps/powerpc/powerpc32/multiarch/rawmemchr.c    |   37 ++++
 sysdeps/powerpc/powerpc32/multiarch/rtld-strchr.S  |    1 +
 .../powerpc/powerpc32/multiarch/strchr-power7.S    |  198 +++++++++++++++++++
 sysdeps/powerpc/powerpc32/multiarch/strchr.S       |   82 ++++++++
 sysdeps/powerpc/powerpc32/multiarch/strchrnul-c.c  |    2 +
 .../powerpc/powerpc32/multiarch/strchrnul-power7.S |  112 +++++++++++
 sysdeps/powerpc/powerpc32/multiarch/strchrnul.c    |   37 ++++
 sysdeps/powerpc/powerpc32/power7/memrchr.S         |  175 -----------------
 sysdeps/powerpc/powerpc32/power7/rawmemchr.S       |   99 ----------
 sysdeps/powerpc/powerpc32/power7/strchr.S          |  200 --------------------
 sysdeps/powerpc/powerpc32/power7/strchrnul.S       |  114 -----------
 21 files changed, 852 insertions(+), 593 deletions(-)
 create mode 100644 sysdeps/powerpc/powerpc32/multiarch/memrchr-c.c
 create mode 100644 sysdeps/powerpc/powerpc32/multiarch/memrchr-power7.S
 create mode 100644 sysdeps/powerpc/powerpc32/multiarch/memrchr.c
 create mode 100644 sysdeps/powerpc/powerpc32/multiarch/rawmemchr-c.c
 create mode 100644 sysdeps/powerpc/powerpc32/multiarch/rawmemchr-power7.S
 create mode 100644 sysdeps/powerpc/powerpc32/multiarch/rawmemchr.c
 create mode 100644 sysdeps/powerpc/powerpc32/multiarch/rtld-strchr.S
 create mode 100644 sysdeps/powerpc/powerpc32/multiarch/strchr-power7.S
 create mode 100644 sysdeps/powerpc/powerpc32/multiarch/strchr.S
 create mode 100644 sysdeps/powerpc/powerpc32/multiarch/strchrnul-c.c
 create mode 100644 sysdeps/powerpc/powerpc32/multiarch/strchrnul-power7.S
 create mode 100644 sysdeps/powerpc/powerpc32/multiarch/strchrnul.c
 delete mode 100644 sysdeps/powerpc/powerpc32/power7/memrchr.S
 delete mode 100644 sysdeps/powerpc/powerpc32/power7/rawmemchr.S
 delete mode 100644 sysdeps/powerpc/powerpc32/power7/strchr.S
 delete mode 100644 sysdeps/powerpc/powerpc32/power7/strchrnul.S


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]