MOD_RM字节的Disp8与Disp32

问题描述

在MOD_RM字节的MOD部分中,对于模式可以为以下四个值:

  • 11-使用寄存器
  • 10-32位位移
  • 01-8位位移

从这里:https://docs.python.org/3/library/exceptions.html#ModuleNotFoundError

它给出的示例是:

MOD R/M Addressing Mode
=== === ================================
 00 000 [ eax ]
 01 000 [ eax + disp8 ]               (1)
 10 000 [ eax + disp32 ]

我不太确定我了解32位和8位位移之间的区别。以下是什么示例?

# sorry this is using ATT Syntax not Intel
movb $1,(%eax)
movw $1,2(%eax)
movl $1,(%eax,%eax)
movq $1,2(%eax,2(%rax,%rdi)
movq $1,%rdi,4)

内存地址中使用的第二个寄存器的大小是32位还是8位?如果是这样,为什么在MOD中不包含16位或64位位移?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)