Interrupt driven dynamic adjustment of branch predictions
First Claim
1. A method of adjusting a branch prediction associated with a branch instruction contained in a segment of program code that is being executed by a central processing unit, the method comprising:
- interrupting execution of the program code when execution of the branch instruction by the central processing unit is pending;
executing a prediction adjustment routine that updates the branch prediction; and
resuming execution of the program code.
4 Assignments
0 Petitions
Accused Products
Abstract
Branch predictions are adjusted by interrupting a central processing unit and observing a pending branch instruction. An interrupt is generated using a counter, timer, or software-based interrupt. The interrupt causes a prediction adjustment routine to execute, which in turn determines whether a pending branch instruction will branch. The actual branch behavior of the branch instruction is compared to the predicted branch behavior of the branch instruction, and the prediction is adjusted accordingly based on the accuracy of the prediction and previous branch behavior. After the prediction has been adjusted (if necessary), execution returns to the program that contains the branch instruction that was evaluated.
55 Citations
23 Claims
-
1. A method of adjusting a branch prediction associated with a branch instruction contained in a segment of program code that is being executed by a central processing unit, the method comprising:
-
interrupting execution of the program code when execution of the branch instruction by the central processing unit is pending; executing a prediction adjustment routine that updates the branch prediction; and resuming execution of the program code. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
-
-
15. A computer system comprising:
-
a memory system for storing computer instructions, wherein a portion of the computer instructions comprise a branch prediction adjustment routine that when executed evaluates a pending branch instruction and updates a branch prediction associated with the pending branch instruction based on whether the branch prediction is correct; and a central processing unit for executing the computer instructions, the central processing unit including; an interrupt unit for launching the branch prediction adjustment routine in response to an interrupt. - View Dependent Claims (16, 17, 18, 19, 20, 21)
-
-
22. A program storage medium having computer readable program code thereon for adjusting a branch prediction associated with a branch instruction contained in a segment of executable program code that is being executed by a central processing unit, the program storage medium comprising:
-
a first segment of the computer readable program code for causing interruption of execution of the executable program code when execution of the branch instruction by the central processing unit is pending; a second segment of the computer readable code for adjusting the branch prediction associated with the branch instruction; a third segment of the computer readable program code for executing the second segment of the computer readable code in response to an interrupt caused by the first segment of the computer readable code; and a fourth segment of the computer readable program code that resumes execution of the executable program code.
-
-
23. A program storage medium readable by a computer, tangibly embodying program instructions executable by the computer to implement a method that adjusts a branch prediction associated with a branch instruction contained in a segment of program code that is being executed by a central processing unit, the method comprising:
-
interrupting execution of the program code when execution of the branch instruction by the central processing unit is pending; executing a prediction adjustment routine that updates the branch prediction; and resuming execution of the program code.
-
Specification