在x86汇编代码中,JE
和JNE
是否与JZ
和JNZ
完全相同
发布于 2013-01-11 05:32:49
在Intel's manual - Instruction Set Reference中,JE
和JZ
具有相同的操作码(74
用于rel8 / 0F 84
用于rel 16/32),JNE
和JNZ
(75
用于rel8 / 0F 85
用于rel 16/32)共享操作码。
JE
和JZ
它们都检查ZF
(或零标志),尽管手册中对第一个JE
rel8和JZ
rel8 ZF
用法的描述略有不同,但它们基本上是相同的。
以下是该手册的第464、465和467页的摘录。
Op Code | mnemonic | Description
-----------|-----------|-----------------------------------------------
74 cb | JE rel8 | Jump short if equal (ZF=1).
74 cb | JZ rel8 | Jump short if zero (ZF ← 1).
0F 84 cw | JE rel16 | Jump near if equal (ZF=1). Not supported in 64-bit mode.
0F 84 cw | JZ rel16 | Jump near if 0 (ZF=1). Not supported in 64-bit mode.
0F 84 cd | JE rel32 | Jump near if equal (ZF=1).
0F 84 cd | JZ rel32 | Jump near if 0 (ZF=1).
75 cb | JNE rel8 | Jump short if not equal (ZF=0).
75 cb | JNZ rel8 | Jump short if not zero (ZF=0).
0F 85 cd | JNE rel32 | Jump near if not equal (ZF=0).
0F 85 cd | JNZ rel32 | Jump near if not zero (ZF=0).
发布于 2019-07-05 14:41:52
je : Jump if equal:
399 3fb: 64 48 33 0c 25 28 00 xor %fs:0x28,%rcx
400 402: 00 00
401 404: 74 05 je 40b <sims_get_counter+0x51>
https://stackoverflow.com/questions/14267081
复制相似问题