User`s guide

2
How the MACRO Compiler Functions on
Different Platforms
The MACRO Compiler for OpenVMS Systems has been designed to help you port
VAX MACRO source code from OpenVMS VAX to OpenVMS Alpha or OpenVMS
I64. When operating on VAX MACRO code that complies with the restrictions
and guidelines described in this manual, the compiler produces a valid OpenVMS
Alpha or OpenVMS I64 object module that preserves the semantics of the original
VAX MACRO source and adheres to the OpenVMS Alpha or OpenVMS I64 calling
standard.
This chapter contains the following topics:
• Section 2.1, Using Alpha and Itanium Registers
• Section 2.2, Itanium Architecture, Calling Standard, and Register Mapping
• Section 2.3, Routine Calls and Declarations
• Section 2.4, Declaring CALL Entry Points
• Section 2.5, Declaring JSB Routine Entry Points
• Section 2.6, Declaring a Routine’s Register Use
• Section 2.7, Branching Between Local Routines
• Section 2.8, Declaring Exception Entry Points (OpenVMS Alpha only)
• Section 2.9, Using Packed Decimal Instructions
• Section 2.10, Using Floating-Point Instructions
• Section 2.11, Preserving VAX Atomicity and Granularity
• Section 2.12, Compiling and Linking
• Section 2.13, Debugging
2.1 Using Alpha and Itanium Registers
OpenVMS Alpha systems and OpenVMS I64 systems employ 32 integer registers,
R0 through R31. Code generated by the OpenVMS Alpha compiler uses Alpha
registers R0 through R12 as if they were VAX registers, and the OpenVMS
I64 compiler automatically maps VAX registers to alternate Itanium registers.
Thus, VAX MACRO code usage of these registers (for instance, as input to
JSB routines) does not have to change to achieve a correct compilation. VAX
MACRO instructions (such as MOVL and ADDL) use the lower 32 bits of the
Alpha or Itanium register involved in the operation. The compiler maintains a
sign-extended 64-bit form of this value in the register.
How the MACRO Compiler Functions on Different Platforms 2–1