]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Provide a throughput boost to the 64-bit power7 strncmp code of approx
authorWill Schmidt <will_schmidt@vnet.ibm.com>
Thu, 18 Aug 2011 16:01:44 +0000 (11:01 -0500)
committerRyan S. Arnold <rsa@us.ibm.com>
Mon, 12 Sep 2011 21:33:08 +0000 (16:33 -0500)
15%.  The 32-bit throughput is not notably affected by this change, so
the change to the 32-bit code is done to keep the two files in sync
with each other.

ChangeLog
sysdeps/powerpc/powerpc32/power7/strncmp.S
sysdeps/powerpc/powerpc64/power7/strncmp.S

index afdd8833ffe880bc307a6265ae77c2bf1b3c2f36..3c29d6ba1c88bc66c2c5d5daf153e1e69a9ecb90 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-08-04  Will Schmidt  <will_schmidt@vnet.ibm.com>
+
+       * sysdeps/powerpc/powerpc32/power7/strncmp.S: Adjust the alignment
+       and add nop instructions for throughput optimization.
+       * sysdeps/powerpc/powerpc64/power7/strncmp.S: Adjust the alignment
+       and nop instructions for throughput optimization.
+
 2011-08-01  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
 
        * sysdeps/powerpc/fpu/e_hypot.c: New file: hypot optimized for POWER.
index ba72d0a029e89a925967bd1c20951c2d6cb5ba9d..61b33c3c36dfe3edd3fb33256bc8e02719782174 100644 (file)
@@ -27,7 +27,7 @@
                     const char *s2 [r4],
                     size_t size [r5])  */
 
-EALIGN (BP_SYM(strncmp),4,0)
+EALIGN (BP_SYM(strncmp),5,0)
 
 #define rTMP   r0
 #define rRTN   r3
@@ -47,9 +47,11 @@ EALIGN (BP_SYM(strncmp),4,0)
 #define rBITDIF        r11     /* bits that differ in s1 & s2 words */
 
        dcbt    0,rSTR1
+       nop
        or      rTMP,rSTR2,rSTR1
        lis     r7F7F,0x7f7f
        dcbt    0,rSTR2
+       nop
        clrlwi. rTMP,rTMP,30
        cmplwi  cr1,rN,0
        lis     rFEFE,-0x101
index 34f1e52df96dc252f6afb3530e59318b2f78c2b8..bba44455c32defb1688ccdd2d6d5e67b871238b4 100644 (file)
@@ -27,7 +27,7 @@
                     const char *s2 [r4],
                     size_t size [r5])  */
 
-EALIGN (BP_SYM(strncmp),4,0)
+EALIGN (BP_SYM(strncmp),5,0)
        CALL_MCOUNT 3
 
 #define rTMP   r0
@@ -48,9 +48,11 @@ EALIGN (BP_SYM(strncmp),4,0)
 #define rBITDIF        r11     /* bits that differ in s1 & s2 words */
 
        dcbt    0,rSTR1
+       nop
        or      rTMP,rSTR2,rSTR1
        lis     r7F7F,0x7f7f
        dcbt    0,rSTR2
+       nop
        clrldi. rTMP,rTMP,61
        cmpldi  cr1,rN,0
        lis     rFEFE,-0x101