User`s guide

How the MACRO Compiler Functions on Different Platforms
2.1 Using Alpha and Itanium Registers
Registers R13 and above are also available to VAX MACRO code that will be
compiled to OpenVMS Alpha or OpenVMS I64 object format. If you decide to use
these registers, review the following constraints:
Generally, existing VAX MACRO code uses only registers R0 through R11,
R12 through R14 being specially defined as the argument pointer (AP), frame
pointer (FP), and stack pointer (SP), respectively. The compiler will compile
legal uses of AP, FP, and SP as references to the Alpha or I64 registers that
have functions similar to the VAX registers. If a VAX MACRO source is
referencing AP as a scratch register, the compiler converts this reference to a
reference to R12. If this is not desirable, you should change the code to use a
different scratch register.
If the compiler detects a reference to R12, R13, and R14 in a VAX MACRO
source, it will not convert it to a reference to the Alpha or I64 equivalent of
AP, FP, or SP. Rather, it will consider the reference to be to the corresponding
Alpha integer register.
Code that uses R13 and above cannot be assembled by the VAX MACRO
assembler. Therefore, it should be conditionalized for OpenVMS Alpha or
OpenVMS I64 or appear in a module that is specific to OpenVMS Alpha or
OpenVMS I64.
The compiler allows you to access the full 64 bits of registers by using the
EVAX_LDQ and EVAX_STQ built-ins, as described in Appendix C.
You should take special care when referencing registers with specific
architected usage, as defined in the HP OpenVMS Calling Standard.
Registers 16 and above are scratch registers, as defined in the HP OpenVMS
Calling Standard. You cannot expect their values to survive across routine
calls.
The compiler may use registers R13 and above as temporary registers if they
are not used in the source code for a routine. R13 through R15 are saved and
restored if they are used.
On Alpha systems, saved registers are written on the stack. On I64 systems,
saved registers are copied to registers 32 through 127.
2.2 Itanium Architecture, Calling Standard, and Register Mapping
The Itanium architecture and OpenVMS I64 have several important differences
compared to the Alpha architecture and OpenVMS Alpha.
OpenVMS I64 systems employ 32 integer registers, R0 through R31, with R0
being a read-only register that contains 0. This is different from OpenVMS
Alpha, where R31 is a read-write register that contains 0.
In addition, the OpenVMS I64 calling standard has been written to be highly
compatible with the Intel calling standard, and is quite different from the
OpenVMS Alpha calling standard. For example, the standard return registers
on OpenVMS I64 are R8/R9, not R0/R1 as on OpenVMS Alpha. The OpenVMS
I64 calling standard reserves R1 as the GP (global pointer), does not include a
standardized FP (frame pointer), and only has R4 through R7 as preserved across
calls, not R2 through R15 as on OpenVMS Alpha.
Since Macro-32 source code is written with the OpenVMS VAX and OpenVMS
Alpha calling standards in mind, the compiler performs several transformations
to allow existing code to compile unmodified with the OpenVMS I64 compiler.
2–2 How the MACRO Compiler Functions on Different Platforms