From 3bc426e156c6952a1b7e32435c308aaab76616a1 Mon Sep 17 00:00:00 2001 From: Wainer dos Santos Moschetta Date: Tue, 11 Apr 2017 14:18:34 -0300 Subject: 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. --- sysdeps/powerpc/powerpc64/power7/strcmp.S | 8 ++++++-- sysdeps/powerpc/powerpc64/power7/strncmp.S | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'sysdeps/powerpc/powerpc64/power7') diff --git a/sysdeps/powerpc/powerpc64/power7/strcmp.S b/sysdeps/powerpc/powerpc64/power7/strcmp.S index e468103ddc..14e14f457e 100644 --- a/sysdeps/powerpc/powerpc64/power7/strcmp.S +++ b/sysdeps/powerpc/powerpc64/power7/strcmp.S @@ -23,10 +23,14 @@ #include +#ifndef STRCMP +# define STRCMP strcmp +#endif + /* int [r3] strcmp (const char *s1 [r3], const char *s2 [r4]) */ .machine power7 -EALIGN (strcmp, 4, 0) +EALIGN (STRCMP, 4, 0) CALL_MCOUNT 2 or r9, r3, r4 @@ -160,5 +164,5 @@ L(diffOfNULL): extsw r3, r10 /* sign extend result */ blr /* return */ -END (strcmp) +END (STRCMP) libc_hidden_builtin_def (strcmp) diff --git a/sysdeps/powerpc/powerpc64/power7/strncmp.S b/sysdeps/powerpc/powerpc64/power7/strncmp.S index 6a03da5f2b..d53b31be8e 100644 --- a/sysdeps/powerpc/powerpc64/power7/strncmp.S +++ b/sysdeps/powerpc/powerpc64/power7/strncmp.S @@ -18,13 +18,17 @@ #include +#ifndef STRNCMP +# define STRNCMP strncmp +#endif + /* See strlen.s for comments on how the end-of-string testing works. */ /* int [r3] strncmp (const char *s1 [r3], const char *s2 [r4], size_t size [r5]) */ -EALIGN (strncmp,5,0) +EALIGN (STRNCMP,5,0) CALL_MCOUNT 3 #define rTMP2 r0 @@ -219,5 +223,5 @@ L(u4): sub rRTN,rWORD1,rWORD2 L(ux): li rRTN,0 blr -END (strncmp) +END (STRNCMP) libc_hidden_builtin_def (strncmp) -- cgit v1.2.1