When assembling an instruction using SP such as: ADD SP, r0, #100 the RVCT 3.x assembler will generate a diagnostic message, depending on whether assembling for ARM or Thumb. The RVCT 3.0 SP1 assembler reports: For ARM: Warning: A1745W: This register combination is DEPRECATED For Thumb: Warning: A1477W: This register combination results in UNPREDICTABLE behaviour The RVCT 3.1 assembler more clearly reports: For ARM: Warning: A1786W: This instruction using SP is deprecated in ARMv7 For Thumb: Error: A1477W: This register combination results in UNPREDICTABLE behaviour In RVCT 3.0 or RVCT 3.0 SP1, the assembler only gives warning on v6T2 and v7 architectures. In RVCT 3.1, the assembler gives messages about this for any architecture. The severity of the A1477W message is also set to ERROR by default in RVCT 3.1. 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, ADD r1,r0,#100 MOV sp, r1
|