public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: refactor strrchr IFUNC
@ 2017-06-13  7:01 Rajalakshmi Srinivasaraghavan
  2017-06-20 21:13 ` Tulio Magno Quites Machado Filho
  0 siblings, 1 reply; 2+ messages in thread
From: Rajalakshmi Srinivasaraghavan @ 2017-06-13  7:01 UTC (permalink / raw)
  To: libc-alpha; +Cc: Rajalakshmi Srinivasaraghavan

As done in commit 6d15a5c2e9450a1e926d5b4991759e1cfa50fccf
clean up IFUNC implementation for power8 in order to remove
unneeded macro definitions.

2017-06-13  Rajalakshmi Srinivasaraghavan  <raji@linux.vnet.ibm.com>

	* sysdeps/powerpc/powerpc64/multiarch/strchr-power8.S(STRRCHR): Define
	the implementation-specific function name and remove unneeded macros
	definition.
	* sysdeps/powerpc/powerpc64/power8/strrchr.S(STRRCHR): Set a default
	function name if not defined and pass as parameter to macros
	accordingly.
---
 sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S | 15 +--------------
 sysdeps/powerpc/powerpc64/power8/strrchr.S           |  8 ++++++--
 2 files changed, 7 insertions(+), 16 deletions(-)

diff --git a/sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S b/sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S
index 23365a1..63080f5 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S
@@ -18,20 +18,7 @@
 
 #include <sysdep.h>
 
-#undef ENTRY
-#define ENTRY(name)						\
-  .section ".text";						\
-  ENTRY_2(__strrchr_power8)					\
-  .align ALIGNARG(2);						\
-  BODY_LABEL(__strrchr_power8):					\
-  cfi_startproc;						\
-  LOCALENTRY(__strrchr_power8)
-
-#undef END
-#define END(name)						\
-  cfi_endproc;							\
-  TRACEBACK(__strrchr_power8)					\
-  END_2(__strrchr_power8)
+#define STRRCHR __strrchr_power8
 
 #undef libc_hidden_builtin_def
 #define libc_hidden_builtin_def(name)
diff --git a/sysdeps/powerpc/powerpc64/power8/strrchr.S b/sysdeps/powerpc/powerpc64/power8/strrchr.S
index 8eb7485..d3cb0bc 100644
--- a/sysdeps/powerpc/powerpc64/power8/strrchr.S
+++ b/sysdeps/powerpc/powerpc64/power8/strrchr.S
@@ -76,8 +76,12 @@
 1: \
 	vsumsws	v2, v2, v0;
 #endif	/* !__LITTLE_ENDIAN__  */
+
+#ifndef STRRCHR
+# define STRRCHR strrchr
+#endif
 	.machine  power7
-ENTRY (strrchr)
+ENTRY (STRRCHR)
 	CALL_MCOUNT 2
 	dcbt	0,r3
 	clrrdi	r8,r3,3	      /* Align the address to doubleword boundary.  */
@@ -459,6 +463,6 @@ L(continue1):
 #endif
 	add	r3, r3, r6      /* Compute final length.  */
 	blr
-END (strrchr)
+END (STRRCHR)
 weak_alias (strrchr, rindex)
 libc_hidden_builtin_def (strrchr)
-- 
2.7.4

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] powerpc: refactor strrchr IFUNC
  2017-06-13  7:01 [PATCH] powerpc: refactor strrchr IFUNC Rajalakshmi Srinivasaraghavan
@ 2017-06-20 21:13 ` Tulio Magno Quites Machado Filho
  0 siblings, 0 replies; 2+ messages in thread
From: Tulio Magno Quites Machado Filho @ 2017-06-20 21:13 UTC (permalink / raw)
  To: Rajalakshmi Srinivasaraghavan, libc-alpha

Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com> writes:

> As done in commit 6d15a5c2e9450a1e926d5b4991759e1cfa50fccf
> clean up IFUNC implementation for power8 in order to remove
> unneeded macro definitions.
>
> 2017-06-13  Rajalakshmi Srinivasaraghavan  <raji@linux.vnet.ibm.com>
>
> 	* sysdeps/powerpc/powerpc64/multiarch/strchr-power8.S(STRRCHR): Define
> 	the implementation-specific function name and remove unneeded macros
> 	definition.
> 	* sysdeps/powerpc/powerpc64/power8/strrchr.S(STRRCHR): Set a default
> 	function name if not defined and pass as parameter to macros
> 	accordingly.

This cleanup is definitely useful, but your patch came in at the same
time of another patch that rewrote these files.
Could you rebase your patch, please?

-- 
Tulio Magno

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-20 21:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-13  7:01 [PATCH] powerpc: refactor strrchr IFUNC Rajalakshmi Srinivasaraghavan
2017-06-20 21:13 ` Tulio Magno Quites Machado Filho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).