powerpc: Use latest optimizations for internal function calls

Message ID 1486360877-667-1-git-send-email-raji@linux.vnet.ibm.com
State Committed
Headers

Commit Message

Rajalakshmi S Feb. 6, 2017, 6:01 a.m. UTC
  Some of the power8 strings optimizations are not updated to use the latest
version of other string optimizations.

Tested on powerpc64 and powerpc64le.

2017-02-05  Rajalakshmi Srinivasaraghavan  <raji@linux.vnet.ibm.com>

	* sysdeps/powerpc/powerpc64/multiarch/strcasestr-power8.S: Redefine
	STRCHR as __strchr_power8.
	* sysdeps/powerpc/powerpc64/multiarch/strcat-power8.c: Redefine
	strlen as __strlen_power8.
---
 sysdeps/powerpc/powerpc64/multiarch/strcasestr-power8.S | 2 +-
 sysdeps/powerpc/powerpc64/multiarch/strcat-power8.c     | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
  

Comments

Carlos Eduardo Seo Feb. 6, 2017, 2:07 p.m. UTC | #1
On 2/6/17, 4:01 AM, "Rajalakshmi Srinivasaraghavan" <libc-alpha-owner@sourceware.org on behalf of raji@linux.vnet.ibm.com> wrote:

    Some of the power8 strings optimizations are not updated to use the latest
    version of other string optimizations.
    
    Tested on powerpc64 and powerpc64le.
    

LGTM.


--
Carlos Eduardo Seo
Software Engineer - Linux on Power Toolchain
cseo@linux.vnet.ibm.com
  

Patch

diff --git a/sysdeps/powerpc/powerpc64/multiarch/strcasestr-power8.S b/sysdeps/powerpc/powerpc64/multiarch/strcasestr-power8.S
index f188c45..5a0eb9c 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strcasestr-power8.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/strcasestr-power8.S
@@ -44,6 +44,6 @@ 
 /* strnlen is used to check if len of r3 is more than r4.  */
 #define STRNLEN __strnlen_power7
 /* strchr is used to check if first char of r4 is present in r3.  */
-#define STRCHR __strchr_power7
+#define STRCHR __strchr_power8
 
 #include <sysdeps/powerpc/powerpc64/power8/strcasestr.S>
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strcat-power8.c b/sysdeps/powerpc/powerpc64/multiarch/strcat-power8.c
index d6e69b1..f138bee 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strcat-power8.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strcat-power8.c
@@ -23,8 +23,8 @@ 
 #define libc_hidden_def(name)
 
 extern typeof (strcpy) __strcpy_power8;
-extern typeof (strlen) __strlen_power7;
+extern typeof (strlen) __strlen_power8;
 
 #define strcpy __strcpy_power8
-#define strlen __strlen_power7
+#define strlen __strlen_power8
 #include <string/strcat.c>