This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 2/6] powerpc: Simplify bcopy default implementation
- From: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- To: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Wed, 21 Jan 2015 14:14:45 -0200
- Subject: [PATCH 2/6] powerpc: Simplify bcopy default implementation
- Authentication-results: sourceware.org; auth=none
- References: <54BFCE9B dot 3030602 at linux dot vnet dot ibm dot com>
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.
Tested on powerpc64 and powerpc64le.
--
* sysdeps/powerpc/powerpc64/multiarch/bcopy-ppc64.c (__bcopy_ppc):
Rewrite to call __memmove_ppc instead of include default
implementation.
--
diff --git a/sysdeps/powerpc/powerpc64/multiarch/bcopy-ppc64.c b/sysdeps/powerpc/powerpc64/multiarch/bcopy-ppc64.c
index 14ecb9f..eb182b2 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);
+}