about summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc64/power8/strcasestr.S
diff options
context:
space:
mode:
authorWainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com>2017-04-11 14:18:35 -0300
committerTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>2017-04-11 17:13:55 -0300
commitf0748b70a84fc9f08507b58841356e45ea516076 (patch)
treefb9c7b1df135be46cb96b4fffd2970c2388f4da6 /sysdeps/powerpc/powerpc64/power8/strcasestr.S
parent6d15a5c2e9450a1e926d5b4991759e1cfa50fccf (diff)
downloadglibc-f0748b70a84fc9f08507b58841356e45ea516076.tar.gz
glibc-f0748b70a84fc9f08507b58841356e45ea516076.tar.xz
glibc-f0748b70a84fc9f08507b58841356e45ea516076.zip
powerpc: refactor strcasestr and strstr 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/strcasestr-power8.S: Define the
	strcasestr implementation name and remove unneeded macros definition.
	* sysdeps/powerpc/powerpc64/multiarch/strstr-power7.S: Define
	strstr implementation name and remove unneeded macros definition.
	* sysdeps/powerpc/powerpc64/power7/strstr.S: Set a default function
	name if not defined and pass as parameter to macros accordingly.
	* sysdeps/powerpc/powerpc64/power8/strcasestr.S: Likewise.
Diffstat (limited to 'sysdeps/powerpc/powerpc64/power8/strcasestr.S')
-rw-r--r--sysdeps/powerpc/powerpc64/power8/strcasestr.S8
1 files changed, 6 insertions, 2 deletions
diff --git a/sysdeps/powerpc/powerpc64/power8/strcasestr.S b/sysdeps/powerpc/powerpc64/power8/strcasestr.S
index 86f1672893..6ac6572f3b 100644
--- a/sysdeps/powerpc/powerpc64/power8/strcasestr.S
+++ b/sysdeps/powerpc/powerpc64/power8/strcasestr.S
@@ -27,6 +27,10 @@
    fallback to default.  */
 #define ITERATIONS	64
 
+#ifndef STRCASESTR
+# define STRCASESTR __strcasestr
+#endif
+
 #ifndef STRLEN
 /* For builds without IFUNC support, local calls should be made to internal
    GLIBC symbol (created by libc_hidden_builtin_def).  */
@@ -81,7 +85,7 @@
 /* TODO: change this to .machine power8 when the minimum required binutils
    allows it.  */
 	.machine  power7
-EALIGN (__strcasestr, 4, 0)
+EALIGN (STRCASESTR, 4, 0)
 	CALL_MCOUNT 2
 	mflr	r0			/* Load link register LR to r0.  */
 	std	r31, -8(r1)		/* Save callers register r31.  */
@@ -527,7 +531,7 @@ L(end):
 	cfi_restore(r31)
 	mtlr	r0		/* Branch to link register.  */
 	blr
-END (__strcasestr)
+END (STRCASESTR)
 
 weak_alias (__strcasestr, strcasestr)
 libc_hidden_def (__strcasestr)