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

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

Advertisement

CALL—Call Procedure
Opcode
E8 cw
E8 cd
FF /2
FF /2
9A cd
9A cp
FF /3
FF /3
Description
Saves procedure linking information on the procedure stack and jumps to the
procedure (called procedure) specified with the destination (target) operand. The target
operand specifies the address of the first instruction in the called procedure. This
operand can be an immediate value, a general-purpose register, or a memory location.
This instruction can be used to execute four different types of calls:
• Near call – A call to a procedure within the current code segment (the segment
currently pointed to by the CS register), sometimes referred to as an intrasegment
call.
• Far call – A call to a procedure located in a different segment than the current code
segment, sometimes referred to as an intersegment call.
• Inter-privilege-level far call – A far call to a procedure in a segment at a different
privilege level than that of the currently executing program or procedure. Results
in an IA-32_Intercept(Gate) in Itanium System Environment.
• Task switch – A call to a procedure located in a different task. Results in an
IA-32_Intercept(Gate) in Itanium System Environment.
The latter two call types (inter-privilege-level call and task switch) can only be executed
in protected mode. See Chapter 6 in the Intel Architecture Software Developer's
Manual, Volume 3 for information on task switching with the CALL instruction.
When executing a near call, the processor pushes the value of the EIP register (which
contains the address of the instruction following the CALL instruction) onto the
procedure stack (for use later as a return-instruction pointer. The processor then jumps
to the address specified with the target operand for the called procedure. The target
operand specifies either an absolute address in the code segment (that is an offset from
the base of the code segment) or a relative offset (a signed offset relative to the
current value of the instruction pointer in the EIP register, which points to the
instruction following the call). An absolute address is specified directly in a register or
indirectly in a memory location (r/m16 or r/m32 target-operand form). (When
accessing an absolute address indirectly using the stack pointer (ESP) as a base
register, the base value used is the value of the ESP before the instruction executes.) A
relative offset (rel16 or rel32) is generally specified as a label in assembly code, but at
the machine code level, it is encoded as a signed, 16- or 32-bit immediate value, which
is added to the instruction pointer.
4:48
Instruction
CALL rel16
CALL rel32
CALL r/m16
CALL r/m32
CALL ptr16:16
CALL ptr16:32
CALL m16:16
CALL m16:32
Description
Call near, displacement relative to next instruction
Call near, displacement relative to next instruction
Call near, r/m16 indirect
Call near, r/m32 indirect
Call far, to full pointer given
Call far, to full pointer given
Call far, address at r/m16
Call far, address at r/m32
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