|Function||Move-Negative data into register|
MVN[S] : Move Negative
MVN will move the complement of the specified data into the specified register.
If the S bit is set (MVNS), the N and Z flags are set according to the value moved (after shifting, if shifter used), and the C flag is set by the shifter.
MVN is useful for determining the complement of a value, and it is also a simple way to specify negative values (i.e. a SWI call wants -1 as a parameter).
You may be used to seeing this as "Move NOT", and I believe this is the original name of this instruction, as well as being quite descriptive of its behaviour. However MVN is referred to as Move Negative in official ARM documentation (ARM ARM 2nd ed; p A4-68) so this is the name that will be used here.
MVN<suffix> <dest>, <op 1>
dest = (NOT op_1)
MVN R0, #0 ; sets R0 to -1 MVN R0, #1 ; sets R0 to -2
The instruction bit pattern is as follows:
|31 - 28||27||26||25||24 - 21||20||19 - 16||15 - 12||11 - 0|
|condition||0||0||I||1 1 1 1||S||0 0 0 0||dest||op/shift|