MVN

From ARMwiki
Revision as of 07:31, 1 September 2011 by Admin (Talk | contribs)

Jump to: navigation, search
MVN
Instruction MVN[S]
Function Move-not data into register
Category Data processing
ARM family All
Notes -

Contents

MVN[S]

MVN will move the complement of the specified data into the specified register.

Operand 1 may be another register, a shifted register, or an immediate value (which may be shifted).

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).

Syntax

  MVN<suffix>  <dest>, <op 1>

Function

  dest = (NOT op_1)

Example

  MVN  R0, #1         ; sets R0 to -1

Technical

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
Personal tools
Namespaces

Variants
Actions
Navigation
Contents
Toolbox