Load immediate values using MOV32
To load any 32-bit immediate value, a pair of
MOVT instructions is equivalent to a
Both A32 and T32 instruction sets include:
MOVinstruction that can load any value in the range
0x0000FFFFinto a register.
MOVTinstruction that can load any value in the range
0xFFFFinto 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-bitimmediate value in a register. Alternatively, you can use the
MOV32 pseudo-instruction.The assembler generates the
MOVT instructionpair for you.
You can also use the
MOV32 instructionto load addresses into registers by using a label or any PC-relativeexpression in place of an immediate value. The assembler puts arelocation directive into the object file for the linker to resolvethe address at link-time.