Systems and methods for programmed branch predictors
AssigneeAdvanced Micro Devices, Inc.
InventorsAlexander Toufic Freij, Gabriel H. Loh, Onur Kayiran
Life of this patent
Estimating the term…
Abstract
The disclosed device a controller that sets an iteration counter for a loop based on an iteration value read from a loop iteration instruction for the loop. The controller also updates the iteration counter based on a number of times a loop heading instruction for the loop is decoded. When the iteration counter reaches an end value, the controller selects a not taken identifier for the loop to be fetched, to avoid a branch misprediction. Various other methods, systems, and computer-readable media are also disclosed.
Claims20
A device comprising:
- a controller configured to:
- set an iteration counter for a loop based on an iteration value read from a loop iteration instruction corresponding to the loop;
- update the iteration counter based on a number of times a loop heading instruction corresponding to the loop is decoded;
- and
- select, in response to the iteration counter reaching an end value, a not taken identifier for the loop to be fetched.
A system comprising:
- a physical memory;
- at least one physical processor;
- a loop iteration buffer;
- and
- a controller configured to:
- create an entry in the loop iteration buffer for a loop based on a loop iteration instruction, wherein the entry includes an iteration counter based on an iteration value read from the loop iteration instruction, a loop identifier corresponding to a loop heading instruction for the loop, and a not taken identifier corresponding to a loop end instruction for the loop;
- update the iteration counter based on a number of times the loop identifier is decoded;
- and
- select, in response to the iteration counter reaching an end value, the not taken identifier to be fetched.
A method comprising:
- reading a loop iteration instruction for a loop, the loop iteration instruction including an iteration value;
- identifying a loop identifier corresponding to a loop heading instruction for the loop;
- identifying a not taken identifier corresponding to a loop end instruction for the loop;
- creating an entry in a loop iteration buffer, the entry including an iteration counter based on the iteration value, the loop identifier, and the not taken identifier;
- updating the iteration counter based on a number of times the loop identifier is decoded;
- and
- selecting, in response to the iteration counter reaching an end value, the not taken identifier to be fetched.
Dependencies are inferred from the claim text.