Method and apparatus for precalculating a direct branch partial target address during a misprediction correction process

US9489204B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-9489204-B2
Application numberUS-201313842835-A
CountryUS
Kind codeB2
Filing dateMar 15, 2013
Priority dateMar 15, 2013
Publication dateNov 8, 2016
Grant dateNov 8, 2016

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

An example method of storing a partial target address in an instruction cache includes receiving a branch instruction. The method also includes predicting a direction of the branch instruction as being not taken. The method further includes calculating a destination address based on executing the branch instruction. The method also includes determining a partial target address using the destination address. The method further includes in response to the predicted direction of the branch instruction changing from not taken to taken, replacing an offset in an instruction cache with the partial target address.

First claim

Opening claim text (preview).

What is claimed is: 1. A method of storing a partial target address in an instruction cache, comprising: receiving a branch instruction from an instruction cache; predicting a direction of the branch instruction as being not taken; calculating a destination address based on executing the branch instruction; determining a partial target address using the destination address; and in response to the predicted direction of the branch instruction changing from not taken to taken, replacing an offset in the branch instruction in the instruction cache with the partial target address. 2. The method of claim 1 , further comprising: in response to the predicted direction of the branch instruction changing from taken to not taken, replacing the partial target address in the branch instruction in the instruction cache with the offset. 3. The method of claim 1 , further comprising: in response to replacing the offset in the branch instruction in the instruction cache with the partial target address, setting a bit in the branch instruction; and when the bit is set in the branch instruction and the predicted direction of the branch instruction changes from not taken to taken, using the partial target address in the branch instruction in the instruction cache. 4. The method of claim 1 , wherein receiving the branch instruction comprises receiving a conditional jump instruction. 5. The method of claim 1 , wherein receiving the branch instruction comprises receiving an unconditional jump instruction. 6. The method of claim 1 , wherein the prediction of the direction of the branch instruction as being not taken is statically determined by a compiler, and the compiler initializes each branch instruction as being not taken. 7. The method of claim 1 , wherein receiving the branch instruction comprises receiving a prediction bit that predicts the direction of the branch instruction. 8. An apparatus for storing a partial target address in an instruction cache, comprising: a processor that is operable to: receive a branch instruction from an instruction cache; predict a direction of the branch instruction as being not taken; calculate a destination address based on executing the branch instruction; determine a partial target address using the destination address; and in response to the predicted direction of the branch instruction changing from not taken to taken, replace an offset in the branch instruction in the instruction cache with the partial target address. 9. The apparatus of claim 8 , wherein the processor is further operable to, in response to the predicted direction of the branch instruction changing from taken to not taken, replace the partial target address in the branch instruction in the instruction cache with the offset. 10. The apparatus of claim 8 , wherein the processor is further operable to: in response to replacing the offset in the branch instruction in the instruction cache with the partial target address, set a bit in the branch instruction; and when the bit is set in the branch instruction and the predicted direction of the branch instruction changes from not taken to taken, use the partial target address in the instruction cache. 11. The apparatus of claim 8 , wherein the processor is operable to receive a conditional jump instruction. 12. The apparatus of claim 8 , wherein the processor is operable to receive an unconditional jump instruction. 13. The apparatus of claim 8 , wherein a compiler statically initializes the prediction of the direction of the branch instruction as being not taken. 14. The apparatus of claim 8 , wherein the processor is operable to receive a prediction bit that predicts the direction of the branch instruction. 15. A non-transitory computer-readable medium having stored thereon computer-executable instructions for performing operations, comprising: receiving a branch instruction from an instruction cache; predicting a direction of the branch instruction as being not taken; calculating a destination address based on executing the branch instruction; determining a partial target address using the destination address; and in response to the predicted direction of the branch instruction changing from not taken to taken, replacing an offset in the branch instruction in the instruction cache with the partial target address. 16. The non-transitory computer-readable medium of claim 15 , the operations further comprising, in response to the predicted direction of the branch instruction changing from taken to not taken, replacing the partial target address in the branch instruction in the instruction cache with the offset. 17. The non-transitory computer-readable medium of claim 15 , the operations further comprising: in response to replacing the offset in the branch instruction in the instruction cache with the partial target address, setting a bit in the branch instruction; and when the bit is set in the branch instruction and the direction of the branch instruction changes from not taken to taken, using the partial target address in the instruction cache. 18. The non-transitory computer-readable medium of claim 15 , wherein receiving the branch instruction comprises receiving a conditional jump instruction. 19. The non-transitory computer-readable medium of claim 15 , wherein receiving the branch instruction comprises receiving an unconditional jump instruction. 20. An apparatus for storing a partial target address in an instruction cache, comprising: means for receiving a branch instruction from an instruction cache; means for predicting a direction of the branch instruction as being not taken; means for calculating a destination address based on executing the branch instruction; means for determining a partial target address using the destination address; and means for, in response to the predicted direction of the branch instruction changing from not taken to taken, replacing an offset in the branch instruction in the instruction cache with the partial target address. 21. The apparatus of claim 20 , further comprising means for, in response to the predicted direction of the branch instruction changing from taken to not taken, replacing the partial target address in the branch instruction in the instruction cache with the offset. 22. The apparatus of claim 21 , further comprising: means for, in response to replacing the offset in the branch instruction in the instruction cache with the partial target address, setting a bit in the branch instruction; and means for, when the bit is set in the branch instruction and the predicted direction of the branch instruction changes from not taken to taken, using the partial target address in the instruction cache. 23. The method of claim 1 , further comprising: predicting a direction of a next branch instruction as being taken; and in response to the predicted direction of the next branch instruction being taken, retrieving a destination address for the next branch instruction based on a partial target address for the next branch instruction stored in the next branch instruction in the instruction cache. 24. The method of claim 23 , comprising in response to the predicted direction of the next branch instruction being taken, retrieving the destination address for the next branch instruction based on the partial target address stored in an opcode of the next branch instruction stored in the instruction cache. 25.

Assignees

Inventors

Classifications

  • with instruction modification, e.g. store into instruction stream · CPC title

  • G06F9/3804Primary

    for branches, e.g. hedging, branch folding · CPC title

  • using address prediction, e.g. return stack, branch history buffer · CPC title

  • G06F9/324Primary

    using program counter relative addressing · CPC title

  • using static prediction, e.g. branch taken strategy · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US9489204B2 cover?
An example method of storing a partial target address in an instruction cache includes receiving a branch instruction. The method also includes predicting a direction of the branch instruction as being not taken. The method further includes calculating a destination address based on executing the branch instruction. The method also includes determining a partial target address using the destina…
Who is the assignee on this patent?
Qualcomm Inc
What technology area does this patent fall under?
Primary CPC classification G06F9/3804. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Nov 08 2016 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 8 related publications on this page (citations in our corpus or others sharing the same primary CPC).