about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--sysdeps/powerpc/powerpc64/multiarch/memcmp-power4.S16
-rw-r--r--sysdeps/powerpc/powerpc64/multiarch/memcmp-power7.S16
-rw-r--r--sysdeps/powerpc/powerpc64/multiarch/memmove-power7.S16
-rw-r--r--sysdeps/powerpc/powerpc64/power4/memcmp.S8
-rw-r--r--sysdeps/powerpc/powerpc64/power7/memcmp.S8
-rw-r--r--sysdeps/powerpc/powerpc64/power7/memmove.S7
7 files changed, 29 insertions, 52 deletions
diff --git a/ChangeLog b/ChangeLog
index bfdb18c04a..a99770606c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2017-04-11  Wainer dos Santos Moschetta  <wainersm@linux.vnet.ibm.com>
 
+	* sysdeps/powerpc/powerpc64/multiarch/memcmp-power4.S: Define the
+	implementation-specific function name and remove unneeded
+	macros definition.
+	* sysdeps/powerpc/powerpc64/multiarch/memcmp-power7.S: Likewise.
+	* sysdeps/powerpc/powerpc64/multiarch/memmove-power7.S: Likewise.
+	* sysdeps/powerpc/powerpc64/power4/memcmp.S: Set a default function
+	name if not defined and pass as parameter to macros accordingly.
+	* sysdeps/powerpc/powerpc64/power7/memcmp.S: Likewise.
+	* sysdeps/powerpc/powerpc64/power7/memmove.S: Likewise.
+
 	* sysdeps/powerpc/powerpc64/multiarch/memcpy-a2.S: Define the
 	implementation-specific function name and remove unneeded
 	macros definition.
diff --git a/sysdeps/powerpc/powerpc64/multiarch/memcmp-power4.S b/sysdeps/powerpc/powerpc64/multiarch/memcmp-power4.S
index fa107f14a9..e38b2a9c44 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/memcmp-power4.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/memcmp-power4.S
@@ -18,21 +18,7 @@
 
 #include <sysdep.h>
 
-#undef EALIGN
-#define EALIGN(name, alignt, words)				\
-  .section ".text";						\
-  ENTRY_2(__memcmp_power4)					\
-  .align ALIGNARG(alignt);					\
-  EALIGN_W_##words;						\
-  BODY_LABEL(__memcmp_power4):					\
-  cfi_startproc;						\
-  LOCALENTRY(__memcmp_power4)
-
-#undef END
-#define END(name)						\
-  cfi_endproc;							\
-  TRACEBACK(__memcmp_power4)					\
-  END_2(__memcmp_power4)
+#define MEMCMP __memcmp_power4
 
 #undef libc_hidden_builtin_def
 #define libc_hidden_builtin_def(name)
diff --git a/sysdeps/powerpc/powerpc64/multiarch/memcmp-power7.S b/sysdeps/powerpc/powerpc64/multiarch/memcmp-power7.S
index 0fb597d5e1..a9cc979b92 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/memcmp-power7.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/memcmp-power7.S
@@ -18,21 +18,7 @@
 
 #include <sysdep.h>
 
-#undef EALIGN
-#define EALIGN(name, alignt, words)				\
-  .section ".text";						\
-  ENTRY_2(__memcmp_power7)					\
-  .align ALIGNARG(alignt);					\
-  EALIGN_W_##words;						\
-  BODY_LABEL(__memcmp_power7):					\
-  cfi_startproc;						\
-  LOCALENTRY(__memcmp_power7)
-
-#undef END
-#define END(name)						\
-  cfi_endproc;							\
-  TRACEBACK(__memcmp_power7)					\
-  END_2(__memcmp_power7)
+#define MEMCMP __memcmp_power7
 
 #undef libc_hidden_builtin_def
 #define libc_hidden_builtin_def(name)
diff --git a/sysdeps/powerpc/powerpc64/multiarch/memmove-power7.S b/sysdeps/powerpc/powerpc64/multiarch/memmove-power7.S
index 46dddebf1d..a9435fa654 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/memmove-power7.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/memmove-power7.S
@@ -18,21 +18,7 @@
 
 #include <sysdep.h>
 
