Patent ID: 7500088

Claim:
A method of updating a branch history table to assist in processing branch instructions by a processor employing an instruction pipeline that holds a plurality of instructions, comprising: (a) determining a number of instructions to be fetched; (b) selecting a first mode to update the branch history table when there are at least two instructions to be fetched; and (c) selecting a second mode to update the branch history table when there are less than two instructions to be fetched; wherein, upon a branch misdirection, the method further comprises: fetching at least two instructions into the instruction pipeline to be executed, then updating the branch history table, and then fetching one or more additional instructions into the instruction pipeline to be executed upon selecting the first mode; and fetching a first instruction into the instruction pipeline to be executed, then fetching another instruction into the instruction pipeline to be executed, and then updating the branch history table upon selecting the second mode.