3-336
INSTRUCTION SET REFERENCE
JMPJump (Continued)
Operation
IF near jump
THEN IF near relative jump
THEN
tempEIP
<
EIP + DEST; (* EIP is instruction following JMP instruction*)
ELSE (* near absolute jump *)
tempEIP
<
DEST;
FI;
IF tempEIP is beyond code segment limit THEN #GP(0); FI;
IF OperandSize = 32
THEN
EIP
<
tempEIP;
ELSE (* OperandSize=16 *)
EIP
<
tempEIP AND 0000FFFFH;
FI;
FI:
IF far jump AND (PE = 0 OR (PE = 1 AND VM = 1)) (* real-address or virtual-8086 mode *)
THEN
tempEIP
<
DEST(offset); (* DEST is ptr16:32 or [m16:32] *)
IF tempEIP is beyond code segment limit THEN #GP(0); FI;
CS
<
DEST(segment selector); (* DEST is ptr16:32 or [m16:32] *)
IF OperandSize = 32
THEN
EIP
<
tempEIP; (* DEST is ptr16:32 or [m16:32] *)
ELSE (* OperandSize = 16 *)
EIP
<
tempEIP AND 0000FFFFH; (* clear upper 16 bits *)
FI;
FI;
IF far jump AND (PE = 1 AND VM = 0) (* Protected mode, not virtual-8086 mode *)
THEN
IF effective address in the CS, DS, ES, FS, GS, or SS segment is illegal
OR segment selector in target operand null
THEN #GP(0);
FI;
IF segment selector index not within descriptor table limits
THEN #GP(new selector);
FI;
Read type and access rights of segment descriptor;
IF segment type is not a conforming or nonconforming code segment, call gate,
task gate, or TSS THEN #GP(segment selector); FI;
Depending on type and access rights
GO TO CONFORMING-CODE-SEGMENT;
GO TO NONCONFORMING-CODE-SEGMENT;