HPlogo PA-RISC Procedure Calling Conventions Reference Manual > Chapter 2 Stack Usage

2.3 Frame Marker Area

MPE documents

Complete PDF
Table of Contents

This eight-word area is allocated by any non-leaf routine prior to a call. The exact size of this area is defined because the caller uses it to locate the formal arguments from the previous frame. (Any standard procedure can identify the bottom of its own frame, and can therefore identify the formal arguments in the previous frame, because they will always reside in the region beginning with the ninth word below the top of the previous frame.)

Previous SP: Contains the old (procedure entry) value of the Stack Pointer. It is only required that this word be set if the current frame is noncontiguous with the previous frame, has a variable size, or is used with the static-link.

Relocation Stub RP (RP"): Reserved for use by a relocation stub that must store a Return Pointer (RP) value, so the stub can be executed after the exit from the callee, but before return to the caller. See Chapter 3 for detailed discussion of Parameter Relocation stubs.

Clean Up: Area reserved for use by language processors; possibly for a pointer to any extra information (i.e. on the heap) that may otherwise be lost in the event of an abnormal interrupt.

Static Link: Used to communicate static scoping information to the callee that is necessary for data access. It may also be used in conjunction with the SL register, or to pass a display pointer rather than a static link, or it may remain unused.

Current RP: Reserved for use by the called procedure; this is where the current return address must be stored if the procedure uses RP (gr2) for any other purpose.

External/Stub RP (RP'), External sr4/LTP', and External DP/LTP: All three of these words are reserved for use by the inter-modular (external) calling mechanism. See Chapter 5 for more details.




2.2 Storage Areas Required for a Call


2.4 Fixed Arguments Area