开发者

I'm not exactly sure what this x86 Add instruction is doing

开发者 https://www.devze.com 2023-04-08 19:10 出处:网络
I\'m not exactly sure what this add instruction is doing: add 0x0(%rbp,%rbx,4),%eax If it were: add %rbx,%eax

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

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

If it were:

add %rbx,%eax

I know it would add the contents of rbx and the contents in eax and store them back into eax. However, t开发者_高级运维he 0x0(%rbp,%rbx,4) is throwing me off.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消