diff options
author | Wainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com> | 2017-04-11 14:18:35 -0300 |
---|---|---|
committer | Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com> | 2017-04-11 17:13:54 -0300 |
commit | 6d15a5c2e9450a1e926d5b4991759e1cfa50fccf (patch) | |
tree | 78e5427f0c10d9050c7f3d8209f36006948713aa /sysdeps/powerpc/powerpc64/power7/strchrnul.S | |
parent | 001649fd18712a8d508a21781e8059ef1e9bcecf (diff) | |
download | glibc-6d15a5c2e9450a1e926d5b4991759e1cfa50fccf.tar.gz |
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.
Diffstat (limited to 'sysdeps/powerpc/powerpc64/power7/strchrnul.S')
-rw-r--r-- | sysdeps/powerpc/powerpc64/power7/strchrnul.S | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sysdeps/powerpc/powerpc64/power7/strchrnul.S b/sysdeps/powerpc/powerpc64/power7/strchrnul.S index 99aa1576ff..27bc1f0682 100644 --- a/sysdeps/powerpc/powerpc64/power7/strchrnul.S +++ b/sysdeps/powerpc/powerpc64/power7/strchrnul.S @@ -19,9 +19,12 @@ #include <sysdep.h> +#ifndef STRCHRNUL +# define STRCHRNUL __strchrnul +#endif /* int [r3] strchrnul (char *s [r3], int c [r4]) */ .machine power7 -ENTRY (__strchrnul) +ENTRY (STRCHRNUL) CALL_MCOUNT 2 dcbt 0,r3 clrrdi r8,r3,3 /* Align the address to doubleword boundary. */ @@ -123,6 +126,6 @@ L(done): srdi r0,r0,3 /* Convert leading zeros to bytes. */ add r3,r8,r0 /* Return address of matching c/null byte. */ blr -END (__strchrnul) -weak_alias (__strchrnul,strchrnul) -libc_hidden_builtin_def (__strchrnul) +END (STRCHRNUL) +weak_alias (STRCHRNUL, strchrnul) +libc_hidden_builtin_def (STRCHRNUL) |