Branch target address cache storing two or more branch target addresses per index
OwnerRodney Smith, James Dieffenderfer +2inventors
InventorsRodney Smith, James Dieffenderfer, Jeffrey Bridges, Thomas Sartorius
Life of this patent
Estimating the term…
Abstract
A Branch Target Address Cache (BTAC) stores at least two branch target addresses in each cache line. The BTAC is indexed by a truncated branch instruction address. An offset obtained from a branch prediction offset table determines which of the branch target addresses is taken as the predicted branch target address. The offset table may be indexed in several ways, including by a branch history, by a hash of a branch history and part of the branch instruction address, by a gshare value, randomly, in a round-robin order, or other methods.
Claims19
A method of predicting the branch target address for a branch instruction, comprising:
- storing at least part of an instruction address;
- associating at least two branch target addresses with the stored instruction address;
- and
- upon fetching a branch instruction, selecting one of the branch target addresses as the predicted target address for the branch instruction.
A method of predicting branch target addresses, comprising:
- fetching a block of n sequential instructions referenced by a truncated instruction address;
- and
- storing in a cache, a branch target address for each branch instruction in the block that evaluates taken, such that up to n branch target addresses are indexed by the truncated instruction address.
A processor, comprising:
- a branch target address cache indexed by a truncated instruction address, and
- operative to store two or more branch target addresses per cache line;
- a branch prediction offset table operative to store a plurality of offsets;
- and
- an instruction execution pipeline operative to index the cache with a truncated instruction address and to select a branch target address from the indexed cache line in response to an offset obtained from the offset table.
Dependencies are inferred from the claim text.