ia-32_instruction-set-ref_a-m

Can be used to perform the following three types of

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: pEIP EIP + DEST; (* EIP is instruction following JMP instruction*) ELSE (* Near absolute jump *) tempEIP DEST; FI: FI; IF (IA32_EFER.LMA = 0 or target mode = Compatibility mode) and tempEIP outside code segment limit THEN #GP(0); FI IF 64-bit mode and tempRIP is not canonical THEN #GP(0); FI; IF OperandSize = 32 THEN EIP tempEIP; ELSE IF OperandSize = 16 THEN (* OperandSize = 16 *) EIP tempEIP AND 0000FFFFH; ELSE (* OperandSize = 64) RIP tempRIP; FI; FI; FI; IF far jump and (PE = 0 or (PE = 1 AND VM = 1)) (* Real-address or virtual-8086 mode *) THEN 3-504 Vol. 2 INSTRUCTION SET REFERENCE, A-M 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) (* IA-32e mode or 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 (EFER.LMA = 0) THEN IF segment type is not a conforming or nonconforming code segment, call gate, task gate, or TSS THEN #GP(segment selector); FI; ELSE IF segment type is not a conforming or nonconforming code segment call gate THEN #GP(segment selector); FI; FI; Depending on type and access rights: GO TO CONFORMING-CODE-SEGMENT; GO TO NONCONFORMING-CODE-SEGMENT; GO TO CALL-GATE; GO TO TASK-GATE; GO TO TASK-STATE-SEGMENT; ELSE #GP(segment selector); FI; CONFORMING-CODE-SEGMENT: IF L-Bit = 1 and D-BIT = 1 and IA32_EFER.LMA = 1 THEN GP(new code segment selector); FI; IF DPL > CPL THEN #GP(segment selector); FI; Vol. 2 3-505 INSTRUCTION SET REFERENCE, A-M IF segment not present THEN #NP(segment selector); FI; tempEIP DEST(Offset); IF OperandSize = 16 THEN tempEIP tempEIP AND 0000FFFFH; FI; IF (IA32_EFER.LMA = 0 or target mode = Compatibility mode) and tempEIP outside code segment limit THEN #GP(0); FI IF tempEIP is non-canonical THEN #GP(0); FI; CS DEST[segment selector]; (* Segment descriptor information also loaded *) CS(RPL) CPL EIP tempEIP; END; NONCONFORMING-CODE-SEGMENT: IF L-Bit = 1 and D-BIT = 1 and IA32_EFER.LMA = 1 THEN GP(new code segment selector); FI; IF (RPL > CPL) OR (DPL CPL) THEN #GP(code segment selector); FI; IF segment not present THEN #NP(segment selector); FI; tempEIP DEST(Offset); IF OperandSize = 16 THEN tempEIP tempEIP AND 0000FFFFH; FI; IF (IA32_EFER.LMA = 0 OR target mode = Compatibility mode) and tempEIP outside code segment limit THEN #GP(0); FI IF tempEIP is non-canonical THEN #GP(0); FI; CS DEST[segment selector]; (* Segment descriptor information also loaded *) CS(RPL) CPL; EIP tempEIP; END; CALL-GATE: IF call gate DPL <...
View Full Document

This note was uploaded on 10/01/2013 for the course CPE 103 taught by Professor Watlins during the Winter '11 term at Mississippi State.

Ask a homework question - tutors are online