Commit 87a156fb authored by Anton Blanchard's avatar Anton Blanchard Committed by Michael Ellerman

powerpc: Align hot loops of some string functions

Align the hot loops in our assembly implementation of strncpy(),
strncmp() and memchr().
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 3ece1663
...@@ -24,6 +24,7 @@ _GLOBAL(strncpy) ...@@ -24,6 +24,7 @@ _GLOBAL(strncpy)
mtctr r5 mtctr r5
addi r6,r3,-1 addi r6,r3,-1
addi r4,r4,-1 addi r4,r4,-1
.balign 16
1: lbzu r0,1(r4) 1: lbzu r0,1(r4)
cmpwi 0,r0,0 cmpwi 0,r0,0
stbu r0,1(r6) stbu r0,1(r6)
...@@ -42,6 +43,7 @@ _GLOBAL(strncmp) ...@@ -42,6 +43,7 @@ _GLOBAL(strncmp)
mtctr r5 mtctr r5
addi r5,r3,-1 addi r5,r3,-1
addi r4,r4,-1 addi r4,r4,-1
.balign 16
1: lbzu r3,1(r5) 1: lbzu r3,1(r5)
cmpwi 1,r3,0 cmpwi 1,r3,0
lbzu r0,1(r4) lbzu r0,1(r4)
...@@ -73,6 +75,7 @@ _GLOBAL(memchr) ...@@ -73,6 +75,7 @@ _GLOBAL(memchr)
beq- 2f beq- 2f
mtctr r5 mtctr r5
addi r3,r3,-1 addi r3,r3,-1
.balign 16
1: lbzu r0,1(r3) 1: lbzu r0,1(r3)
cmpw 0,r0,r4 cmpw 0,r0,r4
bdnzf 2,1b bdnzf 2,1b
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment