User Guide
General-Purpose Programming 59
24592—Rev. 3.15—November 2009 AMD64 Technology
target offset of the JMP instruction is ignored, and the new values loaded into CS and rIP are taken
from the call gate or from the TSS.
Conditional Jump
• Jcc—Jump if condition
Conditional jump instructions jump to an instruction specified by the operand, depending on the state
of flags in the rFLAGS register. The operands specifies a signed relative offset from the current
contents of the rIP. If the state of the corresponding flags meets the condition, a conditional jump
instruction passes control to the target instruction, otherwise control is passed to the instruction
following the conditional jump instruction. The flags tested by a specific Jcc instruction depend on the
opcode. In several cases, multiple mnemonics correspond to one opcode.
Table 3-6 shows the rFLAGS values required for each Jcc instruction.
Table 3-6. rFLAGS for Jcc Instructions
Mnemonic Required Flag State Description
JO OF = 1 Jump near if overflow
JNO OF = 0 Jump near if not overflow
JB
JC
JNAE
CF=1
Jump near if below
Jump near if carry
Jump near if not above or equal
JNB
JNC
JAE
CF=0
Jump near if not below
Jump near if not carry
Jump near if above or equal
JZ
JE
ZF=1
Jump near if 0
Jump near if equal
JNZ
JNE
ZF=0
Jump near if not zero
Jump near if not equal
JNA
JBE
CF=1orZF=1
Jump near if not above
Jump near if below or equal
JNBE
JA
CF=0andZF=0
Jump near if not below or equal
Jump near if above
JS SF = 1 Jump near if sign
JNS SF = 0 Jump near if not sign
JP
JPE
PF=1
Jump near if parity
Jump near if parity even
JNP
JPO
PF=0
Jump near if not parity
Jump near if parity odd
JL
JNGE
SF <> OF
Jump near if less
Jump near if not greater or equal