摘要 |
<p>A branch prediction mechanism that maintains both speculative history (25) and actual history (22) for each branch instruction in a branch target buffer. The actual branch history (22) contains the branch history for fully resolved occurrences of the branch instruction. The speculative branch history (25) contains the actual history (22) plus 'history' of recent branch predictions for the branch. If the speculative branch history (25) contains any recent predictions, then a speculation bit (24) is set. When the speculative bit (24) is set, this indicates that there is speculative history (25) for a branch. Therefore, when the speculation bit (24) is set the speculative history (25) is used to make branch predictions. If a misprediction is made for the branch, the speculative bit (24) is cleared since the speculative history (25) contains inaccurate branch history.</p> |