movt
Move Top (A32)
MOVT<c> <Rd>, #<imm16>
Writes a 16-bit immediate to the top half of a register.
Details
Move Top writes a 16-bit immediate value into bits [31:16] of Rd while leaving bits [15:0] unchanged. No condition flags are affected. This is an A32 instruction (ARMv6T2 and later) available in all privilege levels.
Pseudocode Operation
imm16 ← imm4 : imm12
Rd[31:16] ← imm16
Rd[15:0] ← Rd[15:0]
Example
MOVT r0, #16
Encoding
Binary Layout
cond
00110
1
00
imm4
Rd
imm12
Operands
-
Rd
Destination general-purpose register -
imm16
Value
Reference (Arm AArch32 ISA)
Instruction Forms
| Encoding | Instruction | ISA | Bit pattern | ||
|---|---|---|---|---|---|
| 0x03400000 | MOVT{<c>}{<q>} <Rd>, #<imm16> | A32 | cond | 00110 | 1 | 00 | imm4 | Rd | imm12 | ||
| 0xF2C00000 | MOVT{<c>}{<q>} <Rd>, #<imm16> | T32 | 11110 | i | 10 | 1 | 100 | imm4 | 0 | imm3 | Rd | imm8 |
Description
Move Top writes an immediate value to the top halfword of the destination register. It does not affect the contents of the bottom halfword.
Operation
if ConditionPassed() then
EncodingSpecificOperations();
R[d]<31:16> = imm16;
// R[d]<15:0> unchanged