User`s guide

How the MACRO Compiler Functions on Different Platforms
2.10 Using Floating-Point Instructions
Dirty zeros
Code may need modification to eliminate dirty zeros. A true zero in all VAX
floating-point formats has all bits set to zero. If the exponent bits are all zero
but some of the remaining bits are set, this is a dirty zero, and the OpenVMS
VAX system will treat this as a zero. An OpenVMS Alpha system will take a
reserved operand trap.
OpenVMS I64 does not support VAX format floats. However, the VAX float
emulation routines preserve the VAX behavior.
Restriction on format of arguments
Because these instructions are implemented by means of macros, there is one
restriction on the format of the arguments. In a macro invocation, an initial
circumflex ( ^ ) is interpreted to mean that the parameter is a string, and
the character immediately following the circumflex is the string delimiter.
Because of this, you cannot use arguments that begin with an operand type
specification, such as ^x20(SP). Note that immediate mode arguments, such
as #^XFF, can use an operand type specification because the circumflex is not
the initial character.
Floating-point return values
A MACRO program that calls out to a routine and expects a floating-point
return value in R0 may require a ‘‘jacket’ between the call and the called
routines. The purpose of the jacket is to move the returned value from
floating-point register 0 to R0.
2.10.2 Impact on Routines in Other Languages
This support does not make the floating-point register set visible to the compiler.
It simply allows floating point-operations to be done on the integer registers.
This means that routines in other languages that want to interface with a VAX
MACRO routine, either calling it or being called by it, must not expect any
floating-point values as inputs or outputs. Compilers for other languages will
pass these values in the floating-point registers. Floating-point arguments can be
passed into or out of a VAX MACRO routine only by pointer.
Calls to run-time library (RTL) routines of other languages fall into this category.
For example, a call to MTH$RANDOM returns a floating value in floating-point
register F0. The compiler cannot directly read F0. You need to either create a
jacket routine (in another language), which makes the call to MTH$RANDOM
and then moves the result to R0, or write a separate routine that only does the
move.
2.11 Preserving VAX Atomicity and Granularity
The VAX architecture includes instructions that perform a read-modify-write
memory operation so that it appears to be a single, noninterruptible operation
in a uniprocessing system. Atomicity is the term used to describe the ability
to modify memory in one operation. Because the complexity of such instructions
severely limits performance, read-modify-write operations on an Alpha or I64
system can be performed only by nonatomic, interruptible instruction sequences.
Furthermore, VAX instructions can address single-aligned or unaligned byte,
word, and longword locations in memory without affecting the surrounding
memory locations. (A data item is considered aligned if its address is an even
multiple of the item’s size in bytes.) Granularity is the term used to describe
the ability to independently write to portions of aligned longwords.
How the MACRO Compiler Functions on Different Platforms 2–21