One of the distinguishing characteristics of any calling standard is how procedures are represented. The term used to denote the value that uniquely identifies a procedure is a procedure value. If the value identifies a bound procedure then it is called a bound procedure value.
In the Windows NT for Alpha Systems calling standard, a simple (not bound) procedure value is defined as the address of the first instruction of that procedure's entry code.
A bound procedure value is defined as the address of the first instruction of an instruction sequence that establishes the correct execution context for the bound procedure.
In addition, procedures in the Windows NT for Alpha Systems calling standard are associated with a data structure called a procedure descriptor. This structure describes various aspects of the procedure's code that are required for correct and robust exception handling. The exception processing described by this standard is based on the assumption that any given program counter value can be mapped to an associated procedure descriptor that describes the currently active procedure.
Table2-1 General Purpose, Integer Register Usage
Register | Usage |
R0 | Function value register. In a standard call that returns a non-floating-point function result in a register, the result must be returned in this register. In a standard call, this register may be modified by the called procedure without being saved and restored. |
R1..R8 | Conventional scratch registers. In a standard call, these registers may be modified by the called procedure without being saved and restored. |
R9..R14 | Conventional saved registers. If a standard-conforming procedure modifies one of these registers, it must save and restore it. |
R15 | FP, Stack Frame Base register. For procedures with a run-time variable amount of stack, this register is used to point at the base of the stack frame (fixed part of the stack). For all other procedures this register has no special significance. If a standard-conforming procedure modifies this register, it must save and restore it. |
R16..R21 | Argument registers. In a standard call, up to six non-floating-point items of the argument list are passed in these registers. In a standard call, these registers may be modified by the called procedure without being saved and restored. |
R22..R25 | Conventional scratch registers. In a standard call, these registers may be modified by the called procedure without being saved and restored. |
R26 | RA, Return Address register. In a standard call, the return address must be passed and returned in this register. |
R27 | Conventional scratch register. In a standard call, this register may be modified by the called procedure without being saved and restored. |
R28 | Volatile scratch register. The contents of this register are always unpredictable after any external or internal transfer of control to or from a different procedure. This applies to both standard and nonstandard calls. This register may be used by the operating system for external call fixup, autoloading, and exit sequences. R28 can be freely used as a scratch register within a procedure. |
R29 | GP, Global Pointer or saved register. In a main (static) image, this register contains a pointer to a region of global storage (addresses and variables) constructed by the linker. In a dDynamic-lLink library (DLL), this register must not be used in any way. |
R30 | SP, the Stack Pointer. This register contains a pointer to the top of the current operating stack. Aspects of its usage and alignment are defined by the hardware architecture. Various software aspects of its usage and alignment are defined in Section 3.2.1, Call Conventions. |
R31 | RZ, ReadAsZero/Sink. Hardware defined: binary zero as a source operand, sink (no effect) as a result operand. |