| |||
| Home > ARM and Thumb Instructions > Coprocessor instructions > LDC, LDC2, STC, and STC2 | |||
Transfer Data between memory and Coprocessor.
op{L}{cond}coproc,CRd, [Rn]
op{L}{cond}coproc,CRd, [Rn, #{-}offset] ; offset addressing
op{L}{cond}coproc,CRd, [Rn, #{-}offset]! ; pre-index addressing
op{L}{cond}coproc, CRd, [Rn],#{-}offset; post-index addressing
op{L}{cond}coproc,CRd,label
where:
opis one of LDC, LDC2, STC,
or STC2.
condis an optional condition code.
In ARM code, is
not permitted for condLDC2 or STC2.
Lis an optional suffix specifying a long transfer.
coprocis the name of the coprocessor the instruction is
for. The standard name is p, where n is
an integer in the range 0 to 15.n
CRdis the coprocessor register to load or store.
Rnis the register on which the memory address is based. If PC is specified, the value used is the address of the current instruction plus eight.
-is
an optional minus sign. If - is present,
the offset is subtracted from . Otherwise,
the offset is added to Rn.Rn
offsetis an expression evaluating to a multiple of 4, in the range 0 to 1020.
!is
an optional suffix. If ! is present, the address including the offset
is written back into .Rn
labelis a word-aligned PC-relative expression.
must
be within 1020 bytes of the current instruction.label
The use of these instructions depends on the coprocessor. See the coprocessor documentation for details.
In ThumbEE, if the value in the base register is zero, execution branches to the NullCheck handler at HandlerBase - 4.
LDC and STC are available in all
versions of the ARM architecture.
LDC2 and STC2 are available in ARMv5T
and above.
These 32-bit Thumb instructions are available in ARMv6T2 and above.
There are no 16-bit Thumb versions of these instructions.
You cannot use PC for R in
the pre-index and post-index instructions. These are the forms that write
back to nR.n
You cannot use PC for R in
Thumb nSTC and STC2 instructions.
ARM STC and STC2 instructions that
use the label syntax, or where R is
PC, are deprecated in ARMv6T2 and above.n
Using the Assembler: