Patent ID: 7055023

Claim:
An apparatus for branch prediction, comprising: a history register storing history of previous branch instructions; an index generation circuit generating a first index from an instruction address and the history stored in said history register; a history table storing a tag, which is a predetermined portion of the instruction address, and a first count value indicative of a likelihood of branching in association with the first index, said history table indicating a hit in response to a match between the tag and the predetermined portion of a current instruction address, and indicating a miss in response to a mismatch between the tag and the predetermined portion of the current instruction address; a branch destination buffer storing a branch destination address or a predicted branch destination address of an instruction indicated by the instruction address and a second value indicative of a likelihood of branching in association with a second index that is at least a portion of the instruction address; and a selection unit making a branch prediction by selecting one of the first value and the second value depending on whether said history table indicates a hit or a miss.