依星源码资源网,依星资源网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

【好消息,好消息,好消息】VIP会员可以发表文章赚积分啦 !
查看: 22|回复: 0

Jcc — Jump if Condition Is Met

[复制链接] 主动推送

1万

主题

1万

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
18415
发表于 昨天 11:42 | 显示全部楼层 |阅读模式
Jcc — Jump if Condition Is Met
Jcc — Jump if Condition Is Met
OpcodeInstructionOp/En64-Bit ModeCompat/Leg ModeDescription
77 cbJA rel8DValidValidJump short if above (CF=0 and ZF=0).
73 cbJAE rel8DValidValidJump short if above or equal (CF=0).
72 cbJB rel8DValidValidJump short if below (CF=1).
76 cbJBE rel8DValidValidJump short if below or equal (CF=1 or ZF=1).
72 cbJC rel8DValidValidJump short if carry (CF=1).
E3 cbJCXZ rel8DN.E.ValidJump short if CX register is 0.
E3 cbJECXZ rel8DValidValidJump short if ECX register is 0.
E3 cbJRCXZ rel8DValidN.E.Jump short if RCX register is 0.
74 cbJE rel8DValidValidJump short if equal (ZF=1).
7F cbJG rel8DValidValidJump short if greater (ZF=0 and SF=OF).
7D cbJGE rel8DValidValidJump short if greater or equal (SF=OF).
7C cbJL rel8DValidValidJump short if less (SF≠ OF).
7E cbJLE rel8DValidValidJump short if less or equal (ZF=1 or SF≠ OF).
76 cbJNA rel8DValidValidJump short if not above (CF=1 or ZF=1).
72 cbJNAE rel8DValidValidJump short if not above or equal (CF=1).
73 cbJNB rel8DValidValidJump short if not below (CF=0).
77 cbJNBE rel8DValidValidJump short if not below or equal (CF=0 and ZF=0).
73 cbJNC rel8DValidValidJump short if not carry (CF=0).
75 cbJNE rel8DValidValidJump short if not equal (ZF=0).
7E cbJNG rel8DValidValidJump short if not greater (ZF=1 or SF≠ OF).
7C cbJNGE rel8DValidValidJump short if not greater or equal (SF≠ OF).
7D cbJNL rel8DValidValidJump short if not less (SF=OF).
7F cbJNLE rel8DValidValidJump short if not less or equal (ZF=0 and SF=OF).
71 cbJNO rel8DValidValidJump short if not overflow (OF=0).
7B cbJNP rel8DValidValidJump short if not parity (PF=0).
79 cbJNS rel8DValidValidJump short if not sign (SF=0).
75 cbJNZ rel8DValidValidJump short if not zero (ZF=0).
70 cbJO rel8DValidValidJump short if overflow (OF=1).
7A cbJP rel8DValidValidJump short if parity (PF=1).
7A cbJPE rel8DValidValidJump short if parity even (PF=1).
7B cbJPO rel8DValidValidJump short if parity odd (PF=0).
78 cbJS rel8DValidValidJump short if sign (SF=1).
74 cbJZ rel8DValidValidJump short if zero (ZF = 1).
0F 87 cwJA rel16DN.S.ValidJump near if above (CF=0 and ZF=0). Not supported in 64-bit mode.
0F 87 cdJA rel32DValidValidJump near if above (CF=0 and ZF=0).
0F 83 cwJAE rel16DN.S.ValidJump near if above or equal (CF=0). Not supported in 64-bit mode.
0F 83 cdJAE rel32DValidValidJump near if above or equal (CF=0).
0F 82 cwJB rel16DN.S.ValidJump near if below (CF=1). Not supported in 64-bit mode.
0F 82 cdJB rel32DValidValidJump near if below (CF=1).
0F 86 cwJBE rel16DN.S.ValidJump near if below or equal (CF=1 or ZF=1). Not supported in 64-bit mode.
0F 86 cdJBE rel32DValidValidJump near if below or equal (CF=1 or ZF=1).
0F 82 cwJC rel16DN.S.ValidJump near if carry (CF=1). Not supported in 64-bit mode.
0F 82 cdJC rel32DValidValidJump near if carry (CF=1).
0F 84 cwJE rel16DN.S.ValidJump near if equal (ZF=1). Not supported in 64-bit mode.
0F 84 cdJE rel32DValidValidJump near if equal (ZF=1).
0F 84 cwJZ rel16DN.S.ValidJump near if 0 (ZF=1). Not supported in 64-bit mode.
0F 84 cdJZ rel32DValidValidJump near if 0 (ZF=1).
0F 8F cwJG rel16DN.S.ValidJump near if greater (ZF=0 and SF=OF). Not supported in 64-bit mode.
0F 8F cdJG rel32DValidValidJump near if greater (ZF=0 and SF=OF).
0F 8D cwJGE rel16DN.S.ValidJump near if greater or equal (SF=OF). Not supported in 64-bit mode.
0F 8D cdJGE rel32DValidValidJump near if greater or equal (SF=OF).
0F 8C cwJL rel16DN.S.ValidJump near if less (SF≠ OF). Not supported in 64-bit mode.
0F 8C cdJL rel32DValidValidJump near if less (SF≠ OF).
0F 8E cwJLE rel16DN.S.ValidJump near if less or equal (ZF=1 or SF≠ OF). Not supported in 64-bit mode.
0F 8E cdJLE rel32DValidValidJump near if less or equal (ZF=1 or SF≠ OF).
0F 86 cwJNA rel16DN.S.ValidJump near if not above (CF=1 or ZF=1). Not supported in 64-bit mode.
0F 86 cdJNA rel32DValidValidJump near if not above (CF=1 or ZF=1).
0F 82 cwJNAE rel16DN.S.ValidJump near if not above or equal (CF=1). Not supported in 64-bit mode.
0F 82 cdJNAE rel32DValidValidJump near if not above or equal (CF=1).
0F 83 cwJNB rel16DN.S.ValidJump near if not below (CF=0). Not supported in 64-bit mode.
0F 83 cdJNB rel32DValidValidJump near if not below (CF=0).
0F 87 cwJNBE rel16DN.S.ValidJump near if not below or equal (CF=0 and ZF=0). Not supported in 64-bit mode.
0F 87 cdJNBE rel32DValidValidJump near if not below or equal (CF=0 and ZF=0).
0F 83 cwJNC rel16DN.S.ValidJump near if not carry (CF=0). Not supported in 64-bit mode.
0F 83 cdJNC rel32DValidValidJump near if not carry (CF=0).
0F 85 cwJNE rel16DN.S.ValidJump near if not equal (ZF=0). Not supported in 64-bit mode.
0F 85 cdJNE rel32DValidValidJump near if not equal (ZF=0).
0F 8E cwJNG rel16DN.S.ValidJump near if not greater (ZF=1 or SF≠ OF). Not supported in 64-bit mode.
0F 8E cdJNG rel32DValidValidJump near if not greater (ZF=1 or SF≠ OF).
0F 8C cwJNGE rel16DN.S.ValidJump near if not greater or equal (SF≠ OF). Not supported in 64-bit mode.
0F 8C cdJNGE rel32DValidValidJump near if not greater or equal (SF≠ OF).
0F 8D cwJNL rel16DN.S.ValidJump near if not less (SF=OF). Not supported in 64-bit mode.
0F 8D cdJNL rel32DValidValidJump near if not less (SF=OF).
0F 8F cwJNLE rel16DN.S.ValidJump near if not less or equal (ZF=0 and SF=OF). Not supported in 64-bit mode.
0F 8F cdJNLE rel32DValidValidJump near if not less or equal (ZF=0 and SF=OF).
0F 81 cwJNO rel16DN.S.ValidJump near if not overflow (OF=0). Not supported in 64-bit mode.
0F 81 cdJNO rel32DValidValidJump near if not overflow (OF=0).
0F 8B cwJNP rel16DN.S.ValidJump near if not parity (PF=0). Not supported in 64-bit mode.
0F 8B cdJNP rel32DValidValidJump near if not parity (PF=0).
0F 89 cwJNS rel16DN.S.ValidJump near if not sign (SF=0). Not supported in 64-bit mode.
0F 89 cdJNS rel32DValidValidJump near if not sign (SF=0).
0F 85 cwJNZ rel16DN.S.ValidJump near if not zero (ZF=0). Not supported in 64-bit mode.
0F 85 cdJNZ rel32DValidValidJump near if not zero (ZF=0).
0F 80 cwJO rel16DN.S.ValidJump near if overflow (OF=1). Not supported in 64-bit mode.
0F 80 cdJO rel32DValidValidJump near if overflow (OF=1).
0F 8A cwJP rel16DN.S.ValidJump near if parity (PF=1). Not supported in 64-bit mode.
0F 8A cdJP rel32DValidValidJump near if parity (PF=1).
0F 8A cwJPE rel16DN.S.ValidJump near if parity even (PF=1). Not supported in 64-bit mode.
0F 8A cdJPE rel32DValidValidJump near if parity even (PF=1).
0F 8B cwJPO rel16DN.S.ValidJump near if parity odd (PF=0). Not supported in 64-bit mode.
0F 8B cdJPO rel32DValidValidJump near if parity odd (PF=0).
0F 88 cwJS rel16DN.S.ValidJump near if sign (SF=1). Not supported in 64-bit mode.
0F 88 cdJS rel32DValidValidJump near if sign (SF=1).
0F 84 cwJZ rel16DN.S.ValidJump near if 0 (ZF=1). Not supported in 64-bit mode.
0F 84 cdJZ rel32DValidValidJump near if 0 (ZF=1).
Instruction Operand Encoding¶
Op/EnOperand 1Operand 2Operand 3Operand 4
DOffsetN/AN/AN/A
Description¶
Checks the state of one or more of the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) and, if the flags are in the specified state (condition), performs a jump to the target instruction specified by the destination operand. A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, the jump is not performed and execution continues with the instruction following the Jcc instruction.
The target instruction is specified with a relative offset (a signed offset relative to the current value of the instruction pointer in the EIP register). A relative offset (rel8, rel16, or rel32) is generally specified as a label in assembly code, but at the machine code level, it is encoded as a signed, 8-bit or 32-bit immediate value, which is added to the instruction pointer. Instruction coding is most efficient for offsets of –128 to +127. If the operand-size attribute is 16, the upper two bytes of the EIP register are cleared, resulting in a maximum instruction pointer size of 16 bits.
The conditions for each Jcc mnemonic are given in the “Description” column of the table on the preceding page. The terms “less” and “greater” are used for comparisons of signed integers and the terms “above” and “below” are used for unsigned integers.
Because a particular state of the status flags can sometimes be interpreted in two ways, two mnemonics are defined for some opcodes. For example, the JA (jump if above) instruction and the JNBE (jump if not below or equal) instruction are alternate mnemonics for the opcode 77H.
The Jcc instruction does not support far jumps (jumps to other code segments). When the target for the conditional jump is in a different segment, use the opposite condition from the condition being tested for the Jcc instruction, and then access the target with an unconditional far jump (JMP instruction) to the other segment. For example, the following conditional far jump is illegal:
JZ FARLABEL;
To accomplish this far jump, use the following two instructions:
JNZ BEYOND;
JMP FARLABEL;
BEYOND:
The JRCXZ, JECXZ, and JCXZ instructions differ from other Jcc instructions because they do not check status flags. Instead, they check RCX, ECX or CX for 0. The register checked is determined by the address-size attribute. These instructions are useful when used at the beginning of a loop that terminates with a conditional loop instruction (such as LOOPNE). They can be used to prevent an instruction sequence from entering a loop when RCX, ECX or CX is 0. This would cause the loop to execute 264, 232 or 64K times (not zero times).
All conditional jumps are converted to code fetches of one or two cache lines, regardless of jump address or cache-ability.
In 64-bit mode, operand size is fixed at 64 bits. JMP Short is RIP = RIP + 8-bit offset sign extended to 64 bits. JMP Near is RIP = RIP + 32-bit offset sign extended to 64 bits.
Operation¶IF condition    THEN        tempEIP := EIP + SignExtend(DEST);        IF OperandSize = 16            THEN tempEIP := tempEIP AND 0000FFFFH;        FI;    IF tempEIP is not within code segment limit        THEN #GP(0);        ELSE EIP := tempEIP    FI;FI;Flags Affected¶
None.
Protected Mode Exceptions¶
#GP(0)If the offset being jumped to is beyond the limits of the CS segment.
#UDIf the LOCK prefix is used.
Real-Address Mode Exceptions¶
#GPIf the offset being jumped to is beyond the limits of the CS segment or is outside of the effective address space from 0 to FFFFH. This condition can occur if a 32-bit address size override prefix is used.
#UDIf the LOCK prefix is used.
Virtual-8086 Mode Exceptions¶
Same exceptions as in real address mode.
Compatibility Mode Exceptions¶
Same exceptions as in protected mode.
64-Bit Mode Exceptions¶
#GP(0)If the memory address is in a non-canonical form.
#UDIf the LOCK prefix is used.


