Intel ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3 Manual page 1534

Hide thumbs Also See for ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3:
Table of Contents

Advertisement

IRET/IRETD—Interrupt Return (Continued)
If the NT flag is set, the IRET instruction performs a return from a nested task (switches
from the called task back to the calling task) or reverses the operation of an interrupt
or exception that caused a task switch. The updated state of the task executing the
IRET instruction is saved in its TSS. If the task is reentered later, the code that follows
the IRET instruction is executed.
IRET performs an instruction serialization and a memory fence operation.
Operation
IF(Itanium System Environment)
THEN IA-32_Intercept(Inst,IRET);
IF PE = 0
THEN
GOTO REAL-ADDRESS-MODE:;
ELSE
GOTO PROTECTED-MODE;
FI;
REAL-ADDRESS-MODE;
IF OperandSize = 32
THEN
ELSE (* OperandSize = 16 *)
FI;
END;
PROTECTED-MODE:
IF VM = 1 (* Virtual-8086 mode: PE=1, VM=1 *)
THEN
FI;
IF NT = 1
THEN
FI;
IF OperandSize=32
THEN
4:232
IF top 12 bytes of stack not within stack limits THEN #SS; FI;
IF instruction pointer not within code segment limits THEN #GP(0); FI;
EIP  Pop();
CS  Pop(); (* 32-bit pop, high-order 16-bits discarded *)
tempEFLAGS  Pop();
EFLAGS  (tempEFLAGS AND 257FD5H) OR (EFLAGS AND 1A0000H);
IF top 6 bytes of stack are not within stack limits THEN #SS; FI;
IF instruction pointer not within code segment limits THEN #GP(0); FI;
EIP  Pop();
EIP  EIP AND 0000FFFFH;
CS  Pop(); (* 16-bit pop *)
EFLAGS[15:0]  Pop();
GOTO RETURN-FROM-VIRTUAL-8086-MODE; (* PE=1, VM=1 *)
GOTO TASK-RETURN;( *PE=1, VM=0, NT=1 *)
IF top 12 bytes of stack not within stack limits
Volume 4: Base IA-32 Instruction Reference

Advertisement

Table of Contents
loading

This manual is also suitable for:

Itanium architecture 2.3

Table of Contents