`testl` eax 对 eax? [英] `testl` eax against eax?
本文介绍了`testl` eax 对 eax?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试理解一些程序集.
I am trying to understand some assembly.
汇编如下,我感兴趣的是testl
这一行:
The assembly as follows, I am interested in the testl
line:
000319df 8b4508 movl 0x08(%ebp), %eax
000319e2 8b4004 movl 0x04(%eax), %eax
000319e5 85c0 testl %eax, %eax
000319e7 7407 je 0x000319f0
我试图理解 %eax
和 %eax
之间的 testl
点?我认为这段代码的具体内容并不重要,我只是想了解测试本身 - 值不总是正确的吗?
I am trying to understand that point of testl
between %eax
and %eax
? I think the specifics of what this code isn't important, I am just trying to understand the test with itself - wouldn't the value always be true?
推荐答案
它测试 eax
是否为 0,或高于,或低于.在这种情况下,如果 eax
为 0,则进行跳转.
It tests whether eax
is 0, or above, or below. In this case, the jump is taken if eax
is 0.
这篇关于`testl` eax 对 eax?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文