Comment on Why do Windows functions all begin with a pointless MOV EDI, EDI instruction?parentComments−haberman14yCheck out the "smartalign" package in NASM: it contains 1-8 byte nop instructions for several different x86 variants: http://repo.or.cz/w/nasm.git/blob/a2c78555770990ed966c414da9...You can use xxd and objdump to see which all of these translate into. For example, here's an 8-byte nop for x86-64: $ echo '0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00' | xxd -r > /tmp/bincode $ objdump -M intel -D -b binary -mi386 -Mx86-64 /tmp/bincode /tmp/bincode: file format binary Disassembly of section .data: 00000000 <.data>: 0: 0f 1f 84 00 00 00 00 nop DWORD PTR [rax+rax*1+0x0] 7: 00
Comments
Check out the "smartalign" package in NASM: it contains 1-8 byte nop instructions for several different x86 variants: http://repo.or.cz/w/nasm.git/blob/a2c78555770990ed966c414da9...
You can use xxd and objdump to see which all of these translate into. For example, here's an 8-byte nop for x86-64: