首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >JE/JNE与JZ/JNZ的区别

JE/JNE与JZ/JNZ的区别
EN

Stack Overflow用户
提问于 2013-01-11 04:53:29
回答 2查看 157.6K关注 0票数 99

在x86汇编代码中,JEJNE是否与JZJNZ完全相同

EN

回答 2

Stack Overflow用户

发布于 2013-01-11 05:32:49

Intel's manual - Instruction Set Reference中,JEJZ具有相同的操作码(74用于rel8 / 0F 84用于rel 16/32),JNEJNZ (75用于rel8 / 0F 85用于rel 16/32)共享操作码。

JEJZ它们都检查ZF (或零标志),尽管手册中对第一个JE rel8和JZ rel8 ZF用法的描述略有不同,但它们基本上是相同的。

以下是该手册的第464、465和467页的摘录。

代码语言:javascript
复制
 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).
票数 40
EN

Stack Overflow用户

发布于 2019-07-05 14:41:52

代码语言:javascript
复制
  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>
票数 -6
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14267081

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档