Bi-directional return register stack recovery from speculative execution of call/return upon branch misprediction
Abstract
A Next Return Target Address stack to maintain return addresses for call and return operations. The invention accommodates both definite return addresses and speculative return address in a single stack. Return addresses are written into the stack and read out of the stack at an entry/exit register interior to the stack. The stack has a lower portion below the entry/exit register for maintaining both actual and speculative return addresses, and an upper portion above the entry/exit register for maintaining return addresses that have been speculatively popped out. A branch history register keeps an ongoing record of the most recent calls and returns. In the event of a pipeline flush, such as would be caused by a branch mispredict, the contents of the branch history register are examined to determine how to adjust the contents of the stack. One or more depth counters keep track of which contents in the branch history register are to be examined.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 7 · Forward citations: 4.
Claims (2 — 1 Independent, 1 Dependent)
- Claim 1Independent Claim
An apparatus, comprising: a bi-directional register stack comprising a plurality of registers, the plurality of registers to contain return addresses including a register positioned in an interior of the register stack to write a return address when a call operation is detected and to read the return address when a return operation is detected; a memory circuit to maintain a branch history of calls and returns to the bi-directional register stack; a history depth counter circuit to determine which of the calls and returns to be used when a branch misprediction is encountered to indicate how ma
- Claim 2Depends on #1
The apparatus of claim 1 , wherein each of the plurality of regi
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