about summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc64/power7/memrchr.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
commitff06a55aef1a1826dadcebfee8baeaa10ce705a0 (patch)
tree36da2d7e166f6165abedca5413d0485749500b94 /sysdeps/powerpc/powerpc64/power7/memrchr.S
parent18e0054bf7c57cb5e6b90961be167164d58b1098 (diff)
downloadglibc-ff06a55aef1a1826dadcebfee8baeaa10ce705a0.tar.gz
glibc-ff06a55aef1a1826dadcebfee8baeaa10ce705a0.tar.xz
glibc-ff06a55aef1a1826dadcebfee8baeaa10ce705a0.zip
powerpc: refactor memchr, memrchr, and rawmemchr 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/memchr-power7.S: Define the
	implementation-specific function name and remove unneeded macros
	definition.
	* sysdeps/powerpc/powerpc64/multiarch/memrchr-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/rawmemchr-power7.S: Likewise.
	* sysdeps/powerpc/powerpc64/power7/memchr.S: Set a default
	function name if not defined and pass as parameter to macros
	accordingly.
	* sysdeps/powerpc/powerpc64/power7/memrchr.S: Likewise.
	* sysdeps/powerpc/powerpc64/power7/rawmemchr.S: Likewise.
Diffstat (limited to 'sysdeps/powerpc/powerpc64/power7/memrchr.S')
-rw-r--r--sysdeps/powerpc/powerpc64/power7/memrchr.S8
1 files changed, 6 insertions, 2 deletions
diff --git a/sysdeps/powerpc/powerpc64/power7/memrchr.S b/sysdeps/powerpc/powerpc64/power7/memrchr.S
index 4e86400437..4276768915 100644
--- a/sysdeps/powerpc/powerpc64/power7/memrchr.S
+++ b/sysdeps/powerpc/powerpc64/power7/memrchr.S
@@ -20,8 +20,12 @@
 #include <sysdep.h>
 
 /* int [r3] memrchr (char *s [r3], int byte [r4], int size [r5])  */
+
+#ifndef MEMRCHR
+# define MEMRCHR __memrchr
+#endif
 	.machine  power7
-ENTRY (__memrchr)
+ENTRY (MEMRCHR)
 	CALL_MCOUNT 3
 	add	r7,r3,r5      /* Calculate the last acceptable address.  */
 	neg	r0,r7
@@ -192,6 +196,6 @@ L(loop_small):
 	bne	L(loop_small)
 	blr
 
-END (__memrchr)
+END (MEMRCHR)
 weak_alias (__memrchr, memrchr)
 libc_hidden_builtin_def (memrchr)