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