4.5 Load immediate values using MOV32
To load any 32-bit immediate value, a pair of
MOVT instructions is equivalent to a
In ARMv6T2 and later, both ARM and Thumb
instruction sets include:
MOV instruction that can load any value in the
0x0000FFFF into a register.
MOVT instruction that can load any value in
0xFFFF into the most significant half of a register,
without altering the contents of the least significant half.
You can use these two instructions to construct any 32-bit
immediate value in a register. Alternatively, you can use the
The assembler generates the
pair for you.
You can also use the
to load addresses into registers by using a label or any PC-relative
expression in place of an immediate value. The assembler puts a
relocation directive into the object file for the linker to resolve
the address at link-time.