开发者

What does "-0x1(%edx,%ecx,1)" mean in objdump output?

开发者 https://www.devze.com 2022-12-14 02:27 出处:网络
Using objdump to understand a binary and I realize I\'m not fluent enough in ASM syntax. What does the following notion mean?

Using objdump to understand a binary and I realize I'm not fluent enough in ASM syntax. What does the following notion mean?

xor    %al,-0x1(%edx,%ecx,1)

And while you're at it - what should I search for in order to f开发者_C百科ind docs about such notions?


The parentheses are memory offsets:

-0x1(%edx,%ecx,1) (AT&T syntax) is equal to [edx+ecx*1-1] (Intel syntax)

Quick guide for AT&T assembly syntax (as per your request).


This is an exclusive or with content of the low byte (%al) of the 'a' register and the content of the memory at the address which is the sum of the 32 bit wide registers 'd' (%edx), 'c' multiplied by 1 (%ecx,1) and -1. The result is written back to %al. In C

al ^= (char*)(edx+ecx*1 - 1);

You can lookup stuff like this at sandpile or in the intel/amd documentation.

0

精彩评论

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

关注公众号