ia-32_instruction-set-ref_a-m

8086 mode exceptions same exceptions as in real

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: L) THEN #GP(selector); FI; ELSE IF Segment marked not present THEN #NP(selector); FI; Vol. 2 3-523 INSTRUCTION SET REFERENCE, A-M FI; SegmentRegister SegmentSelector(SRC) ; SegmentRegister SegmentDescriptor([SRC]); FI; ELSE IF FS, or GS is loaded with a NULL selector: THEN SegmentRegister NULLSelector; SegmentRegister(DescriptorValidBit) 0; FI; (* Hidden flag; not accessible by software *) FI; DEST Offset(SRC); PREOTECTED MODE OR COMPATIBILITY MODE; IF SS is loaded THEN IF SegementSelector = NULL THEN #GP(0); ELSE IF Segment selector index is not within descriptor table limits or segment selector RPL CPL or access rights indicate nonwritable data segment or DPL CPL THEN #GP(selector); FI; ELSE IF Segment marked not present THEN #SS(selector); FI; FI; SS SegmentSelector(SRC); SS SegmentDescriptor([SRC]); ELSE IF DS, ES, FS, or GS is loaded with non-NULL segment selector THEN IF Segment selector index is not within descriptor table limits or access rights indicate segment neither data nor readable code segment or segment is data or nonconforming-code segment and (RPL > DPL or CPL > DPL) THEN #GP(selector); FI; ELSE IF Segment marked not present THEN #NP(selector); FI; FI; SegmentRegister SegmentSelector(SRC) AND RPL; SegmentRegister SegmentDescriptor([SRC]); FI; ELSE IF DS, ES, FS, or GS is loaded with a NULL selector: THEN SegmentRegister NULLSelector; SegmentRegister(DescriptorValidBit) 0; FI; (* Hidden flag; not accessible by software *) 3-524 Vol. 2 INSTRUCTION SET REFERENCE, A-M FI; DEST Offset(SRC); Real-Address or Virtual-8086 Mode SegmentRegister SegmentSelector(SRC); FI; DEST Offset(SRC); Flags Affected None. Protected Mode Exceptions #UD #GP(0) If source operand is not a memory location. If a NULL selector is loaded into the SS register. If a memory operand effective address is outside the CS, DS, ES, FS, or GS segment limit. If the DS, ES, FS, or GS register is used to access memory and it contains a NULL segment selector. #GP(selector) If the SS register is being loaded and any of the following is true: the segment selector index is not within the descriptor table limits, the segment selector RPL is not equal to CPL, the segment is a non-writable data segment, or DPL is not equal to CPL. If the DS, ES, FS, or GS register is being loaded with a non-NULL segment selector and any of the following is true: the segment selector index is not within descriptor table limits, the segment is neither a data nor a readable code segment, or the segment is a data or nonconforming-code segment and both RPL and CPL are greater than DPL. #SS(0) #SS(selector) #NP(selector) #PF(fault-code) #AC(0) If a memory operand effective address is outside the SS segment limit. If the SS register is being loaded and the segment is marked not present. If DS, ES, FS, or GS register is being loaded with a non-NULL segment selector and the segment is marked not present. If a page fault occurs. If alignment checking is enabled and an unaligned memory reference is ma...
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