IBM SA14-2339-04 Personal Computer User Manual


 
B-38 PPC405 Core User’s Manual
B.8 Branch Instructions
The architecture provides conditional and unconditional branches to any storage location. The
conditional branch instructions test condition codes set previously and branch accordingly.
Conditional branch instructions may decrement and test the Count Register (CTR) as part of
determination of the branch condition and may save the return address in the Link Register (LR). The
target address for a branch may be a displacement from the current instruction address (CIA), or may
be contained in the LR or CTR, or may be an absolute address.
Table B-9. Branch Instructions
Mnemonic Operands Function
Other Registers
Changed Page
b target Branch unconditional relative.
LI
(target – CIA)
6:29
NIA CIA + EXTS(LI ||
2
0)
9-19
ba Branch unconditional absolute.
LI
target
6:29
NIA EXTS(LI ||
2
0)
bl Branch unconditional relative.
LI
(target – CIA)
6:29
NIA CIA + EXTS(LI ||
2
0)
(LR)
CIA + 4.
bla Branch unconditional absolute.
LI
target
6:29
NIA EXTS(LI ||
2
0)
(LR)
CIA + 4.
bc BO, BI, target Branch conditional relative.
BD
(target – CIA)
16:29
NIA CIA + EXTS(BD ||
2
0)
CTR if BO
2
= 0. 9-20
bca Branch conditional absolute.
BD
target
16:29
NIA EXTS(BD ||
2
0)
CTR if BO
2
= 0.
bcl Branch conditional relative.
BD
(target – CIA)
16:29
NIA CIA + EXTS(BD ||
2
0)
CTR if BO
2
= 0.
(LR)
CIA + 4.
bcla Branch conditional absolute.
BD
target
16:29
NIA EXTS(BD ||
2
0)
CTR if BO
2
= 0.
(LR)
CIA + 4.
bcctr BO, BI Branch conditional to address in CTR.
Using (CTR) at exit from instruction,
NIA
CTR
0:29
||
2
0.
CTR if BO
2
= 0. 9-26
bcctrl CTR if BO
2
= 0.
(LR)
CIA + 4.
bclr BO, BI Branch conditional to address in LR.
Using (LR) at entry to instruction,
NIA
LR
0:29
||
2
0.
CTR if BO
2
= 0. 9-30
bclrl CTR if BO
2
= 0.
(LR)
CIA + 4.