Load a register with either a 32-bit immediate value or any address.
is an optional condition code.
is the register to be loaded.
must not be SP or PC.
can be any one of the following:
A label in this or another program area.
Any 32-bit immediate value.
A label plus a 32-bit immediate value.
MOV32 always generates two 32-bit instructions, a
MOVT pair. This enables you to load any 32-bit immediate, or to access
the whole 32-bit address space.
The main purposes of the
To generate literal constants when an immediate value cannot be generated in a single instruction.
To load a PC-relative or external address into a register. The address remains valid regardless of where the linker places the ELF section containing the
An address loaded in this way is fixed at link time, so the code is not position-independent.
MOV32 sets the Thumb bit (bit 0)
of the address if the label referenced is in Thumb code.
This pseudo-instruction is available in ARMv6T2 and above in both ARM and Thumb.
MOV32 r3, #0xABCDEF12 ; loads 0xABCDEF12 into R3 MOV32 r1, Trigger+12 ; loads the address that is 12 bytes ; higher than the address Trigger into R1