Integer Registers

Alpha systems have 32 integer registers. Each register is 64 bits wide. In other system architectures, integer registers are sometimes referred to as general registers.

The integer registers have the names $0 to $31.

Note You must include the leading dollar sign ($) whenever you specify a register.

Integer register $31 always contains the value 0. All other integer registers can be used interchangeably, except for integer register $30, which is assumed to be the stack pointer (certain PALcode assumes that $30 is the stack pointer).

The following table describes the Alpha integer registers:

Register name Alternate name
Use
$0 $v0 Used for expression evaluations and to hold the integer function results. Not preserved across procedure calls.
$1-$8 $t0-$t7 Temporary registers used for expression evaluations. Not preserved across procedure calls.
$9-$14 $s0-$s5 Saved registers. Preserved across procedure calls.
$15 $s6 or $fp Contains the frame pointer (if needed); otherwise, a saved register.
$16-$21 $a0-$a5 Used to pass the first six integer type actual arguments. Not preserved across procedure calls.
$22-$25 $t8-$t11 Temporary registers used for expression evaluations. Not preserved across procedure calls.
$26 $ra Contains the return address. Preserved across procedure calls.
$27 $pv or $t12 Contains the procedure value and used for expression evaluation. Not preserved across procedure calls.
$28 or $at $at Reserved for the assembler. Not preserved across procedure calls.
$29 or $gp $gp Contains the global pointer for compiler-generated code. Not preserved across procedure calls.

Note Register $gp should not be altered. For more information, refer to the Windows NT for Alpha Calling Standard.

$30 or $sp $sp Contains the stack pointer. Preserved across procedure calls.
$31 $zero Always has the value 0.