EasyManuals Logo
Home>IBM>Computer Hardware>PowerPC 405GP

IBM PowerPC 405GP User Manual

IBM PowerPC 405GP
668 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #117 background imageLoading...
Page #117 background image
Table 3-17.
Bits
of
the
BO
Field
(continued)
BOBlt
Description
BO[3] CTR Test Value
o Test for CTR
:;;
O.
1 Test for CTR =
O.
BO[4]
Branch Prediction Reversal
o Apply standard branch prediction.
1 Reverse the standard branch prediction.
Table 3-18 lists specific BO field contents, and the resulting actions; z represents a mandatory value
of
0,
and y is a branch prediction option discussed
in
"Branch Prediction."
Table 3-18.
Conditional
Branch
BO
Field
BOValue
Description
OOOOy
Decrement the CTR, then branch if the decremented CTR
ct-
0 and CR[BI]=O.
0OO1y
Decrement the CTR, then branch if the decremented CTR = 0 and CR[BI] =
O.
001zy Branch if CR[BI] =
O.
0100y Decrement the CTR, then branch if the decremented CTR
ct-
0 and CR[BI] = 1.
0101y Decrement the CTR, then branch if the decremented
CTR=O
and CR[BI] = 1.
011zy
Branch if CR[BI] =
1.
1z00y
Decrement the CTR, then branch if the decremented CTR
ct-
O.
1z01y Decrement the CTR, then branch if the decremented CTR =
O.
1z1zz Branch always.
3.7.5 Branch Prediction
Conditional branches present a problem to the instruction fetcher. A branch might be taken. The
branch EXU attempts to predict whether or not a branch is taken before
all information necessary to
determine the branch direction is available. This decision is
called a branch prediction. The fetcher
can then prefetch instructions starting at the predicted branch target address.
If the prediction is
correct, time is saved because the branched-to instruction is available in the instruction queue.
Otherwise, the instruction
pipeline stalls while the correct instruction is fetched into the instruction
queue.
To
be effective, branch prediction must be correct most of the time.
The PowerPC Architecture enables software to reverse the default branch prediction, which is defined
as
follows:
Predict that the branch is to be taken if ((BO[O]
1\
BO[2]) v
s)
= 1
wh!?re
s is the sign bit of the displacement for conditional branch (bc) instructions, and 0 for
bclr
and
bcctr
instructions.
(BO[O]
1\
BO[2]) = 1 only when the conditional branch tests nothing (the "branch always" condition).
Obviously, the branch should be predicted taken for this case.
If the branch tests anything, (BO[O]
1\
BO[2]) = 0, and s entirely controls the prediction. The default
prediction for this case was decided by considering the relative form of bc, which is commonly used at
the end of
loops to control the number of times that a loop is executed. The branch is taken every time
3-36 PPC405GP User's Manual Preliminary

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM PowerPC 405GP and is the answer not in the manual?

IBM PowerPC 405GP Specifications

General IconGeneral
BrandIBM
ModelPowerPC 405GP
CategoryComputer Hardware
LanguageEnglish

Related product manuals