Microprocessor Design and the ARM

Register Move Operations

MOV r0, r1 ; r0 := r1
The MOV instruction loads a value (either a literal or from a source register, e.g. r1) into the destination register (e.g. r0 in this example). A MOV instruction that has the same source and destination registers does not do anything!

MVN r0, r1 ; r0 := not r1
MVN is shorthand for "move negated". The MVN instruction take a value (which may be a literal or held in a register), inverts all the bits in this value, and then places it into the destination register.

r1: 1101 0110 1010 0000 0111 0101 1010 0011
r0: 0010 1001 0101 1111 1000 1010 0101 1100

The MVN instruction allows a programmer to put a negative value into a register. As 2's complement is involved, it will be necessary to move one less than the desired value.

MVN r0, #0 ; moves -1 into r0