摘要 |
A branch predictor for improving branch prediction accuracy is provided. The branch predictor includes global and local Agree dynamic branch predictors, one of which is selected for correlation with a static branch prediction made based upon a test type of a conditional branch instruction specifying a condition upon which the branch will be taken. In one embodiment, the selection is made by correlating a selection prediction made the static predictor based on the test type and an Agree prediction made by a selector history table based on the branch instruction address. In an alternate embodiment, the selection is made directly by the selector history table, without the benefit of the static prediction. In addition, the static predictor makes its predictions based upon an opcode of an instruction preceding the conditional branch instruction and upon a sign of a displacement for calculating a target address of the conditional branch instruction. The dynamic predictors are updated if they are selected and incorrectly predicted the outcome. The selector history table is updated if the selected dynamic predictor predicted incorrectly and the non-selected dynamic predictor predicted correctly.
|