summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/lib
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2016-05-26 00:39:55 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2016-06-14 05:58:25 +0200
commit87a156fb18fe15d012c3db506b6b8b001af2e58d (patch)
tree186a46983103697a7cb68f6dd3023eda7ba92c97 /arch/powerpc/lib
parentpowerpc: Remove assembly versions of strcpy, strcat, strlen and strcmp (diff)
downloadlinux-87a156fb18fe15d012c3db506b6b8b001af2e58d.tar.xz
linux-87a156fb18fe15d012c3db506b6b8b001af2e58d.zip
powerpc: Align hot loops of some string functions
Align the hot loops in our assembly implementation of strncpy(), strncmp() and memchr(). Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/lib')
-rw-r--r--arch/powerpc/lib/string.S3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/lib/string.S b/arch/powerpc/lib/string.S
index a9470567df47..beabc68d9a1e 100644
--- a/arch/powerpc/lib/string.S
+++ b/arch/powerpc/lib/string.S
@@ -24,6 +24,7 @@ _GLOBAL(strncpy)
mtctr r5
addi r6,r3,-1
addi r4,r4,-1
+ .balign 16
1: lbzu r0,1(r4)
cmpwi 0,r0,0
stbu r0,1(r6)
@@ -42,6 +43,7 @@ _GLOBAL(strncmp)
mtctr r5
addi r5,r3,-1
addi r4,r4,-1
+ .balign 16
1: lbzu r3,1(r5)
cmpwi 1,r3,0
lbzu r0,1(r4)
@@ -73,6 +75,7 @@ _GLOBAL(memchr)
beq- 2f
mtctr r5
addi r3,r3,-1
+ .balign 16
1: lbzu r0,1(r3)
cmpw 0,r0,r4
bdnzf 2,1b