Difference between movq and movabsq in x86-64

In NASM / Intel syntax, mov r64, 0x… picks a MOV encoding based on the constant. There are four to choose from with immediate operands: 5 byte mov r32, imm32. (zero-extended to fill the 64-bit register like always). AT&T: mov/movl 6+ byte mov r/m32, imm32. only useful for memory destinations. AT&T: mov/movl 7+ byte mov r/m64, sign-extended-imm32. Can store 8 bytes to memory, or set … Read more