Jcc — Jump if Condition Is Met

相关帖子

扫码关注微信公众号,及时获取最新资源信息!下载附件优惠VIP会员6折;永久VIP4折
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

免责声明:
1、本站提供的所有资源仅供参考学习使用,版权归原著所有,禁止下载本站资源参与商业和非法行为,请在24小时之内自行删除!
2、本站所有内容均由互联网收集整理、网友上传,并且以计算机技术研究交流为目的,仅供大家参考、学习,请勿任何商业目的与商业用途。
3、若您需要商业运营或用于其他商业活动,请您购买正版授权并合法使用。
4、论坛的所有内容都不保证其准确性,完整性,有效性,由于源码具有复制性,一经售出,概不退换。阅读本站内容因误导等因素而造成的损失本站不承担连带责任。
5、用户使用本网站必须遵守适用的法律法规,对于用户违法使用本站非法运营而引起的一切责任,由用户自行承担
6、本站所有资源来自互联网转载,版权归原著所有,用户访问和使用本站的条件是必须接受本站“免责声明”,如果不遵守,请勿访问或使用本网站
7、本站使用者因为违反本声明的规定而触犯中华人民共和国法律的,一切后果自己负责,本站不承担任何责任。
8、凡以任何方式登陆本网站或直接、间接使用本网站资料者,视为自愿接受本网站声明的约束。
9、本站以《2013 中华人民共和国计算机软件保护条例》第二章 “软件著作权” 第十七条为原则:为了学习和研究软件内含的设计思想和原理,通过安装、显示、传输或者存储软件等方式使用软件的,可以不经软件著作权人许可,不向其支付报酬。若有学员需要商用本站资源,请务必联系版权方购买正版授权!
10、本网站如无意中侵犯了某个企业或个人的知识产权,请来信【站长信箱312337667@qq.com】告之,本站将立即删除。
郑重声明:
本站所有资源仅供用户本地电脑学习源代码的内含设计思想和原理,禁止任何其他用途!
本站所有资源、教程来自互联网转载,仅供学习交流,不得商业运营资源,不确保资源完整性,图片和资源仅供参考,不提供任何技术服务。
本站资源仅供本地编辑研究学习参考,禁止未经资源商正版授权参与任何商业行为,违法行为!如需商业请购买各资源商正版授权
本站仅收集资源,提供用户自学研究使用,本站不存在私自接受协助用户架设游戏或资源,非法运营资源行为。
 
在线客服
点击这里给我发消息 点击这里给我发消息 点击这里给我发消息
售前咨询热线
312337667

微信扫一扫,私享最新原创实用干货

QQ|免责声明|小黑屋|依星资源网 ( 鲁ICP备2021043233号-3 )|网站地图

GMT+8, 2025-7-9 14:00

Powered by Net188.com X3.4

邮箱:312337667@qq.com 客服QQ:312337667(工作时间:9:00~21:00)

快速回复 返回顶部 返回列表