User`s guide
Recommended and Required Source Changes
3.2 Instruction Stream
The compiler reports the following warning messages under the circumstances
described:
BRNDIRLOC, branch directive ignored in locked memory sequence
Explanation: The compiler found a .BRANCH_LIKELY directive within an
LDx_L/STx_C sequence.
User Action: None. The compiler will ignore the .BRANCH_LIKELY
directive and, unless other coding guidelines are violated, the code will work
as written.
BRNTRGLOC, branch target within locked memory sequence in routine
’routine_name’
Explanation: A branch instruction has a target that is within an LDx_
L/STx_C sequence.
User Action: To avoid this warning, rewrite the source code to avoid
branches within or into LDx_L/STx_C sequences. Branches out of interlocked
sequences are valid and are not flagged.
MEMACCLOC, memory access within locked memory sequence in routine
’routine_name’
Explanation: A memory read or write occurs within an LDx_L/STx_C
sequence. This can be either an explicit reference in the source code, such as
‘‘MOVL data, R0,’’ or an implicit reference to memory. For example, fetching
the address of a data label (such as ‘‘MOVAB label, R0’’) is accomplished by a
read from the linkage section, the data area that is used to resolve external
references.
User Action: To avoid this warning, move all memory accesses outside the
LDx_L/STx_C sequence.
RETFOLLOC, RET/RSB follows LDx_L instruction
Explanation: The compiler found a RET or RSB instruction after an LDx_
L instruction and before finding an STx_C instruction. This indicates an
ill-formed lock sequence.
User Action: Change the code so that the RET or RSB instruction does not
fall between the LDx_L instruction and the STx_C instruction.
RTNCALLOC, routine call within locked memory sequence in routine ’routine_
name’
Explanation: A routine call occurs within an LDx_L/STx_C sequence.
This can be either an explicit CALL/JSB in the source code, such as ‘‘JSB
subroutine,’’ or an implicit call that occurs as a result of another instruction.
For example, some instructions such as MOVC and EDIV generate calls to
run-time libraries.
User Action: To avoid this warning, move the routine call or the instruction
that generates it, as indicated by the compiler, outside the LDx_L/STx_C
sequence.
STCMUSFOL, STx_C instruction must follow LDx_L instruction
Explanation: The compiler found an STx_C instruction before finding an
LDx_L instruction. This indicates an ill-formed lock sequence.
User Action: Change the code so that the STx_C instruction follows the
LDx_L instruction.
3–6 Recommended and Required Source Changes