CPC G06F 9/3806 (2013.01) [G06F 9/3867 (2013.01)] | 16 Claims |
1. A processor, comprising:
an instruction processing circuit configured to process an instruction stream comprising a plurality of instructions in an instruction pipeline; and
a branch target buffer (BTB) circuit comprising a BTB comprising a plurality of extended BTB entries, wherein each extended BTB entry of the plurality of extended BTB entries comprises a plurality of branch entries each configured to store metadata comprising either trunk branch metadata or leaf branch metadata;
the BTB circuit configured to:
store trunk branch metadata for a first branch instruction among the plurality of instructions in a first branch entry of an extended BTB entry of the plurality of extended BTB entries, wherein the extended BTB entry corresponds to a first aligned memory block containing an address of the first branch instruction;
store leaf branch metadata for a second branch instruction among the plurality of instructions in a second branch entry of the extended BTB entry in association with the trunk branch metadata, wherein an address of the second branch instruction is subsequent to a target address of the first branch instruction within a second aligned memory block; and
update the first branch entry to store an index of the second branch entry as a leaf branch index.
|