我不确定这x86 Add指令在做什么 [英] I'm not exactly sure what this x86 Add instruction is doing

查看:248
本文介绍了我不确定这x86 Add指令在做什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定这条 add 指令在做什么:

I'm not exactly sure what this add instruction is doing:

add 0x0(%rbp,%rbx,4),%eax

如果是:

add %rbx,%eax

我知道它将添加 rbx 的内容和 eax 中的内容,并且将它们存储回 eax 。但是, 0x0(%rbp,%rbx,4)让我失望。

I know it would add the contents of rbx and the contents in eax and store them back into eax. However, the 0x0(%rbp,%rbx,4) is throwing me off.

推荐答案

这是因为它愚蠢和令人困惑的AT& T语法。

在常规Intel语法中,它是添加eax,dword ptr [rbp + 4 * rbx + 0] 即将位于rbp + 4 * rbx的dword添加到eax。

That's because it's stupid&confusing AT&T syntax.
In normal Intel syntax it's add eax,dword ptr[rbp+4*rbx+0] ie add the dword at rbp+4*rbx to eax.

这篇关于我不确定这x86 Add指令在做什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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