about summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc64/power8
diff options
context:
space:
mode:
authorWainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com>2017-04-11 14:18:34 -0300
committerTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>2017-04-11 17:13:54 -0300
commit3bc426e156c6952a1b7e32435c308aaab76616a1 (patch)
treec9592b0d03ce0acd5aa1fd9e9828187d9c7b46a4 /sysdeps/powerpc/powerpc64/power8
parentdbcc7d089390f53ec90c1cbd3bea165b924a023a (diff)
downloadglibc-3bc426e156c6952a1b7e32435c308aaab76616a1.tar.gz
glibc-3bc426e156c6952a1b7e32435c308aaab76616a1.tar.xz
glibc-3bc426e156c6952a1b7e32435c308aaab76616a1.zip
powerpc: refactor strcasecmp, strcmp, and strncmp 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/strcasecmp_l-power7.S: Define
	the implementation-specific function name and remove unneeded
	macros definition.
	* sysdeps/powerpc/powerpc64/multiarch/strcmp-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strcmp-power8.S Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strcmp-power9.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strcmp-ppc64.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strncmp-power4.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strncmp-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strncmp-power8.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strncmp-power9.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/strncmp-ppc64.S: Likewise.
	* sysdeps/powerpc/powerpc64/power4/strncmp.S: Set a default function
	name if not defined and pass as parameter to macros accordingly.
	* sysdeps/powerpc/powerpc64/power7/strcmp.S: Likewise.
	* sysdeps/powerpc/powerpc64/power7/strncmp.S: Likewise.
	* sysdeps/powerpc/powerpc64/power8/strcmp.S: Likewise.
	* sysdeps/powerpc/powerpc64/power8/strncmp.S: Likewise.
	* sysdeps/powerpc/powerpc64/power9/strcmp.S: Likewise.
	* sysdeps/powerpc/powerpc64/power9/strncmp.S: Likewise.
	* sysdeps/powerpc/powerpc64/strcmp.S: Likewise.
	* sysdeps/powerpc/powerpc64/strncmp.S: Likewise.
Diffstat (limited to 'sysdeps/powerpc/powerpc64/power8')
-rw-r--r--sysdeps/powerpc/powerpc64/power8/strcmp.S8
-rw-r--r--sysdeps/powerpc/powerpc64/power8/strncmp.S8
2 files changed, 12 insertions, 4 deletions
diff --git a/sysdeps/powerpc/powerpc64/power8/strcmp.S b/sysdeps/powerpc/powerpc64/power8/strcmp.S
index d46bff80cd..770484f1e1 100644
--- a/sysdeps/powerpc/powerpc64/power8/strcmp.S
+++ b/sysdeps/powerpc/powerpc64/power8/strcmp.S
@@ -18,6 +18,10 @@
 
 #include <sysdep.h>
 
+#ifndef STRCMP
+# define STRCMP strcmp
+#endif
+
 /* Implements the function
 
    size_t [r3] strcmp (const char *s1 [r3], const char *s2 [r4])
@@ -27,7 +31,7 @@
    64K as default, the page cross handling assumes minimum page size of
    4k.  */
 
-EALIGN (strcmp, 4, 0)
+EALIGN (STRCMP, 4, 0)
 	li	r0,0
 
 	/* Check if [s1]+16 or [s2]+16 will cross a 4K page boundary using
@@ -239,5 +243,5 @@ L(pagecross_retdiff):
 L(pagecross_nullfound):
 	li	r3,0
 	b	L(pagecross_retdiff)
-END (strcmp)
+END (STRCMP)
 libc_hidden_builtin_def (strcmp)
diff --git a/sysdeps/powerpc/powerpc64/power8/strncmp.S b/sysdeps/powerpc/powerpc64/power8/strncmp.S
index b93a16edc7..3d8df90538 100644
--- a/sysdeps/powerpc/powerpc64/power8/strncmp.S
+++ b/sysdeps/powerpc/powerpc64/power8/strncmp.S
@@ -18,6 +18,10 @@
 
 #include <sysdep.h>
 
+#ifndef STRNCMP
+# define STRNCMP strncmp
+#endif
+
 /* Implements the function
 
    int [r3] strncmp (const char *s1 [r3], const char *s2 [r4], size_t [r5] n)
@@ -28,7 +32,7 @@
    4k.  */
 
 	.machine  power7
-EALIGN (strncmp, 4, 0)
+EALIGN (STRNCMP, 4, 0)
 	/* Check if size is 0.  */
 	mr.	r10,r5
 	beq	cr0,L(ret0)
@@ -319,5 +323,5 @@ L(byte_ne_4):
 	extsw	r10,r9
 	mr	r9,r8
 	b	L(size_reached_1)
-END(strncmp)
+END(STRNCMP)
 libc_hidden_builtin_def(strncmp)