MOVK
Replace one halfword
Replace one 16-bit halfword while retaining the other bits within the selected width.
| Form | Bits | Requires | Encoding |
|---|---|---|---|
MOVK Wd, #imm{, LSL #shift} | 32 | Armv8-A | 0111001010xxxxxxxxxxxxxxxxxxxxxx |
MOVK Xd, #imm{, LSL #shift} | 64 | Armv8-A | 111100101xxxxxxxxxxxxxxxxxxxxxxx |
Operation#
Pseudo-C · selected form
Rd = (old_Rd AND NOT(0xffff << shift)) OR (imm << shift)What to watch for
- Omitted shift means zero. The immediate is not sign-extended.
- The W form still clears Xd[63:32], even though it keeps other bits of Wd.
Architectural details#
- Flags
- NZCV unchanged.
- Destination
- Writing Wd clears the corresponding X register’s upper 32 bits. Writes to ZR are discarded; SP is not accepted.
- Encoding
0111001010xxxxxxxxxxxxxxxxxxxxxx- Operands
Wdread / write · 32 bitsimmreadshiftread
- Coverage
- Selected baseline A64 scalar register forms.
- imm
- 0 to 65535.
- shift
- 0, 16.
Exception information & execution requirements
Complete exception conditions have not been imported.
MRS supplies encoding and availability conditions, not an exhaustive exception model.
Feature availability alone does not guarantee execution: OS state and execution-level controls also apply. Use the linked architecture documentation for the full exception conditions.
Sources & provenance#
Technical fields are imported from pinned upstream files. Explanations and explorer behavior are maintained separately.
Architectural references for this form
Arm · aarchmrs
- Revision
2026-03_rel- SHA-256
bf355d263eed08ef6b3e4e680e6bba3642fa7c3dd0be77ffb4783420041a0860- Terms
- BSD-3-Clause