-#undef EALIGN
-#define EALIGN(name, alignt, words)				\
-  .section ".text";						\
-  ENTRY_2(__memmove_power7)					\
-  .align ALIGNARG(alignt);					\
-  EALIGN_W_##words;						\
-  BODY_LABEL(__memmove_power7):					\
-  cfi_startproc;						\
-  LOCALENTRY(__memmove_power7)
-
-#undef END_GEN_TB
-#define END_GEN_TB(name, mask)					\
-  cfi_endproc;							\
-  TRACEBACK_MASK(__memmove_power7,mask)				\
-  END_2(__memmove_power7)
+#define MEMMOVE __memmove_power7
 
 #undef libc_hidden_builtin_def
 #define libc_hidden_builtin_def(name)
diff --git a/sysdeps/powerpc/powerpc64/power4/memcmp.S b/sysdeps/powerpc/powerpc64/power4/memcmp.S
index 02e28c45f5..6ca98e909c 100644
--- a/sysdeps/powerpc/powerpc64/power4/memcmp.S
+++ b/sysdeps/powerpc/powerpc64/power4/memcmp.S
@@ -22,8 +22,12 @@
 		    const char *s2 [r4],
 		    size_t size [r5])  */
 
+#ifndef MEMCMP
+# define MEMCMP memcmp
+#endif
+
 	.machine power4
-EALIGN (memcmp, 4, 0)
+EALIGN (MEMCMP, 4, 0)
 	CALL_MCOUNT 3
 
 #define rRTN	r3
@@ -1360,6 +1364,6 @@ L(duzeroLength):
 	li	rRTN, 0
 	blr
 
-END (memcmp)
+END (MEMCMP)
 libc_hidden_builtin_def (memcmp)
 weak_alias (memcmp, bcmp)
diff --git a/sysdeps/powerpc/powerpc64/power7/memcmp.S b/sysdeps/powerpc/powerpc64/power7/memcmp.S
index 75399cb75a..96ce8cee25 100644
--- a/sysdeps/powerpc/powerpc64/power7/memcmp.S
+++ b/sysdeps/powerpc/powerpc64/power7/memcmp.S
@@ -21,9 +21,11 @@
 /* int [r3] memcmp (const char *s1 [r3],
 		    const char *s2 [r4],
 		    size_t size [r5])  */
-
+#ifndef MEMCMP
+# define MEMCMP memcmp
+#endif
 	.machine power7
-EALIGN (memcmp, 4, 0)
+EALIGN (MEMCMP, 4, 0)
 	CALL_MCOUNT 3
 
 #define rRTN		r3
@@ -1054,6 +1056,6 @@ L(duzeroLength):
 	li	rRTN, 0
 	blr
 
-END (memcmp)
+END (MEMCMP)
 libc_hidden_builtin_def (memcmp)
 weak_alias (memcmp, bcmp)
diff --git a/sysdeps/powerpc/powerpc64/power7/memmove.S b/sysdeps/powerpc/powerpc64/power7/memmove.S
index 6afe80a3b6..4c0f7c3571 100644
--- a/sysdeps/powerpc/powerpc64/power7/memmove.S
+++ b/sysdeps/powerpc/powerpc64/power7/memmove.S
@@ -27,8 +27,11 @@
    If source and destiny overlaps, a optimized backwards memcpy is used
    instead.  */
 
+#ifndef MEMMOVE
+# define MEMMOVE memmove
+#endif
 	.machine power7
-EALIGN (memmove, 5, 0)
+EALIGN (MEMMOVE, 5, 0)
 	CALL_MCOUNT 3
 
 L(_memmove):
@@ -816,7 +819,7 @@ L(end_unaligned_loop_bwd):
 	stb	r8,-7(r11)
 	/* Return original DST pointer.  */
 	blr
-END_GEN_TB (memmove, TB_TOCLESS)
+END_GEN_TB (MEMMOVE, TB_TOCLESS)
 libc_hidden_builtin_def (memmove)