instructions

`testl` eax against eax?

守給你的承諾、 提交于 2019-11-26 00:55:18
问题 I am trying to understand some assembly. 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 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? 回答1: It tests whether eax is 0, or above,