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

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

Advertisement

CALL—Call Procedure (Continued)
Executing a task switch with the CALL instruction, is similar to executing a call through
a call gate. Here the target operand specifies the segment selector of the task gate for
the task being switched to and the address of the procedure being called in the task.
The task gate in turn points to the TSS for the task, which contains the segment
selectors for the task's code and stack segments. The CALL instruction can also specify
the segment selector of the TSS directly. See the Intel Architecture Software
Developer's Manual, Volume 3 the for detailed information on the mechanics of a task
switch.
Operation
IF near call
THEN IF near relative call
IF the instruction pointer is not within code segment limit THEN #GP(0); FI;
THEN IF OperandSize = 32
FI;
FI;
ELSE (* near absolute call *)
IF the instruction pointer is not within code segment limit THEN #GP(0); FI;
IF OperandSize = 32
FI;
FI:
IF Itanium System Environment AND PSR.tb THEN IA_32_Exception(Debug);
FI;
IF far call AND (PE = 0 OR (PE = 1 AND VM = 1)) (* real address or virtual 8086 mode *)
THEN
IF OperandSize = 32
4:50
THEN
IF stack not large enough for a 4-byte return address THEN #SS(0); FI;
Push(EIP);
EIP  EIP + DEST; (* DEST is rel32 *)
ELSE (* OperandSize = 16 *)
IF stack not large enough for a 2-byte return address THEN #SS(0); FI;
Push(IP);
EIP  (EIP + DEST) AND 0000FFFFH; (* DEST is rel16 *)
THEN
IF stack not large enough for a 4-byte return address THEN #SS(0); FI;
Push(EIP);
EIP  DEST; (* DEST is r/m32 *)
ELSE (* OperandSize = 16 *)
IF stack not large enough for a 2-byte return address THEN #SS(0); FI;
Push(IP);
EIP  DEST AND 0000FFFFH; (* DEST is r/m16 *)
THEN
IF stack not large enough for a 6-byte return address THEN #SS(0); FI;
IF the instruction pointer is not within code segment limit THEN #GP(0); FI;
Push(CS); (* padded with 16 high-order bits *)
Push(EIP);
CS  DEST[47:32]; (* DEST is ptr16:32 or [m16:32] *)
EIP  DEST[31:0]; (* DEST is ptr16:32 or [m16:32] *)
ELSE (* OperandSize = 16 *)
IF stack not large enough for a 4-byte return address THEN #SS(0); FI;
IF the instruction pointer is not within code segment limit THEN #GP(0); FI;
Push(CS);
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