Patent ID: 9361242
Filing Date: 2016-06-07
CPC Classification: G06F

Claim Text:
1. A method of operating a processor, comprising: in response to a function call, storing an address following the function call in one of a plurality of address slots in a top entry in a return stack buffer, updating a stack pointer and at least one stack pointer bit to point to the entry and the address slot in which the address was stored and setting a value of two or more pointer bits in the entry, the two or more pointer bits comprising a first part indicating at least a most recently written address slot in the entry and a second part indicating, for each of the plurality of address slots in the entry, a most recently written address slot in the previous entry at the time that the particular one of the plurality of address slots in the entry was written; and in response to a function return, reading an address from an address slot in an entry in the return stack buffer identified by the stack pointer and at least one stack pointer bit, updating the stack pointer to point to the previous entry, and updating the at least one stack pointer bit based on the second part of the pointer bits for the entry and the address slot from which the address was read.