
DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10360_0
© NXP B.V. 2009. All rights reserved.
User manual
Rev. 00.06 — 5 June 2009
632 of 808
NXP Semiconductors
UM10360
Chapter 34: Appendix: Cortex-M3 User Guide
[Rn, #offset]
•
Pre-indexed addressing
The offset value is added to or subtracted from the address obtained from the register
Rn
. The result is used as the address for the memory access and written back into the
register
Rn
. The assembly language syntax for this mode is:
[Rn, #offset]!
•
Post-indexed addressing
The address obtained from the register
Rn
is used as the address for the memory
access. The offset value is added to or subtracted from the address, and written back
into the register
Rn
. The assembly language syntax for this mode is:
[Rn], #offset
The value to load or store can be a byte, halfword, word, or two words. Bytes and
halfwords can either be signed or unsigned. See
Section 34–2.3.5 “Address alignment”
shows the ranges of offset for immediate, pre-indexed and post-indexed
forms.
2.4.2.3
Restrictions
For load instructions:
•
Rt
can be SP or PC for word loads only
•
Rt
must be different from
Rt2
for two-word loads
•
Rn
must be different from
Rt
and
Rt2
in the pre-indexed or post-indexed forms.
When
Rt
is PC in a word load instruction:
•
bit[0] of the loaded value must be 1 for correct execution
•
a branch occurs to the address created by changing bit[0] of the loaded value to 0
•
if the instruction is conditional, it must be the last instruction in the IT block.
For store instructions:
•
Rt
can be SP for word stores only
•
Rt
must not be PC
•
Rn
must not be PC
•
Rn
must be different from
Rt
and
Rt2
in the pre-indexed or post-indexed forms.
2.4.2.4
Condition flags
These instructions do not change the flags.
Table 589. Offset ranges
Instruction type
Immediate offset
Pre-indexed
Post-indexed
Word, halfword, signed
halfword, byte, or
signed byte
−
255 to 4095
−
255 to 255
−
255 to 255
Two words
multiple of 4 in the
range
−
1020 to 1020
multiple of 4 in the
range -1020 to 1020
multiple of 4 in the
range
−
1020 to 1020