]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
powerpc/8xx: Duplicate two insns instead of branching
authorLEROY Christophe <christophe.leroy@c-s.fr>
Fri, 29 Aug 2014 09:14:39 +0000 (11:14 +0200)
committerScott Wood <scottwood@freescale.com>
Fri, 5 Sep 2014 00:28:56 +0000 (19:28 -0500)
Branching takes two cycles on MPC8xx. Lets duplicate the two instructions
and avoid the branching.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Scott Wood <scottwood@freescale.com>
arch/powerpc/kernel/head_8xx.S

index 1bdd7c13ddc17c9e028edef6e6b5a1f7384756b8..fafff8dbd5d990175874d9ca09e40a44085be525 100644 (file)
@@ -644,9 +644,11 @@ modified_instr:
 
        /* special handling for r10,r11 since these are modified already */
 153:   mfspr   r11, SPRN_SPRG_SCRATCH1 /* load r11 from SPRN_SPRG_SCRATCH1 */
-       b       155f
+       add     r10, r10, r11   /* add it */
+       mfctr   r11             /* restore r11 */
+       b       151b
 154:   mfspr   r11, SPRN_SPRG_SCRATCH0 /* load r10 from SPRN_SPRG_SCRATCH0 */
-155:   add     r10, r10, r11   /* add it */
+       add     r10, r10, r11   /* add it */
        mfctr   r11             /* restore r11 */
        b       151b
 #endif