aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/powerpc
diff options
context:
space:
mode:
authorWill Schmidt <will_schmidt@vnet.ibm.com>2011-09-07 21:56:57 -0400
committerUlrich Drepper <drepper@gmail.com>2011-09-07 21:56:57 -0400
commit2270037782b05f2973372fe12f6e8d2a8c413188 (patch)
treecc3855afd057f3ce5d1b130461050b200619eede /sysdeps/powerpc
parent5025581e1c66a184a587ab1bd99cd168e8fb7770 (diff)
downloadglibc-2270037782b05f2973372fe12f6e8d2a8c413188.tar
glibc-2270037782b05f2973372fe12f6e8d2a8c413188.tar.gz
glibc-2270037782b05f2973372fe12f6e8d2a8c413188.tar.bz2
glibc-2270037782b05f2973372fe12f6e8d2a8c413188.zip
power7 strncmp optimization
Diffstat (limited to 'sysdeps/powerpc')
-rw-r--r--sysdeps/powerpc/powerpc32/power7/strncmp.S4
-rw-r--r--sysdeps/powerpc/powerpc64/power7/strncmp.S4
2 files changed, 6 insertions, 2 deletions
diff --git a/sysdeps/powerpc/powerpc32/power7/strncmp.S b/sysdeps/powerpc/powerpc32/power7/strncmp.S
index 6a1422a7c8..bcd13b6fa6 100644
--- a/sysdeps/powerpc/powerpc32/power7/strncmp.S
+++ b/sysdeps/powerpc/powerpc32/power7/strncmp.S
@@ -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
diff --git a/sysdeps/powerpc/powerpc64/power7/strncmp.S b/sysdeps/powerpc/powerpc64/power7/strncmp.S
index 498b19c71c..4c02b115ac 100644
--- a/sysdeps/powerpc/powerpc64/power7/strncmp.S
+++ b/sysdeps/powerpc/powerpc64/power7/strncmp.S
@@ -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