Register usage

The following list shows register usage and linkage.
     GPR0     => writable Static Area (WSA)
     GPR1-3   => arguments (depending upon type)
     GPR4-12  => preserved
     GPR12    => CAA, the key Language Environment control block
     GPR13    => the caller's stack frame in the Language Environment stack.
                 Each such stack frame begins with a 36-word save area.
     GPR14    => the return point in the caller's routine
     GPR15    => the entry point in the called routine
     FPRs     => arguments (depending upon type)
Start of change     VR24-31  => arguments (depending upon type)End of change

Some of the caller's arguments are placed in registers and the remainder in a portion of what will be the callee's stack frame. With FASTLINK the caller enters the called routine at an offset of 16 bytes from the called routine's entry point.

Note:
  1. The module is assumed to be readonly and never changed during execution, in particular the eyecatcher, frame size or offset to PPA1 do not change during execution.
  2. The frame size field in the prolog above is owned by the compiled module and the value it contains is whatever is required by the prolog of the routine. It does not necessarily contain the precise value of the dsa size. For example, in C++ vararg routines, it contains the size of the fixed portions of the stack frame. Since the frame size may change from one call to the next and the size of the argument area is passed from the caller to the callee, a runtime calculation of the actual dsa size is required.
  3. The eyecatcher is changed slightly to signify that this procedure uses the FASTLINK dsa layout and is thus prepared for future support of extended addresses.
FASTLINK is designed to operate in conjunction with the Language Environment-provided execution stack. The current stack pointer is maintained in GPR13. The prolog of a Language Environment-enabled routine may allocate space (referred to as a "frame", "stack frame" or "dsa") in this stack for its own purposes and to support subsequent calls to other routines. The stack frame is an architected area that contains the following subtopics: