User`s guide

How the MACRO Compiler Functions on Different Platforms
2.3 Routine Calls and Declarations
.ENTRY directives, note that you cannot do a massive replace with an editor
because the arguments do not match.
Note
Since the .ENTRY directive is converted to an OpenVMS Alpha or
OpenVMS I64 .CALL_ENTRY directive, any registers modified in the
routine declared by .ENTRY will be automatically preserved. This is
different from VAX MACRO behavior. See Section 2.4.2.
The .JSB_ENTRY directive indicates a routine that is executed as a result of
a JSB, BSBB, or BSBW instruction. The .JSB32_ENTRY directive is used for
specialized environments that do not require the preservation of the upper 32
bits of Alpha or Itanium register values.
The .JSB_ENTRY directive should also be used to declare entry points which
are the targets of JMP or branch instructions from other modules, since such
cross-module branches are implemented as JSBs by the compiler.
Branches to stored code addresses, such as JMP (R0), are also treated as JSB
instructions. Hence, potential targets must be declared with .JSB_ENTRY.
The compiler warns you of this when you attempt to store a code label or
when such a branch is used.
The .EXCEPTION_ENTRY directive (OpenVMS Alpha only) designates
exception service routines.
The .CALL_LINKAGE directive (OpenVMS I64 only) associates a named or
anonymous linkage with a routine name. When the compiler sees a CALLS,
CALLG, JSB, BSBB, or BSBW instruction with the routine name as the
target, it will use the associated linkage to decide which registers need to be
saved and restored around the call.
The .USE_LINKAGE directive (OpenVMS I64 only) establishes a temporary
named or anonymous linkage that will be used by the compiler for the next
CALLS, CALLG, JSB, BSBB, or BSBW instruction processed in lexical order.
The .DEFINE_LINKAGE directive (OpenVMS I64 only) defines a named
linkage that can be used with subsequent .CALL_LINKAGE or .USE_
LINKAGE directives.
For more information about these directives, see Appendix B.
2.3.5 Code Generation for Routine Calls
The code generated for VAX JSB, BSBW, and BSBB instructions is very simple
because no parameter manipulation must be done. However, the code for CALLS
and CALLG instructions is more complex because the compiler must translate
the parameter handling of the OpenVMS VAX calling standard to the OpenVMS
Alpha calling standard or OpenVMS I64 calling standard.
When processing a CALLS instruction with a fixed argument count, the compiler
automatically detects any pushes onto the stack that are actually passing
parameters to a routine, and generates code that moves the parameters directly
to the registers used by the OpenVMS Alpha calling standard or OpenVMS I64
calling standard.
How the MACRO Compiler Functions on Different Platforms 2–7