Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/8xx: Duplicate two insns instead of branching

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>

authored by

LEROY Christophe and committed by
Scott Wood
111e32b2 41cacac6

+4 -2
+4 -2
arch/powerpc/kernel/head_8xx.S
··· 644 644 645 645 /* special handling for r10,r11 since these are modified already */ 646 646 153: mfspr r11, SPRN_SPRG_SCRATCH1 /* load r11 from SPRN_SPRG_SCRATCH1 */ 647 - b 155f 647 + add r10, r10, r11 /* add it */ 648 + mfctr r11 /* restore r11 */ 649 + b 151b 648 650 154: mfspr r11, SPRN_SPRG_SCRATCH0 /* load r10 from SPRN_SPRG_SCRATCH0 */ 649 - 155: add r10, r10, r11 /* add it */ 651 + add r10, r10, r11 /* add it */ 650 652 mfctr r11 /* restore r11 */ 651 653 b 151b 652 654 #endif