Methods and apparatus for branch prediction using hybrid history with index sharing
AssigneeSun Microsystems, Inc.
InventorAdam R. Talcott
Life of this patent
Estimating the term…
Abstract
A branch prediction scheme predicts whether a computer instruction will cause a branch to a non-sequential instruction. A prediction counter is selected by performing an exclusive or (XOR) operation between bits from an instruction address and a hybrid history. The hybrid history, in turn, is derived by concatenating bits from a global history register with bits from a local branch history table. The bits from the local branch history table are accessed by using bits from the instruction address.
Claims11
A method of predicting whether processing of an instruction is to result in branching of program flow, comprising:
- accessing local branch history data;
- accessing global branch history data;
- concatenating the accessed local branch history data with the accessed global branch history data to form concatenated history data;
- performing an exclusive or operation between the concatenated history data and bits from the address of the instruction to form an index to branch prediction data;
- and
- generating branch prediction data based upon the index.
A method of predicting whether processing of an instruction is to result in branching of program flow, comprising:
- accessing global branch history data;
- performing a first exclusive or operation between the accessed global branch history data and bits from the address of the instruction to form index data;
- accessing local branch history data;
- performing a second exclusive or operation between the accessed local branch history data and bits from the address of the instruction to form select data;
- accessing branch prediction data based upon the index data;
- and
- selecting at least one of the branch prediction data based upon the select data.
A method of predicting whether processing of an instruction is to result in branching of program flow, comprising:
- reading local branch history data from a local history table;
- reading global branch history data from a global history register;
- concatenating the read local branch history data with the read global branch history data to form concatenated history data;
- performing an exclusive or operation between the concatenated history data and bits from the address of the instruction to form an index to branch prediction data;
- and
- reading branch prediction data from a branch prediction table based upon the index.
A method of predicting whether processing of an instruction is to result in branching of program flow, comprising:
- reading global branch history data from a global history register;
- performing a first exclusive or operation between the read global branch history data and bits from the address of the instruction to form index data;
- reading local branch history data from a local history table;
- performing a second exclusive or operation between the read local branch history data and bits from the address of the instruction to form select data;
- reading branch prediction data from a branch prediction table based upon the index data;
- and
- selecting at least one of the branch prediction data based upon the select data.
An apparatus for predicting whether processing of an instruction is to result in branching of program flow, comprising:
- means for accessing local branch history data;
- means for accessing global branch history data;
- means for concatenating the accessed local branch history data with the accessed global branch history data to form concatenated history data;
- means for performing an exclusive or operation between the concatenated history data and bits from the address of the instruction to form an index to branch prediction data;
- and
- means for generating, branch prediction data based upon the index.
An apparatus for predicting whether processing of an instruction is to result in branching of program flow, comprising:
- means for accessing global branch history data;
- means for performing a first exclusive or operation between the accessed global branch history data and bits from the address of the instruction to form index data;
- means for accessing local branch history data;
- means for performing a second exclusive or operation between the accessed local branch history data and bits from the address of the instruction to form select data;
- means for accessing branch prediction data based upon the index data;
- and
- means for selecting at least one of the branch prediction data based upon the select data.
An apparatus for predicting whether processing of an instruction is to result in branching of program flow, comprising:
- means for reading local branch history data from a local history table;
- means for reading global branch history data from a global history register;
- means for concatenating the read local branch history data with the read global branch history data to form concatenated history data;
- means for performing an exclusive or operation between the concatenated history data and bits from the address of the instruction to form an index to branch prediction data;
- and
- means for reading branch prediction data from a branch prediction table based upon the index.
An apparatus for predicting whether processing of an instruction is to result in branching of program flow, comprising:
- means for reading global branch history data from a global history register;
- means for performing a first exclusive or operation between the read global branch history data and bits from the address of the instruction to form index data;
- means for reading local branch history data from a local history table;
- means for performing a second exclusive or operation between the read local branch history data and bits from the address of the instruction to form select data;
- means for reading branch prediction data from a branch prediction table based upon the index data;
- and
- means for selecting at least one of the branch prediction data based upon the select data.
Dependencies are inferred from the claim text.