Branch Prediction; Table 2-22. Bo Field Definition; Table 2-23. Bo Field Examples - IBM PPC440X5 CPU Core User Manual

Cpu core
Table of Contents

Advertisement

Preliminary
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-22. BO Field Definition
BO Bit
BO[0]
BO[1]
BO[2]
BO[3]
BO[4]
Table 2-23 lists specific BO field contents, and the resulting actions;
y is a branch prediction option discussed in Branch Prediction on page 65
and

Table 2-23. BO Field Examples

BO Value
y
0000
Decrement the CTR, then branch if the decremented CTR 0 and CR[BI]=0.
y
0001
Decrement the CTR, then branch if the decremented CTR = 0 and CR[BI] = 0.
zy
001
Branch if CR[BI] = 0.
y
0100
Decrement the CTR, then branch if the decremented CTR 0 and CR[BI] = 1.
y
0101
Decrement the CTR, then branch if the decremented CTR=0 and CR[BI] = 1.
zy
011
Branch if CR[BI] = 1.
z
y
1
00
Decrement the CTR, then branch if the decremented CTR 0.
z
y
1
01
Decrement the CTR, then branch if the decremented CTR = 0.
z
zz
1
1
Branch always.

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.
prgmodel.fm.
September 12, 2002
CR Test Control
0 Test CR bit specified by BI field for value specified by BO[1]
1 Do not test CR
CR Test Value
0 If BO[0] = 0, test for CR[BI] = 0.
1 If BO[0] = 0, test for CR[BI] = 1.
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.
CTR Test Value
0 If BO[2] = 0, test for decremented CTR
1 If BO[2] = 0, test for decremented CTR = 0.
Branch Prediction Reversal
0 Apply standard branch prediction.
1 Reverse the standard branch prediction.
Description
0.
z represents a mandatory value of zero,
Description
User's Manual
PPC440x5 CPU Core
Page 65 of 589

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents