ia-32_instruction-set-ref_a-m

protected mode or ia 32e mode not virtual 8086 mode

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: FH; FI; (* Clear upper 16 bits *) IF (EFER.LMA = 0 or target mode = Compatibility mode) and (tempEIP outside new code segment limit) THEN #GP(0); FI; IF tempEIP is non-canonical 3-94 Vol. 2 INSTRUCTION SET REFERENCE, A-M THEN #GP(0); FI; IF OperandSize = 32 THEN Push(CS); (* Padded with 16 high-order bits *) Push(EIP); CS DEST(CodeSegmentSelector); (* Segment descriptor information also loaded *) CS(RPL) CPL; EIP tempEIP; ELSE IF OperandSize = 16 THEN Push(CS); Push(IP); CS DEST(CodeSegmentSelector); (* Segment descriptor information also loaded *) CS(RPL) CPL; EIP tempEIP; ELSE (* OperandSize = 64 *) Push(CS); (* Padded with 48 high-order bits *) Push(RIP); CS DEST(CodeSegmentSelector); (* Segment descriptor information also loaded *) CS(RPL) CPL; RIP tempEIP; FI; FI; 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(new code segment selector); FI; IF segment not present THEN #NP(new code segment selector); FI; IF stack not large enough for return address THEN #SS(0); FI; tempEIP DEST(Offset); IF OperandSize = 16 THEN tempEIP tempEIP AND 0000FFFFH; FI; (* Clear upper 16 bits *) IF (EFER.LMA = 0 or target mode = Compatibility mode) and (tempEIP outside new code segment limit) THEN #GP(0); FI; Vol. 2 3-95 INSTRUCTION SET REFERENCE, A-M IF tempEIP is non-canonical THEN #GP(0); FI; IF OperandSize = 32 THEN Push(CS); (* Padded with 16 high-order bits *) Push(EIP); CS DEST(CodeSegmentSelector); (* Segment descriptor information also loaded *) CS(RPL) CPL; EIP tempEIP; ELSE IF OperandSize = 16 THEN Push(CS); Push(IP); CS DEST(CodeSegmentSelector); (* Segment descriptor information also loaded *) CS(RPL) CPL; EIP tempEIP; ELSE (* OperandSize = 64 *) Push(CS); (* Padded with 48 high-order bits *) Push(RIP); CS DEST(CodeSegmentSelector); (* Segment descriptor information also loaded *) CS(RPL) CPL; RIP tempEIP; FI; FI; END; CALL-GATE: IF call gate (DPL < CPL) or (RPL > DPL) THEN #GP(call gate selector); FI; IF call gate not present THEN #NP(call gate selector); FI; IF call gate code-segment selector is NULL THEN #GP(0); FI; IF call gate code-segment selector index is outside descriptor table limits THEN #GP(code segment selector); FI; Read code segment descriptor; IF code-segment segment descriptor does not indicate a code segment or code-segment segment descriptor DPL > CPL THEN #GP(code segment selector); FI; 3-96 Vol. 2 INSTRUCTION SET REFERENCE, A-M IF IA32_EFER.LMA = 1 AND (code-segment segment descriptor is not a 64-bit code segment or code-segment descriptor has both L-Bit and D-bit set) THEN #GP(code segment selector); FI; IF code segment not present THEN #NP(new code segment selector); FI; IF code segment is non-conforming and DPL < CPL THEN go to MORE-PRIVILEGE; ELSE go to SAME-PRIVILEGE; FI; END; MORE-PRIVILEGE: IF current TSS is 32-bit TSS THEN TSSstackAddress new code segment (DPL 8) + 4; IF (TSSstackAddress + 7) > TSS...
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