[POWERPC] Use mtocrf instruction in asm when CONFIG_POWER4_ONLY=y
mtocrf is a faster single-field mtcrf (move to condition register fields) instruction available in POWER4 and later processors. It can make quite a difference in performance on some implementations, so use it for CONFIG_POWER4_ONLY builds. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:

committed by
Paul Mackerras

parent
569975591c
commit
3467bfd340
@@ -19,7 +19,7 @@ _GLOBAL(memset)
|
||||
rlwimi r4,r4,16,0,15
|
||||
cmplw cr1,r5,r0 /* do we get that far? */
|
||||
rldimi r4,r4,32,0
|
||||
mtcrf 1,r0
|
||||
PPC_MTOCRF 1,r0
|
||||
mr r6,r3
|
||||
blt cr1,8f
|
||||
beq+ 3f /* if already 8-byte aligned */
|
||||
@@ -49,7 +49,7 @@ _GLOBAL(memset)
|
||||
bdnz 4b
|
||||
5: srwi. r0,r5,3
|
||||
clrlwi r5,r5,29
|
||||
mtcrf 1,r0
|
||||
PPC_MTOCRF 1,r0
|
||||
beq 8f
|
||||
bf 29,6f
|
||||
std r4,0(r6)
|
||||
@@ -65,7 +65,7 @@ _GLOBAL(memset)
|
||||
std r4,0(r6)
|
||||
addi r6,r6,8
|
||||
8: cmpwi r5,0
|
||||
mtcrf 1,r5
|
||||
PPC_MTOCRF 1,r5
|
||||
beqlr+
|
||||
bf 29,9f
|
||||
stw r4,0(r6)
|
||||
|
Reference in New Issue
Block a user