05.02.2013 Views

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Deprecated <strong>and</strong> Obsolete Features<br />

D.5 Use of the SP as a general-purpose register<br />

In the Thumb instruction set, you can only use the SP (R13) in a restricted set of instructions. This set covers<br />

all the legitimate uses of the SP as a stack pointer. An attempt to encode any other instruction with SP in<br />

place of a legitimate register results in either UNPREDICTABLE behavior, or a different instruction.<br />

In addition, the use of SP (R13) as Rm in the high register forms of the 16-bit CMP <strong>and</strong> ADD instructions is<br />

deprecated. Also, some forms of MOV (register) that use SP are deprecated, see MOV (register) on<br />

page A8-196.<br />

Most <strong>ARM</strong> instructions, unlike Thumb instructions, provide exactly the same access to the SP as to R0-R12.<br />

This means that it is possible to use the SP as a general-purpose register. However, the use of the SP in an<br />

<strong>ARM</strong> instruction, in any way that is not possible in the corresponding Thumb instruction, is deprecated.<br />

See <strong>ARM</strong> instructions where SP use is not deprecated for a list of instructions that you can use for SP<br />

manipulation.<br />

D.5.1 <strong>ARM</strong> instructions where SP use is not deprecated<br />

The use of the SP is deprecated in any <strong>ARM</strong> instruction that is not specified in this section.<br />

Some uses of the SP are not deprecated in the following <strong>ARM</strong> data-processing instructions:<br />

ADD (SP plus immediate) on page A8-28<br />

ADD (SP plus register) on page A8-30<br />

CMN (immediate) on page A8-74<br />

CMN (register) on page A8-76<br />

CMP (immediate) on page A8-80<br />

CMP (register) on page A8-82<br />

MOV (register) on page A8-196<br />

SUB (SP minus immediate) on page A8-426<br />

SUB (SP minus register) on page A8-428.<br />

In these <strong>ARM</strong> instructions, the uses of the SP that are not deprecated are the same as those uses listed in<br />

32-bit Thumb instruction support for R13 on page A6-4.<br />

The use of the SP as the base register in load/store/preload instructions is not deprecated. In addition, the<br />

use of the SP as destination or source register is not deprecated in the following instructions:<br />

LDR (immediate, <strong>ARM</strong>) on page A8-120<br />

LDR (literal) on page A8-122<br />

LDR (register) on page A8-124<br />

STR (immediate, <strong>ARM</strong>) on page A8-384<br />

STR (register) on page A8-386.<br />

AppxD-8 Copyright © 1996-1998, 2000, 2004-2008 <strong>ARM</strong> Limited. All rights reserved. <strong>ARM</strong> DDI 0406B

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!