Technical data
Interlocked Memory Instructions (Alpha Only)
8.4 Coding Requirements
To correct this code, the memory access to read the value of INDEX must first
be moved outside the LDQ_L/STQ_C sequence. Next, the branch between the
LDQ_L and STQ_C, to the label IS_CLEAR, must be eliminated. In this case,
it could be done using a CMOVEQ instruction. The CMOVxx instructions are
frequently useful for eliminating branches around simple value moves. The
following example shows the corrected code:
movl index, r2 ; Get the current index
getlck: evax_ldql r0, lockdata(r8) ; and then the lock data.
evax_cmoveq r0, r3, r2 ; If zero, use special index.
incl r0 ; Increment lock count
evax_stqc r0, lockdata(r8) ; and store it.
tstl r0 ; Did write succeed?
beql getlck ; Retry if not.
8.5 Compiler Versions
This section contains information about versions of compilers that may generate
noncompliant code sequences and the recommended versions to use when
recompiling.
Table 8–1 contains information for OpenVMS compilers.
Table 8–1 OpenVMS Compilers
Old Version Recommended Minimum Version
BLISS V1.1 BLISS V1.3
DEC Ada V3.5 Compaq Ada V3.5A
DEC C V5.x DEC C V6.0
DEC C++ V5.x DEC C++ V6.0
DEC COBOL V2.4, V2.5 Compaq COBOL V2.6
DEC Pascal V5.0-2 DEC Pascal V5.1-11
MACRO–32 V3.0 V3.1 for OpenVMS Version 7.1-2
V4.1 for OpenVMS Version 7.2
MACRO–64 V1.2 See below.
Current versions of the MACRO–64 assembler may still encounter the loop
rotation issue. However, MACRO–64 does not perform code optimization by
default, and this problem occurs only when optimization is enabled. If SRM_
CHECK indicates a noncompliant sequence in the MACRO–64 code, it should
first be recompiled without optimization. If the sequence is still flagged when
retested, the source code itself contains a noncompliant sequence that must be
corrected.
8.6 Recompiling Code with ALONONPAGED_INLINE or
LAL_REMOVE_FIRST Macros
Any MACRO–32 code on OpenVMS Alpha that invokes either the
ALONONPAGED_INLINE or the LAL_REMOVE_FIRST macros from the
SYS$LIBRARY:LIB.MLB macro library must be recompiled on OpenVMS Version
7.2 or later versions to obtain a correct version of these macros. The change to
these macros corrects a potential synchronization problem that is more likely to
be encountered on newer processors, starting with Alpha 21264 (EV6).
Interlocked Memory Instructions (Alpha Only) 8–5










