Mechanism for hardware tracking of return address after tail call elimination of return-type instruction
Abstract
A technique maintains return address stack (RAS) content and alignment of a RAS top-of-stack (TOS) pointer upon detection of a tail-call elimination of a return-type instruction. In at least one embodiment of the invention, an apparatus includes a processor pipeline and at least a first return address stack for maintaining a stack of return addresses associated with instruction flow at a first stage of the processor pipeline. The processor pipeline is configured to maintain the first return address stack unchanged in response to detection of a tail-call elimination sequence of one or more instructions associated with a first call-type instruction encountered by the first stage. The processor pipeline is configured to push a return address associated with the first call-type instruction onto the first return address stack otherwise.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 14 · Forward citations: 5.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
An apparatus comprising: a processor pipeline; and at least a first return address stack for maintaining a stack of return addresses associated with instruction flow at a first stage of the processor pipeline, the processor pipeline being configured to maintain the first return address stack unchanged in response to detection of a tail-call elimination sequence of one or more instructions including (i) a first call-type instruction encountered by the first stage and an instruction in a delay slot for said first call-type instruction wherein said instruction in said delay slot is indicative of
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (5 of 5 total)
References Cited — Backward Prior Art (14)
Non-Patent Literature (5)
- Desmet, Veerle et al., "Correct Alignment of a Return-Address-Stack after Call and Return Mispredictions", Proceedings of the 4th Workshop on Duplicating, Deconstructing, and Debunking, held in Conjunction with the 32nd International Symposium on Computer Architecture, 2005, pp. 25-33.
- Hennessy, John L. and Patterson, David A., Computer Architecture A Quantitative Approach, Third Edition, 2003, pp. 224-240, Morgan Kaufman Publishers, USA.
- Hennessy, John, Patterson, David. "Computer Architecture: A Quatitative Approach" Morgan Kaufmann, May 2002, pp. A-22 to A-29.
- Return-Address Stack, http://www.usenix.org/events/sec01/full-papers/frantzen/frantzen-html/node 11.html, 2 pp.
- Skadron et al. "Improving Prediction for Procedure Returns with Return-Address-Stack Repair Mechanisms" Proceedings of the 31st Annual ACM/IEEE International Symposium on Microarchitecture. IEEE Comp. Soc., Los Almitos, CA, Nov. 30, 1998, pp. 259-271. (XP000871947) .