NEXT FETCH PREDICTOR RETURN ADDRESS STACK
First Claim
Patent Images
1. A processor comprising:
- a return address stack (RAS) configured to store return addresses associated with call branch instructions;
a next fetch prediction unit configured to predict a next fetch address based on a current fetch address;
responsive to determining a current fetch address corresponds to a return branch instruction, the next fetch prediction unit is configured to generate the next fetch address using an address from the RAS.
1 Assignment
0 Petitions
Accused Products
Abstract
A system and method for efficient branch prediction. A processor includes a next fetch predictor to generate a fast branch prediction for branch instructions at an early pipeline stage. The processor also includes a main return address stack (RAS) at a later pipeline stage for predicting the target of return instructions. When a return instruction is encountered, the prediction from the next fetch predictor is replaced by the top of the main RAS. If there are any recent call or return instructions in flight toward the main RAS, then a separate prediction is generated by a mini-RAS.
12 Citations
20 Claims
-
1. A processor comprising:
-
a return address stack (RAS) configured to store return addresses associated with call branch instructions; a next fetch prediction unit configured to predict a next fetch address based on a current fetch address; responsive to determining a current fetch address corresponds to a return branch instruction, the next fetch prediction unit is configured to generate the next fetch address using an address from the RAS. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A method comprising:
-
performing a lookup of a next fetch prediction unit with a current fetch address; and selecting a top of a main return address stack as a next fetch address responsive to determining that the current fetch address is associated with a return instruction and that there are no in-flight call or return instructions toward the main return address stack (RAS). - View Dependent Claims (9, 10, 11, 12, 13)
-
-
14. An apparatus comprising:
-
a next fetch predictor configured to generate a next fetch address based on a current fetch address; a main return address stack (RAS); and a mini-RAS configured to track in-flight call and return instructions toward the main RAS. - View Dependent Claims (15, 16, 17, 18, 19, 20)
-
Specification