Patent ID: 7617387

Claim:
A method comprising: processing two or more predicted branch instructions, each predicted branch instruction having a predicted state and a corrected state, the predicted branch instructions entering a resolution stage; selecting one of the corrected states from one of the predicted branch instructions; determining that at least one of the predicted branch instructions has mispredicted; performing a first flush of a first portion of an instruction pipeline; initiating instruction fetches based on the selected corrected state; after performing the first flush and after initiating instruction fetches based on the selected corrected state, determining whether an oldest predicted branch instruction that has mispredicted has the selected corrected state; when the oldest predicted branch instruction that has mispredicted has the selected corrected state, performing a first flush of a second portion of the instruction pipeline, wherein the second portion differs from the first portion; and when the oldest predicted branch instruction that has mispredicted does not have the selected corrected state: performing a second flush of the first portion of the instruction pipeline; initiating second instruction fetches based on the selected corrected state of the oldest predicted branch instruction that has mispredicted; and performing a second flush of the second portion of the instruction pipeline.