System and method of correcting a branch misprediction
AssigneeQUALCOMM Incorporated
InventorsMichael McIlvaine, James Dieffenderfer, Jeffrey Bridges, Thomas Sartorius
Life of this patent
Estimating the term…
Abstract
When a branch misprediction in a pipelined processor is discovered, if the mispredicted branch instruction is not the last uncommitted instruction in the pipelines, older uncommitted instructions are checked for dependency on a long latency operation. If one is discovered, all uncommitted instructions are flushed from the pipelines without waiting for the dependency to be resolved. The branch prediction is corrected, and the branch instruction and all flushed instructions older than the branch instruction are re- fetched and executed.
Claims17
A method of handling a branch misprediction in a pipelined processor, comprising:
- detecting that a branch instruction was mispredicted;
- and
- flushing at least one instruction older than said branch instruction from the pipelines, in response to detecting said misprediction.
A processor, comprising:
- at least one instruction execution pipeline;
- a branch predictor predicting the evaluation in the pipelines of conditional branch instructions;
- an instruction order manager tracking the order of instructions in the pipelines;
- and
- a pipeline controller flushing at least one instruction older than a branch instruction from the pipelines, in response to detecting that said branch instruction was mispredicted.
A method of correcting a branch misprediction in a pipelined processor, comprising:
- detecting that a branch instruction was mispredicted;
- detecting a dependency of a first instruction older than said branch instruction on a long latency operation;
- and
- flushing all uncommitted instructions from the pipelines.
A method of correcting a branch misprediction in a pipelined processor, comprising:
- detecting that a branch instruction was mispredicted;
- determining whether said branch instruction is the last uncommitted instruction in the pipelines;
- if said branch instruction is the last uncommitted instruction in the pipelines, committing said branch instruction and flushing all uncommitted instructions from the pipelines;
- if said branch instruction is not the last uncommitted instruction in the pipelines, determining if an instruction older than said branch instruction is stalled in a pipeline due to a long latency operation;
- if an instruction older than said branch instruction is stalled in a pipeline due to a long latency operation, flushing said branch instruction and all other uncommitted instructions from the pipelines.
Dependencies are inferred from the claim text.