Early branch determination
AssigneeAdvanced Micro Devices, Inc.
InventorsDavid A. Kaplan, Daniel B. Hopper, Benjamin C. Serebrin
Life of this patent
Estimating the term…
Abstract
A method and apparatus for branch determination is disclosed. The method includes a first command issuing within a computer processor. Execution of the first command by the computer processor includes evaluating one or more conditions to set one or more flags. Subsequent to the first command issuing, a second command is issued and executed. Execution of the second command includes causing the computer processor to wait until the one or more flags are set. Subsequent to the first and second commands issuing, a third command is issued and executed. Execution of the third command includes performing a jump operation based on a value of at least one of the one or more flags set by the first command.
Claims20
A method comprising
- a first command issuing within a computer processor, wherein execution of the first command by the computer processor includes evaluating one or more conditions to set one or more flags stored in a storage element of the computer processor;
- subsequent to the first command issuing, a second command issuing within the computer processor, wherein execution of the second command by the computer processor includes causing the computer processor to wait until the one or more flags are set;
- and
- subsequent to the first and second commands issuing, a third command issuing within the computer processor, wherein execution of the third command by the computer processor includes performing a jump operation if at least one of the one or more flags set by the first command indicate that a jump condition is true, wherein performing the jump operation includes the storage element asserting a select signal directly to an address multiplexer to select an address of next command to be executed based on the storage element determining that the jump condition is true.
An apparatus, comprising:
- a storage element configured to store one or more flag values;
- a microcode execution unit configured to execute a sequence of microcode commands that causes one or more conditions to be evaluated to set the one or more flag values and at least a portion of the microcode execution unit to stall until the one or more flags are set;
- and
- an address multiplexer coupled to receive a first select signal and a second select signal, wherein the address multiplexer is configured to receive the first select signal directly from the storage element responsive to the storage element determining that a jump condition is true based on at least one of the one or more flag values, and wherein the microcode execution unit is configured to assert the second select signal directly to the address multiplexer responsive to execution of a microcode command indicating a branch is to be taken when the branch was not predicted or determined prior to execution of the microcode command.
An apparatus, comprising:
- a storage element configured to store one or more flag values;
- and
- an execution pipeline, wherein the execution pipeline includes a dispatch unit and an execute unit;
- wherein the execution pipeline is configured to execute a first command that causes the execute unit to evaluate one or more conditions to set the one or more flag values;
- wherein the execution pipeline is configured to execute a second command that causes the dispatch unit to cease dispatching instructions to a subsequent unit in the execution pipeline until the one or more flag values are set;
- and
- wherein the execution pipeline is configured to execute a third command issued after the second command, wherein the third command causes a jump operation to be performed based on at least one of the one or more flag values indicating that a jump condition is true;
- wherein the execution pipeline further includes an address multiplexer coupled to receive a first select signal directly from the execute unit and a second select signal directly from the storage element, wherein the execute unit is configured to assert the first select signal responsive to determining a branch during execution of a branch instruction, and wherein the storage element is configured to assert the second select signal responsive to determining that the jump condition is true.
Dependencies are inferred from the claim text.