The call conventions describe the rules and methods used to communicate certain information between the caller and the called procedure during invocation and return. For a standard call, these conventions include the following:
The calling procedure must pass to the called procedure the address to which control must be returned during a normal return from the called procedure. In most cases, the return address is the address of the instruction following the one that transferred control to the called procedure. For a standard call, the return address is passed in the return address register (R26).
The argument list is an ordered set of zero or more argument items, that together comprise a logically contiguous structure known as an argument item sequence. This logically contiguous sequence is in practice mapped to registers and memory in a fashion that produces an argument list that is not physically contiguous. In a standard call, the first six items are passed in registers R16..R21 and/or registers F16..F21. The remaining items are collected in a memory argument list that is a naturally aligned array of quadwords. In a standard call, this list (if present) must be passed at 0 (SP).
If a standard-conforming procedure is a function, and the function result is returned in a register, then the result is returned in R0, F0, or F0..F1. Otherwise, the function result is returned via the first argument item or dynamically.
The stack pointer (SP) must at all times denote an address that has octaword alignment. (This has the side effect that the in-memory portion of the argument list, if any, starts on an octaword boundary.) During a procedure invocation the SP may never be set to a value that is higher than the value of the SP at entry to that procedure invocation.
The contents of the stack located above the portion of the argument list that is passed in memory (if any) belong to the calling procedure and should therefore not be read or written by the called procedure, except as specified by indirect arguments or language-controlled up level references.
SP is used by the hardware in raising exceptions and asynchronous interrupts. It must be assumed that the contents of the stack below the current SP value and within the stack for the current thread are continually and unpredictably modified, as specified in the Alpha System Reference Manual and as a result of asynchronous software actions.