| |||
| Home > ARM and Thumb Instructions > General data processing instructions > MOV and MVN | |||
Move and Move Not.
MOV{S}{cond}Rd,Operand2
MOV{cond}Rd, #imm16
MVN{S}{cond}Rd,Operand2
where:
Sis an optional suffix. If S is
specified, the condition code flags are updated on the result of
the operation.
condis an optional condition code.
Rdis the destination register.
Operand2is a flexible second operand.
imm16is any value in the range 0-65535.
The MOV instruction copies the value of into Operand2.Rd
The MVN instruction takes the value of ,
performs a bitwise logical NOT operation on the value, and places
the result into Operand2.Rd
In certain circumstances, the assembler can substitute MVN for MOV,
or MOV for MVN. Be aware of this when
reading disassembly listings.
You cannot use PC (R15) for ,
or in Rd, in
32-bit Thumb Operand2MOV or MVN instructions.
With the following exceptions, you cannot use SP (R13)
for , or in Rd:Operand2
MOV{, where cond}.W Rd,
SP is
not SPRd
MOV{,
where cond}.W SP, Rm is not SP.Rm
You can use PC or SP in 16-bit Thumb MOV{ instructions but these instructions in which both cond}
Rd, Rm and Rd are
SP or PC are deprecated in ARMv6T2 and above.Rm
You cannot use PC or SP in any other MOV{S} or MVN{S} 16-bit
Thumb instructions.
You cannot use PC for or
any operand in any data processing instruction that has a register-controlled
shift.Rd
In instructions without register-controlled shift, use of PC is deprecated except the following cases:
MOVS PC, LR
MOV PC, R when mR is
not PC or SPm
MOV Rd, PC when R is
not PC or SP.d
You can use SP for R or dR.
But these are deprecated except the following cases:m
MOV SP, R when mR is
not PC or SPm
MOV Rd, SP when R is
not PC or SP.d
You cannot use PC for R in dMOV
R if
the d, #imm16#imm16 value is not a permitted Operand2 value.
You can use PC in forms with Operand2 without
register-controlled shift.
The deprecation of PC and SP in ARM instructions only apply to ARMv6T2 and above.
If you use PC as ,
the value used is the address of the instruction plus 8.Rm
If you use PC as :Rd
Execution branches to the address corresponding to the result.
If you use the S suffix,
see the SUBS pc,lr instruction.
If S is specified, these instructions:
update the N and Z flags according to the result
can update the C flag during the calculation of Operand2
do not affect the V flag.
The following forms of these instructions are available in Thumb code, and are 16-bit instructions:
MOVS Rd,
#imm must
be a Lo register. Rd range
0-255.imm
MOVS Rd, Rm and Rd must
both be Lo registers.Rm
MOV Rd, RmIn architectures before ARMv6, either or Rd,
or both, must be a Hi register. In ARMv6 and above, this restriction
does not apply.Rm
The # form
of the ARM instruction is available in ARMv6T2 and above. The other
forms of the ARM instruction are available in all versions of the
ARM architecture.imm16
These 32-bit Thumb instructions are available in ARMv6T2 and above.
These 16-bit Thumb instructions are available in all T variants of the ARM architecture.