Patent ID: 7797521

Claim:
A method for maintaining a path history register, the method comprising: generating a set of bits based on a set of target address bits from a register-indirect branch instruction using a bit selection and a hash function operation; inserting the generated set of bits into a path history register by shifting bits in the path history register and applying a hash function operation; and removing information corresponding to prior history from the path history register, using a shift out operation and a hash function operation; wherein removing information corresponding to prior history from the path history register, using the shift out operation and the hash function operation comprises: applying a first hash function operation to a value of a next to an oldest history element and copying a result of the first hash function operation into the oldest history element during the shift out operation; applying a second hash function operation on a value of a recent history element and copying a result of the second hash function operation into the next to the oldest history element during the shift out operation; and applying a third hash function operation on the set of target address bits and copying a result of the third hash function operation into the recent history element during the shift out operation; wherein the result of the first hash function operation is less bits than the result of the second hash function operation; and wherein the result of the second hash function operation is less bits than the result of the third hash function operation.