< previous page page_236 next page >

Page 236
Table 4.12 Choosing strategies.
Opcode +ModeBest Static StrategyCycles PenaltyIn-line StrategyCycles Penalty
BRRtarget0.01target0.01
BCRin-line0.05in-line0.05
BRtarget0.07target0.07
BCin-line0.23in-line0.23
BALRtarget0.02target0.02
BALtarget0.08target0.08
Loop controltarget0.06in-line0.10
0.52 CPI0.56 CPI

0236-01.gif
Figure 4.23
Branch target buffer (BTB) organization.
4.5.4 Branch Target Capture: Branch Target Buffers
The branch target buffer (Figure 4.23) captures the target instruction (or at least the target instruction address after a taken branch). Each branch target buffer (BTB) entry has three fields: the address of a previously executed branch instruction, branch prediction information, and the most recent target instruction or target address for that branch. (The target address is not necessary for predictive purposes, but is valuable because it enables the initiation of the target fetch earlier in the pipeline, since it is not necessary to wait for the address generation to complete.) The BTB functions as follows: the instruction fetch stage compares the instruction address to the instruction addresses in the BTB If there is a match, then a prediction is made as to whether the branch is likely to be taken. If the prediction is that the branch will occur, then the target instruction is used as the next instruction. When the branch is actually resolved, at the execute stage, the BTB can be updated with the corrected prediction information and target,

 
< previous page page_236 next page >