Referring to Floating-Point Registers in Alpha Inline Assembly Code

Alpha systems have 32 floating-point registers, each of which is 64 bits wide. Each register can hold one single-precision (32-bit) value or one double-precision (64-bit) value. The floating-point registers have the names f0 to f31. Floating-point register f31 always contains the value 0. All other floating-point registers can be used interchangeably.

Note that, for historical reasons, it is possible to use several alias names for the floating-point registers on Alpha. The compiler will accept any of the forms listed in the following table. When creating the optional machine code listing (.COD) file, the compiler will display all floating-point register references using the following preferred names: v0, t0..t12, s0..s5, a0..a5, ra, at, gp, sp, or zero.

The following table describes the Alpha floating-point register naming conventions for Windows NT. For additional information, please see the Windows NT for Alpha Systems Calling Standard, Revision 1.11, which is included in Books Online with Visual C++ for Alpha.


Register
name
Alternate names
(for compatibility across DIGITAL operating systems)


Usage
f0 $f0, %f0 Floating-point function value register. In a standard call that returns a floating-point result in a register, this register is used to return the real part of the result. In a standard call, this register may be modified by the called procedure without being saved and restored.
f1 $f1, %f1 Floating-point function value register. In a standard call that returns a complex floating-point result in registers, this register is used to return the imaginary part of the result. In a standard call, this register may be modified by the called procedure without being saved and restored.
f2..f9 $f2..f9, %f2..%f9 Conventional saved registers. If a standard-conforming procedure modifies one of these registers, it must save and restore it.
f10..f15 $f10..$f15, %f10..%f15 Conventional scratch registers. In a standard call, it may be modified by the called procedure without being saved and restored.
f16..f21 $f16..$f21, %f16..%f21, or %0..%5 Argument registers. In a standard call, up to six floating-point arguments may be passed by value in these registers. In a standard call, these registers may be modified by the called procedure without being saved and restored.
f22..f30 $f22..$f30, %f22..%f30 Conventional scratch registers. In a standard call, these registers may be modified by the called procedure without being saved and restored.
f31 $f31, %f31 ReadAsZero/Sink. Hardware defined: binary zero as a source operand, sink (no effect) as a result operand.