ARM Instruction Reference
ARM DUI 0068B
Copyright © 2000, 2001 ARM Limited. All rights reserved.
4-13
label
is a program-relative expression. See
Register-relative and
program-relative expressions
on page 3-23 for more information.
label
must be within
±
255 bytes of the current instruction.
Offset
is an offset applied to the value in
Rn
(see
Offset syntax
).
!
is an optional suffix. If
!
is present, the address including the offset is
written back into
Rn
. You cannot use the
!
suffix if
Rn
is r15.
Zero offset
The value in
Rn
is used as the address for the transfer.
Pre-indexed offset
The offset is applied to the value in
Rn
before the transfer takes place. The result is used
as the memory address for the transfer. If the
!
suffix is used, the result is written back
into
Rn
.
Program-relative
This is an alternative version of the pre-indexed form. The assembler calculates the
offset from the PC for you, and generates a pre-indexed instruction with the PC as
Rn
.
You cannot use the
!
suffix.
Post-indexed offset
The value in
Rn
is used as the memory address for the transfer. The offset is applied to
the value in
Rn
after the transfer takes place. The result is written back into
Rn
.
Offset syntax
Both pre-indexed and post-indexed offsets can be either of the following:
#
expr
{-}
Rm
where:
-
is an optional minus sign. If
-
is present, the offset is subtracted from
Rn
.
Otherwise, the offset is added to
Rn
.
expr
is an expression evaluating to an integer in the range –255 to +255. This
is often a numeric constant (see examples below).