about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>2015-01-20 22:02:03 -0500
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>2015-02-09 06:42:28 -0500
commit6f0993a6387158aac2b1b7ff6f8e4ffd75877d2a (patch)
treec093e6867020661d7f2572c150f7707d68e39ead
parent3001e54c5786f714537acfb631b502e2229f883f (diff)
downloadglibc-6f0993a6387158aac2b1b7ff6f8e4ffd75877d2a.tar.gz
glibc-6f0993a6387158aac2b1b7ff6f8e4ffd75877d2a.tar.xz
glibc-6f0993a6387158aac2b1b7ff6f8e4ffd75877d2a.zip
powerpc: Simplify bcopy default implementation
This patch simplify the default bcopy symbol for powerpc64 by just using
memmove instead of implementing using the default bcopy.  Since the
symbol is deprecated, it trades speed by code size.
-rw-r--r--ChangeLog4
-rw-r--r--sysdeps/powerpc/powerpc64/multiarch/bcopy-ppc64.c10
2 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 1692ada693..d5796a4e97 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2015-02-09  Adhemerval Zanellla  <azanella@linux.vnet.ibm.com>
 
+	* sysdeps/powerpc/powerpc64/multiarch/bcopy-ppc64.c (__bcopy_ppc):
+	Rewrite to call __memmove_ppc instead of include default
+	implementation.
+
 	* sysdeps/powerpc/powerpc64/multiarch/Makefile [sysdep_routines]:
 	Remove wide chars objects.
 	[wcsmbs]: New rule for wide char objects.
diff --git a/sysdeps/powerpc/powerpc64/multiarch/bcopy-ppc64.c b/sysdeps/powerpc/powerpc64/multiarch/bcopy-ppc64.c
index 14ecb9fc9b..eb182b265a 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/bcopy-ppc64.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/bcopy-ppc64.c
@@ -18,8 +18,10 @@
 
 #include <string.h>
 
-extern __typeof (bcopy) __bcopy_ppc attribute_hidden;
+extern __typeof (bcopy)   __bcopy_ppc attribute_hidden;
+extern __typeof (memmove) __memmove_ppc attribute_hidden;
 
-#define bcopy __bcopy_ppc
-
-#include <string/bcopy.c>
+void __bcopy_ppc (const void *src, void *dest, size_t n)
+{
+  __memmove_ppc (dest, src, n);
+}