Patent ID: 7873819

Claim:
A data processing system comprising: a processor for generating fetch group addresses and for receiving multiple instructions in response to each fetch group address; and a branch target buffer (BTB) coupled to the processor, the BTB comprising a plurality of entries, each entry corresponding to a fetch group and comprising a shared higher order target portion, a plurality of unshared lower order target portions, and a plurality of control fields, each of the plurality of control fields corresponding to one of the plurality of unshared lower order target portions, the BTB for receiving a current fetch group address from the processor, the current fetch group address corresponding to a current fetch group comprising a plurality of instructions and, in response to the current fetch group address resulting in a group hit in the BTB, providing to the processor a branch target address corresponding to a branch instruction within the plurality of instructions of the current fetch group which is indicated by a control field as valid, the control field corresponding to the branch instruction and located within an entry of the BTB which caused the group hit, the BTB generating the branch target address using an unshared lower order target portion, corresponding to the branch instruction and located within the entry of the BTB which caused the group hit, and one of a shared higher order target portion located within the entry of the BTB which caused the group hit or a higher order portion of the current fetch group address based on a value of the control field, wherein: when the value of the control field indicates the branch instruction is a long branch, the BTB generates the branch target address using the unshared lower order target portion, corresponding to the branch instruction and located within the entry of the BTB which caused the group hit, and the shared higher order target portion located within the entry of the BTB which caused the group hit; and the BTB further uses at least a portion of the control field as a portion of the branch target address; and a target of the long branch is located at least two memory pages away from a current memory page addressed by the current fetch group address.