在x86汇编的AT& T语法中,圆括号中的逗号是什么意思? [英] What does a comma in a parenthesis mean in the AT&T syntax for x86 assembly?

查看:181
本文介绍了在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

这篇关于在x86汇编的AT& T语法中,圆括号中的逗号是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