Distance-based branch prediction and detection
Abstract
Examples of techniques for distance-based branch prediction are disclosed. In one example implementation according to aspects of the present disclosure, a computer-implemented method includes: determining, by a processing system, a potential return instruction address (IA) by determining whether a relationship is satisfied between a first target IA and a first branch IA; storing a second branch IA as a return when a target IA of a second branch matches a potential return IA for the second branch; and applying the potential return IA for the second branch as a predicted target IA of a predicted branch IA stored as a return
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A computer-implemented method for distance-based branch prediction, the method comprising:
determining, by a processing system, a potential return instruction address (IA) by determining whether a relationship is satisfied between a first target IA and a first branch IA; storing a second branch IA as a return when a target IA of a second branch matches a potential return IA for the second branch; and applying the potential return IA for the second branch as a predicted target IA of a predicted branch IA stored as a return.
2 . The computer-implemented method of claim 1 , wherein the relationship is a distance between the first target IA and the first branch IA.
3 . The computer-implemented method of claim 2 , wherein the distance is a number of bytes.
4 . The computer-implemented method of claim 2 , wherein a potential return is indicated when the distance between the first target IA and the first branch IA is greater than a distance threshold.
5 . The computer-implemented method of claim 2 , wherein a potential return is not indicated when the distance between the first target IA and the first branch IA is not greater than a distance threshold.
6 . The computer-implemented method of claim 2 , wherein the distance is determined using an absolute value function.
7 . The computer-implemented method of claim 1 , wherein the storing further comprises:
storing the second branch IA into a branch target buffer (BTB); and marking the branch in the BTB as a return branch.Join the waitlist — get patent alerts
Track US2017344373A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.