User`s guide

Preparing to Port Macro-32 Code
1.2 Differences Between the Compiler and the Assembler
Note
In general, code requiring that a memory read reference actually touch
memory should be examined carefully, as current or future optimizations
might move or remove the references.
1.2.4 Interleaving Instructions
Instruction scheduling, which is performed by default (see Section 4.3),
will interleave the Alpha or Itanium instructions generated from one VAX
instruction with the Alpha or Itanium instructions generated by surrounding VAX
instructions.
1.2.5 Reserved Operand Faults
On VAX systems, some VAX MACRO instructions might generate a reserved
operand fault if certain operands are out of a required range. For example, on a
bit manipulation instruction such as INSV, if the size operand is greater than 32,
a VAX system will generate a run-time reserved operand fault.
On OpenVMS Alpha and OpenVMS I64 systems, if the operand that is out of
range is a compile-time constant, the compiler will flag this condition with an
error message. However, if this operand is variable at run time, the compiler
makes no attempt to generate run-time range checks on it. If the operand is out
of range, the resulting operation might cause incorrect results yet not create a
fault.
1.3 Step-by-Step Porting Process for OpenVMS VAX to OpenVMS
Alpha or OpenVMS I64
The following steps have proven to be an efficient means for porting VAX MACRO
code to OpenVMS Alpha or OpenVMS I64:
1. Inspect each module you intend to port, from beginning to end, for coding
practices that prohibit its successful porting. Such scrutiny is necessary,
because it is impossible for the compiler to account for the myriad imaginative
uses of VAX MACRO code that take advantage of a comprehensive knowledge
of the VAX architecture. Such uses, if not detected and modified, can
undermine an effort to port VAX MACRO code to OpenVMS Alpha or
OpenVMS I64.
2. At each entry point in the module, add the appropriate entry-point directive.
These directives are:
• .CALL_ENTRY
• .JSB_ENTRY
• .JSB32_ENTRY
• .EXCEPTION_ENTRY (Alpha systems only)
You do not need to change the VAX MACRO entry point .ENTRY to .CALL_
ENTRY unless you want to use .CALL_ENTRY clauses. Nor do you need to
add the register arguments at this time.
See Section 2.3 for guidelines for the correct placement of these directives.
See Appendix B for a full syntax description of each.
1–4 Preparing to Port Macro-32 Code