beautypg.com

Intel 253666-024US User Manual

Page 544

background image

3-498 Vol. 2A

IRET/IRETD—Interrupt Return

INSTRUCTION SET REFERENCE, A-M

Flags Affected

All the flags and fields in the EFLAGS register are potentially modified, depending on
the mode of operation of the processor. If performing a return from a nested task to
a previous task, the EFLAGS register will be modified according to the EFLAGS image
stored in the previous task’s TSS.

Protected Mode Exceptions

#GP(0)

If the return code or stack segment selector is NULL.
If the return instruction pointer is not within the return code

segment limit.

#GP(selector)

If a segment selector index is outside its descriptor table limits.
If the return code segment selector RPL is greater than the CPL.
If the DPL of a conforming-code segment is greater than the

return code segment selector RPL.

If the DPL for a nonconforming-code segment is not equal to the

RPL of the code segment selector.

If the stack segment descriptor DPL is not equal to the RPL of

the return code segment selector.

If the stack segment is not a writable data segment.
If the stack segment selector RPL is not equal to the RPL of the

return code segment selector.

If the segment descriptor for a code segment does not indicate

it is a code segment.

If the segment selector for a TSS has its local/global bit set for

local.

If a TSS segment descriptor specifies that the TSS is not busy.
If a TSS segment descriptor specifies that the TSS is not avail-

able.

#SS(0)

If the top bytes of stack are not within stack limits.

#NP(selector)

If the return code or stack segment is not present.

#PF(fault-code)

If a page fault occurs.

#AC(0)

If an unaligned memory reference occurs when the CPL is 3 and

alignment checking is enabled.

#UD

If the LOCK prefix is used.

Real-Address Mode Exceptions

#GP

If the return instruction pointer is not within the return code

segment limit.

#SS

If the top bytes of stack are not within stack limits.