在x86汇编的AT& T语法中,圆括号中的逗号是什么意思?

在x86汇编的AT& T语法中,圆括号中的逗号是什么意思?

问题描述:

(寄存器1,寄存器2、4)在AT& T汇编中是什么意思?

What does (register1, register2, 4) mean in AT&T assembly?

例如:

cmp %eax, (%esi, %ebx, 4)


完整的AT& T基本/索引寄存器语法为:

The complete AT&T base/index register syntax is:

offset(base, index, multiplier)

您的偏移量字段为 0 ,因此您只有(基数,索引,乘数)部分。在您的情况下,您正在将 eax 寄存器的内容与位于 esi +(ebx * 4)的32位值进行比较。 code>。

Your offset field is 0, so you just have the (base, index, multiplier) part. In your case, you're comparing the contents of the eax register to the 32-bit value located at esi + (ebx * 4).

在您可能更熟悉的Intel语法中,它的写法是:

In the Intel syntax you might be more familiar with, this would be written as:

cmp [ebx*4 + esi], eax