<<
24/64
>>
First
Last
Mod R/M
% cat tmp.s
mov %rax, %rdx
mov %eax, %edx
% gcc -c tmp.s && objdump -d tmp.o | grep mov
0: '''48 89 c2''' mov %rax,%rdx
3: 89 c2 mov %eax,%edx
- REX: 0x48 == 0100_1_0_0_0 (0100 REX.w REX.r REX.x REX.b)
- mov: 0x89
- Mod R/M: 0xc2 == '''11'''_000_010 ('''Mod''' Reg R/M)
Mod は R/M の意味を指定する
- 00: [reg]
- 01: [reg+byte]
- 10: [reg+word]
- 11: reg