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

查看:20
本文介绍了括号中的逗号在 x86 程序集的 AT&T 语法中是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(register1, register2, 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)

你的 offset 字段是 0,所以你只有 (base, index, multiplier) 部分.在您的情况下,您将 eax 寄存器的内容与位于 esi + (ebx * 4) 的 32 位值进行比较.

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天全站免登陆