User’s Manual
Preliminary PPC440x5 CPU Core
prgmodel.fm.
September 12, 2002
Page 65 of 589
Table 2-22 summarizes the usage of the bits of the BO field. BO[4] is further discussed in Branch Prediction
on page 65
Table 2-23 lists specific BO field contents, and the resulting actions; z represents a mandatory value of zero,
and y is a branch prediction option discussed in Branch Prediction on page 65
2.5.4 Branch Prediction
Conditional branches might be taken or not taken; if taken, instruction fetching is re-directed to the target
address. If the branch is not taken, instruction fetching simply falls through to the next sequential instruction.
The PPC440x5 core attempts to predict whether or not a branch is taken before all information necessary to
determine the branch direction is available. This action is called branch prediction. The core can then
prefetch instructions down the predicted path. If the prediction is correct, performance is improved because
the branch target instruction is available immediately, instead of having to wait until the branch conditions are
resolved. If the prediction is incorrect, then the prefetched instructions (which were fetched from addresses
down the “wrong” path of the branch) must be discarded, and new instructions fetched from the correct path.
Table 2-22. BO Field Definition
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 If BO[0] = 0, test for CR[BI] = 0.
1 If BO[0] = 0, test for CR[BI] = 1.
BO[2]
CTR Decrement and Test Control
0 Decrement CTR by one and test whether the decremented
CTR satisfies the condition specified by BO[3].
1 Do not decrement CTR, do not test CTR.
BO[3]
CTR Test Value
0 If BO[2] = 0, test for decremented CTR ≠ 0.
1 If BO[2] = 0, test for decremented CTR = 0.
BO[4]
Branch Prediction Reversal
0 Apply standard branch prediction.
1 Reverse the standard branch prediction.
Table 2-23. BO Field Examples
BO Value Description
0000y Decrement the CTR, then branch if the decremented CTR ≠ 0 and CR[BI]=0.
0001y Decrement the CTR, then branch if the decremented CTR = 0 and CR[BI] = 0.
001zy Branch if CR[BI] = 0.
0100y Decrement the CTR, then branch if the decremented CTR ≠ 0 and CR[BI] = 1.
0101y Decrement the CTR, then branch if the decremented CTR=0 and CR[BI] = 1.
011zy Branch if CR[BI] = 1.
1z00y Decrement the CTR, then branch if the decremented CTR ≠ 0.
1z01y Decrement the CTR, then branch if the decremented CTR = 0.
1z1zz Branch always.