The argument list in an Alpha call is an ordered set of zero or more argument items, which together comprise a logically contiguous structure known as the argument item sequence. An argument item is represented in 64 bits.
An argument item may be used to pass immediate arguments, arguments by reference, and arguments by descriptor. The standard permits any combination of these mechanisms in an argument list.
Although the argument items form a logically contiguous sequence, they are in practice mapped to integer and floating-point registers and to memory in a fashion that may produce a physically discontiguous argument list. Registers R16..R21 and F16..F21 are used to pass the first six items of the argument item sequence. Additional argument items must be passed in a memory argument list that must be located at 0 (SP) at the time of the call.
The following table specifies the standard locations in which argument items can be passed.
Table 4-1 Argument Item Locations
Item |
Integer registers |
Floating-point registers | Stack |
1 | R16 | F16 | |
2 | R17 | F17 | |
3 | R18 | F18 | |
4 | R19 | F19 | |
5 | R20 | F20 | |
6 | R21 | F21 | |
7...n | 0(SP)...(n-7)*8(SP) |
The general rules that determine the location of any specific argument can be summarized as follows:
The argument list, including both the in-memory portion as well as the portion that is passed in registers, may be read and written by the called procedure. The calling procedure must therefore not make any assumptions about the validity of any part of the argument list after the completion of a call.