Skip to content

Instantly share code, notes, and snippets.

@dneprDroid
Last active January 17, 2021 08:55
Show Gist options
  • Save dneprDroid/dc988c890b18a732a457c442366837ac to your computer and use it in GitHub Desktop.
Save dneprDroid/dc988c890b18a732a457c442366837ac to your computer and use it in GitHub Desktop.
ARM64 assembly instruction `MOVK Xd, #imm{, LSL #shift} `, http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0801c/pge1427897681726.html
;// store 3822
mov x8, #3822
;// next: (4969 << 16) | 3822
movk x8, #4969, lsl #16 ;// now `x8` is 325652206
;// next: (2 << 32) | ((4969 << 16) | 3822)
movk x8, #2, lsl #32 ;// now `x8` is 8915586798
@dneprDroid
Copy link
Author

mov     x8, #3822
movk    x8, #4969, lsl #16 
movk    x8, #2, lsl #32 

@dneprDroid
Copy link
Author

movk x8, #4969, lsl #16
x8 |= (4969 << 16)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment