Move wide with keep moves an optionally-shifted 16-bit immediate value into a register, keeping other bits unchanged.
用keep进行宽移将一个可选择移位的16位立即值移动到寄存器中,保持其他位不变。
32-bit variant
MOVK <Wd>, #<imm>{, LSL #<shift>}
64-bit variant
MOVK <Xd>, #<imm>{, LSL #<shift>}
Operation
bits(datasize) result;
result = X[d];
result<pos+15:pos> = imm16;
X[d] = result;
4007f8: d28000c0 mov x0, #0x6 // #6 x0=6
4007fc: f2a00200 movk x0, #0x10, lsl #16 // x0 = 0x10<<16 ==> x0 = 0x100006
400800: f90013a0 str x0, [x29, #32]
unsigned int d = 0x100006;
403d64: 529999bc mov w28, #0xcccd // #52429
403d68: 72b9999c movk w28, #0xcccc, lsl #16 // w28=0xcccccccd
unsigned int e = 0xcccccccd;