HELPLIB.HLB  —  MACRO  Qualifiers  /PRESERVE
       /PRESERVE[=(option[,...])]
       /NOPRESERVE (default)

    Directs the compiler to generate special OpenVMS Alpha or OpenVMS
    I64 or OpenVMS x86-64 code throughout a module for all VAX MACRO
    instructions that rely on VAX guarantees of operation atomicity or
    granularity.

    The options are:

    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; the Itanium
                   compare-exchange (cmpxchg) instruction; or the
                   x86-64 compare-exchange (cmpxchg1/2/4) 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; the Itanium
                   compare-exchange (cmpxchg) instruction; or the
                   x86-64 compare-exchange (cmpxchg1/2/4) in code it
                   generates for VAX instructions with modify operands.

    /PRESERVE and /PRESERVE=(GRANULARITY,ATOMICITY) are equivalent.
    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.

    If you are aware of specific sections of VAX MACRO code that
    require VAX granularity and atomicity guarantees, you may not
    need the compiler to enforce these guarantees for the entire
    module. Instead, you can use the .PRESERVE and .NOPRESERVE
    directives to apply the guarantees only to those sections.
    Because the compiler does not need to generate expanded code
    for the entire module, these these directives can help optimize
    the code.

    Atomicity is guaranteed on multiprocessing systems as well as
    uniprocessing systems when you specify /PRESERVE=ATOMICITY.

    When the /PRESERVE qualifier is present, you can control the
    number of times compiler-generated code retries a granular or
    atomic update by specifying the /RETRY_COUNT qualifier.

                                 WARNING

       If /PRESERVE=ATOMICITY is turned on, any unaligned data
       references will result in a fatal reserved operand fault.
       If /PRESERVE=GRANULARITY is turned on, unaligned word
       references to addresses assumed aligned will also cause a
       fatal reserved operand fault.
Close Help