I used a website to encode this:
movw $8, 4(%r8d,%esi,4)
and got:
encoding (hex): 67 66 41 C7 44 B0 04 08 00
Thanks to you I nearly understand everything except 2 small points:
- Here we are moving 2 bytes immediate to 4 bytes address. They used C7 opcode which according to the table I have means one of the following:
- mov imm16 to r/m16
- mov imm32 to r/m32
- mov imm32 (sign extended) to r/m64
Why there is no match?
- Why immediate is 2 bytes? according to what?