AMCC Proprietary 425
Revision 1.02 - September 10, 2007
PPC405 Processor
Preliminary User’s Manual
B.9 Comparison Instructions
Comparison instructions perform arithmetic and logical comparisons between two operands and set one of the
eight condition code register fields based on the outcome of the comparison. Table B-10 shows the comparison
instructions supported by the PPC405.
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)
174
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. 175
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. 181
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. 184
bclrl CTR if BO
2
= 0.
(LR) ← CIA + 4.
Table B-10. Comparison Instructions
Mnemonic Operands Function
Other Registers
Changed
Page
cmp BF, 0, RA, RB Compare (RA) to (RB), signed.
Results in CR[CRn], where
n = BF.
188
cmpi BF, 0, RA, IM Compare (RA) to EXTS(IM), signed.
Results in CR[CRn], where
n = BF.
189
cmpl BF, 0, RA, RB Compare (RA) to (RB), unsigned.
Results in CR[CRn], where
n = BF.
190