AMCC Proprietary 51
Revision 1.02 - September 10, 2007
PPC405 Processor
Preliminary User’s Manual
2.7.3 Conditional Branch Condition Register Testing
Conditional branch instructions can test a CR bit. The value of the BI field specifies the bit to be tested (bit 0–31).
The BO field controls whether the CR bit is tested, as described in the following section.
2.7.4 BO Field on Conditional Branches
The BO field of the conditional branch instruction specifies the conditions used to control branching, and specifies
how the branch affects the CTR.
Conditional branch instructions can test one bit in the CR. This option is selected when BO[0] = 0; if BO[0] = 1, the
CR does not participate in the branch condition test. If this option is selected, the condition is satisfied (branch can
occur) if CR[BI] = BO[1].
Conditional branch instructions can decrement the CTR by one, and after the decrement, test the CTR value. This
option is selected when BO[2] = 0. If this option is selected, BO[3] specifies the condition that must be satisfied to
allow a branch to be taken. If BO[3] = 0, CTR ≠ 0 is required for a branch to occur. If BO[3] = 1, CTR = 0 is required
for a branch to occur.
If BO[2] = 1, the contents of the CTR are left unchanged, and the CTR does not participate in the branch condition
test.
Table 2-8 summarizes the usage of the bits of the BO field. BO[4] is further discussed in “Branch Prediction on
page 52.
Table 2-8. Bits of the BO Field
BO Bit Description
BO[0]
CR Test Control
0 Test CR bit specified by BI field for value specified by BO[1]
1 Do not test CR
BO[1]
CR Test Value
0 Test for CR[BI] = 0.
1 Test for CR[BI] = 1.
BO[2]
CTR Test Control
0 Decrement CTR by one and test whether CTR satisfies the condition specified by BO[3].
1 Do not change CTR, do not test CTR.
BO[3]
CTR Test Value
0 Test for CTR
≠ 0.
1 Test for CTR = 0.
BO[4]
Branch Prediction Reversal
0 Apply standard branch prediction.
1 Reverse the standard branch prediction.