From 6d15a5c2e9450a1e926d5b4991759e1cfa50fccf Mon Sep 17 00:00:00 2001 From: Wainer dos Santos Moschetta Date: Tue, 11 Apr 2017 14:18:35 -0300 Subject: powerpc: refactor strchr, strchrnul, and strrchr 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/strchr-power7.S: Define the implementation-specific function name and remove unneeded macros definition. * sysdeps/powerpc/powerpc64/multiarch/strchr-power8.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strchr-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strchrnul-power7.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strchrnul-power8.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strrchr-power7.S: Likewise. * sysdeps/powerpc/powerpc64/power7/strchr.S: Set a default function name if not defined and pass as parameter to macros accordingly. * sysdeps/powerpc/powerpc64/power7/strchrnul.S: Likewise. * sysdeps/powerpc/powerpc64/power7/strrchr.S: Likewise. * sysdeps/powerpc/powerpc64/power8/strchr.S: Likewise. * sysdeps/powerpc/powerpc64/strchr.S: Likewise. --- sysdeps/powerpc/powerpc64/power8/strchr.S | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'sysdeps/powerpc/powerpc64/power8') diff --git a/sysdeps/powerpc/powerpc64/power8/strchr.S b/sysdeps/powerpc/powerpc64/power8/strchr.S index 5d6fa5d46e..e0c185c162 100644 --- a/sysdeps/powerpc/powerpc64/power8/strchr.S +++ b/sysdeps/powerpc/powerpc64/power8/strchr.S @@ -19,10 +19,19 @@ #include #ifdef USE_AS_STRCHRNUL -# define FUNC_NAME __strchrnul +# ifndef STRCHRNUL +# define FUNC_NAME __strchrnul +# else +# define FUNC_NAME STRCHRNUL +# endif #else -# define FUNC_NAME strchr -#endif +# ifndef STRCHR +# define FUNC_NAME strchr +# else +# define FUNC_NAME STRCHR +# endif +#endif /* !USE_AS_STRCHRNUL */ + /* int [r3] strchr (char *s [r3], int c [r4]) */ /* TODO: change these to the actual instructions when the minimum required binutils allows it. */ -- cgit 1.4.1