aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/powerpc64/power7
diff options
context:
space:
mode:
authorWainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com>2017-04-11 14:18:35 -0300
committerTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>2017-04-11 17:13:56 -0300
commit72fd128a08028488dbba13388dd38ec7fddd63f4 (patch)
tree5c404713cdd85538be0ac9eded408f294aad63c0 /sysdeps/powerpc/powerpc64/power7
parentff06a55aef1a1826dadcebfee8baeaa10ce705a0 (diff)
downloadglibc-72fd128a08028488dbba13388dd38ec7fddd63f4.tar
glibc-72fd128a08028488dbba13388dd38ec7fddd63f4.tar.gz
glibc-72fd128a08028488dbba13388dd38ec7fddd63f4.tar.bz2
glibc-72fd128a08028488dbba13388dd38ec7fddd63f4.zip
powerpc: refactor memcpy and mempcpy IFUNC.
Clean up the IFUNC implementations for powerpc in order to remove unneeded macro definitions. Tested on ppc64le with and without --disable-multi-arch flag. * sysdeps/powerpc/powerpc64/multiarch/memcpy-a2.S: Define the implementation-specific function name and remove unneeded macros definition. * sysdeps/powerpc/powerpc64/multiarch/memcpy-cell.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memcpy-power4.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memcpy-power6.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memcpy-power7.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memcpy-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/mempcpy-power7.S: Likewise. * sysdeps/powerpc/powerpc64/a2/memcpy.S: Set a default function name if not defined and pass as parameter to macros accordingly. * sysdeps/powerpc/powerpc64/cell/memcpy.S: Likewise. * sysdeps/powerpc/powerpc64/memcpy.S: Likewise. * sysdeps/powerpc/powerpc64/power4/memcpy.S: Likewise. * sysdeps/powerpc/powerpc64/power6/memcpy.S: Likewise. * sysdeps/powerpc/powerpc64/power7/memcpy.S: Likewise. * sysdeps/powerpc/powerpc64/power7/mempcpy.S: Likewise.
Diffstat (limited to 'sysdeps/powerpc/powerpc64/power7')
-rw-r--r--sysdeps/powerpc/powerpc64/power7/memcpy.S8
-rw-r--r--sysdeps/powerpc/powerpc64/power7/mempcpy.S7
2 files changed, 11 insertions, 4 deletions
diff --git a/sysdeps/powerpc/powerpc64/power7/memcpy.S b/sysdeps/powerpc/powerpc64/power7/memcpy.S
index ae2db216f3..e08993cbc3 100644
--- a/sysdeps/powerpc/powerpc64/power7/memcpy.S
+++ b/sysdeps/powerpc/powerpc64/power7/memcpy.S
@@ -23,12 +23,16 @@
/* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]);
Returns 'dst'. */
+#ifndef MEMCPY
+# define MEMCPY memcpy
+#endif
+
#define dst 11 /* Use r11 so r3 kept unchanged. */
#define src 4
#define cnt 5
.machine power7
-EALIGN (memcpy, 5, 0)
+EALIGN (MEMCPY, 5, 0)
CALL_MCOUNT 3
cmpldi cr1,cnt,31
@@ -422,5 +426,5 @@ L(end_unaligned_loop):
/* Return original DST pointer. */
blr
-END_GEN_TB (memcpy,TB_TOCLESS)
+END_GEN_TB (MEMCPY,TB_TOCLESS)
libc_hidden_builtin_def (memcpy)
diff --git a/sysdeps/powerpc/powerpc64/power7/mempcpy.S b/sysdeps/powerpc/powerpc64/power7/mempcpy.S
index fdf6b6f130..4e15d1e40c 100644
--- a/sysdeps/powerpc/powerpc64/power7/mempcpy.S
+++ b/sysdeps/powerpc/powerpc64/power7/mempcpy.S
@@ -23,8 +23,11 @@
/* __ptr_t [r3] __mempcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]);
Returns 'dst' + 'len'. */
+#ifndef MEMPCPY
+# define MEMPCPY __mempcpy
+#endif
.machine power7
-EALIGN (__mempcpy, 5, 0)
+EALIGN (MEMPCPY, 5, 0)
CALL_MCOUNT 3
cmpldi cr1,5,31
@@ -463,7 +466,7 @@ L(end_unaligned_loop):
add 3,3,5
blr
-END_GEN_TB (__mempcpy,TB_TOCLESS)
+END_GEN_TB (MEMPCPY,TB_TOCLESS)
libc_hidden_def (__mempcpy)
weak_alias (__mempcpy, mempcpy)
libc_hidden_builtin_def (mempcpy)