about summary refs log tree commit diff
path: root/sysdeps/powerpc
diff options
context:
space:
mode:
authorCarlos Eduardo Seo <cseo@linux.vnet.ibm.com>2015-08-11 19:38:45 -0300
committerTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>2015-08-21 17:05:40 -0300
commit502b91de1431f92afc650c3b5ca5650cb6b0298d (patch)
treeedfdd814f0acef9f9de2393f6323dd6ab9f34231 /sysdeps/powerpc
parente5dee2c896f04d88defdfa00282fa83f5f4004d8 (diff)
downloadglibc-502b91de1431f92afc650c3b5ca5650cb6b0298d.tar.gz
glibc-502b91de1431f92afc650c3b5ca5650cb6b0298d.tar.xz
glibc-502b91de1431f92afc650c3b5ca5650cb6b0298d.zip
powerpc: make memchr use memchr-power7.
In powerpc64, memchr was always pointing to the internal __GI_memchr
implementation.  This patch fixes that and makes it use the
optimized POWER7 version when adequate.

	* sysdeps/powerpc/powerpc64/multiarch/memchr-ppc64.c: Make
	memchr not point to the internal __GI_memchr implementation.
Diffstat (limited to 'sysdeps/powerpc')
-rw-r--r--sysdeps/powerpc/powerpc64/multiarch/memchr-ppc64.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sysdeps/powerpc/powerpc64/multiarch/memchr-ppc64.c b/sysdeps/powerpc/powerpc64/multiarch/memchr-ppc64.c
index eadfea1654..302d1bb83d 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/memchr-ppc64.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/memchr-ppc64.c
@@ -16,4 +16,16 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <sysdeps/powerpc/powerpc32/power4/multiarch/memchr-ppc32.c>
+#include <string.h>
+
+#define MEMCHR  __memchr_ppc
+
+#undef weak_alias
+#define weak_alias(a, b)
+
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name)
+
+extern __typeof (memchr) __memchr_ppc attribute_hidden;
+
+#include <string/memchr.c>