User`s guide

MACRO Compiler Directives
.PRESERVE
.PRESERVE
Directs the compiler to generate special OpenVMS Alpha or OpenVMS I64
code throughout a module for all VAX MACRO instructions that rely on VAX
guarantees of operation atomicity or granularity.
Format
.[NO]PRESERVE argument-list
Parameters
argument-list
One or more of the symbolic arguments listed in the following table:
Option Description
GRANULARITY Preserves the rules of VAX granularity of writes.
Specifying .PRESERVE=GRANULARITY causes the
compiler to use Alpha Load-locked and Store-conditional
instruction sequences or the Itanium compare-exchange
(cmpxchg) instruction in code it generates for VAX
instructions that perform byte, word, or unaligned
longword writes.
ATOMICITY Preserves atomicity of VAX modify operations.
Specifying .PRESERVE=ATOMICITY causes the
compiler to use Alpha Load-locked and Store-conditional
instruction sequences or the Itanium compare-exchange
(cmpxchg) instruction in code it generates for VAX
instructions with modify operands.
Description
The .PRESERVE and .NOPRESERVE directives cause the compiler to generate
special Alpha assembly code for VAX MACRO instructions, within portions of the
source module, that rely on VAX guarantees of operation atomicity or granularity
(see Section 2.11).
Use of .PRESERVE or .NOPRESERVE without specifying GRANULARITY or
ATOMICITY will affect both options. When preservation of both granularity and
atomicity is enabled, and the compiler encounters a VAX coding construct that
requires both granularity and atomicity guarantees, it enforces atomicity over
granularity.
Alternatively, you can use the /PRESERVE and /NOPRESERVE compiler
qualifiers to affect the atomicity and granularity in generated code throughout
an entire MACRO source module, though this is not recommended, because the
overhead of the extra code where it is not needed can slow the program down
considerably.
Atomicity is guaranteed for multiprocessing systems as well as uniprocessing
systems when you specify .PRESERVE ATOMICITY.
Specialized Directives B–17