|ARM Technical Support Knowledge Articles|
Applies to: RealView Development Suite (RVDS)
When assembling an instruction using SP such as:
ADD SP, r0, #100
the RVCT 3.x and 4.0 assemblers will generate a diagnostic message, depending which architecture or processor you build for and whether assembling for ARM or Thumb.
The RVCT 3.0 SP1 assembler (building with
--cpu 7) reports:
Warning: A1745W: This register combination is DEPRECATED
Warning: A1477W: This register combination results in UNPREDICTABLE behaviour
The RVCT 3.1 and later assemblers (building with
--cpu 7) give clearer diagnostics like:
Warning: A1786W: This instruction using SP is deprecated in ARMv7
Error: A1477W: This register combination results in UNPREDICTABLE behaviour
In RVCT 3.0 (and SP1), the assembler only gives warning on v6T2 and v7 architectures. In RVCT 3.1 and RVCT 4.0 (until build 697 - see paragraph below), the assembler gives messages about this for any architecture. The severity of the A1477W message is also set to ERROR by default.
RVCT 4.0 b697 and later assemblers only report these diagnostics when assembling with
These diagnostic messages are due to changes in the ARM Architecture. Access to SP has always been limited in Thumb instructions. The recent version of ARM Architecture Reference Manual explains that the use of the SP in an ARM instruction, in any way that is not possible in the corresponding Thumb instruction, is deprecated. Hence the new deprecated warnings for ARM code above.
The warnings mean that these (ARM) instructions currently still work, but it would be a good idea to stop using them, especially in new code and in code that needs to be portable, because it is likely to disappear from the architecture in a future version. Users can ignore and/or suppress the warning/error by assembling with the "
--diag_suppress" switch. We recommend users to modify their code to avoid this deprecated use of SP. For example:
MOV sp, r1
You will also see similar messages if you use other assembly instructions which result in unpredictable behaviour, for example, when building the following Thumb-2 instruction with
STREX r0, r6, [r0]
Article last edited on: 2009-12-30 18:24:31
Did you find this article helpful? Yes No
How can we improve this article?