Apparatus and method for speculatively performing a return instruction in a microprocessor
Abstract
A branch prediction apparatus that employs dual call/return stacks to predict return addresses in a microprocessor. The apparatus includes a first call/return stack that provides a speculative return address based upon a return instruction hit in a speculative branch target address cache (BTAC) of an instruction cache fetch address prior to decoding of the instruction to know whether it is actually a return instruction. The speculative return address is one of multiple return addresses simultaneously stored in the first call/return stack each pushed thereupon in response to the BTAC indicating a call instruction was fetched and prior to decoding the call instruction. The speculative return address is provided early in the pipeline and the microprocessor speculatively branches to the speculative return address. Later in the pipeline, a second call/return stack provides a non-speculative return address after the instruction is decoded and verified to be a return instruction. A comparator compares the speculative and non-speculative return addresses, and if the two addresses mismatch, the microprocessor branches to the non-speculative return address.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 50 · Forward citations: 11.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
An apparatus in a processor for speculatively performing a return instruction, comprising: a first call/return stack, configured for pushing thereon a plurality of return addresses of a corresponding plurality of call instructions in response to fetching from an instruction cache a plurality of cache lines predicted to include said corresponding plurality of call instructions, and for popping therefrom a first return address in response to fetching from said instruction cache a cache line predicted to include a return instruction, wherein said first return address is a top one of said pluralit
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (11 of 11 total)
References Cited — Backward Prior Art (50)
Non-Patent Literature (5)
- Bray et al; Strategies for Branch Target Buffers; Technical Report No. CSL-TR-91-480, Jun. 1991.
- Chang et al; Alternative Implementations of Hybrid Branch Predictors; Proceedings of MICRO-28, 1995, IEEE.
- Eberly et al. "The Correlation Branch Target Address Cache" May 1996.
- IBM Technical Disclosure Bulletin NN9204269, "Return Address Stack Cache," Apr. 1992, pp. 269-271.
- IEEE 100, The Authoritative Dictionary of IEEE Standard Terms, Seventh Edition. The Institute of Electrical Engineering, Inc. New York: Standards Information Network IEEE Press p. 135.