User`s guide

Macros for 64-Bit Addressing
$SETUP_CALL64
Description
This macro initializes the state for a 64-bit call. It must be used before using
$PUSH_ARG64 and $CALL64.
If there are six or fewer arguments on OpenVMS Alpha, or eight or fewer on
OpenVMS I64, the code is always in line.
By default, if there are more than six arguments on OpenVMS Alpha or eight
arguments on OpenVMS I64, this macro creates a JSB routine that is invoked to
perform the actual call. However, if the inline option is specified as inline=true,
the code is generated in line.
This option should be enabled only if the code in which it appears has a
fixed stack depth. A fixed stack depth can be assumed if no RUNTIMSTK or
VARSIZSTK messages have been reported. Otherwise, if the stack alignment is
not at least quadword, there might be many alignment faults in the called routine
and in anything the called routine calls. The default behavior (inline=false) does
not have this problem.
If there are more than six arguments on OpenVMS Alpha or eight arguments
on OpenVMS I64, there can be no references to AP or SP between a $SETUP_
CALL64 and the matching $CALL64, because the $CALL64 code may be in a
separate JSB routine. In addition, temporary registers (R16 and above) may
not survive the $SETUP_CALL64. However, they can be used within the range,
except where (on Alpha only) R16 through R21 interfere with the argument
registers already set up. In such cases, higher temporary registers should be used
instead.
Note
The $SETUP_CALL64, $PUSH_ARG64, and $CALL64 macros are
intended to be used in an inline sequence. That is, you cannot branch into
the middle of a $SETUP_CALL64/$PUSH_ARG64/$CALL64 sequence,
nor can you branch around $PUSH_ARG64 macros or branch out of the
sequence to avoid the $CALL64.
$PUSH_ARG64
Does the equivalent of argument pushes for a call.
Format
$PUSH_ARG64 argument
Parameters
argument
The argument to be pushed.
E–2 Macros for 64-Bit Addressing