| |||
| Home > ARM Instruction Reference > ARM memory access instructions > LDR and STR, doublewords | |||
Load two consecutive registers and store two consecutive registers, 64-bit doubleword.
These instructions have four possible forms:
zero offset
pre-indexed offset
program-relative
post-indexed offset.
The syntax of the four forms are, in the same order:
op{cond}DRd, [Rn]
op{cond}DRd, [Rn,Offset]{!}
op{cond}DRd,label
op{cond}DRd, [Rn],Offset
where:
opis either LDR or STR.
condis an optional condition code (see Conditional execution).
Rdis one of the ARM registers to load or save. Theother
one is . R(d+1) must
be an even numbered register, and not Rdr14.
Rnis the register on which the memory address is based.
must
not be the same as Rn or Rd,
unless the instruction is either:R(d+1)
zero offset
pre-indexed without writeback.
Offsetis an offset applied to the value in (see Offset syntax).Rn
labelis a program-relative expression. See Register-relative and program-relative expressions for more information.
must
be within ±252 bytes of the current instruction.label
!is
an optional suffix. If ! is present, the final address including
the offset is written back into .Rn
The offset is applied to the value in before
the transfers take place. The result is used as the memory address
for the transfers. If the Rn! suffix is used,
the address is written back into .Rn
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.
The value in 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.Rn
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 . Otherwise,
the offset is added to Rn.Rn
expris an expression evaluating to an integer in the range –255 to +255. This is often a numeric constant (see examples below).
Rmis a register containing a value to be used as the
offset. For loads, must not
be the same as Rm or Rd.R(d+1)
This is the same offset syntax as for LDR and STR, halfwords and signed bytes.
The address must be a multiple of eight for doubleword transfers.
If your system has a system coprocessor, you can enable alignment checking. Non doubleword-aligned 64-bit transfers cause an alignment exception if alignment checking is enabled.