[英]what does cmp do in assembly language
I was just wondering what this does. 我只是想知道这是做什么的。 As of now I just think that it compares %rsp with %eax but Im not really sure what the 0x10 there for
截至目前我只是认为它将%rsp与%eax进行比较,但我不确定那里的0x10是什么
cmp 0x10(%rsp),%eax
thanks for the help 谢谢您的帮助
That is AT&T syntax for comparing the DWORD at memory location (rsp+10h)
to the value in eax
. 这是用于将内存位置的DWORD
(rsp+10h)
与eax
的值进行比较的AT&T语法。 The Intel syntax equivalent is: 英特尔语法等效于:
cmp eax,[rsp+10h]
If the syntax difference is what is confusing you, check out this site which gives a good basic comparison between the two. 如果语法差异令您感到困惑,请查看此站点 , 该站点提供了两者之间的良好基本比较。
BTW, comparing the value of rsp
with eax
would be (AT&T): 顺便说一下,比较
rsp
和eax
的值将是(AT&T):
cmp %rsp,%eax
or (Intel): 或(英特尔):
cmp eax,rsp
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.