EFI Byte Code Virtual Machine
Version 1.10 12/01/02 19-17
CALL
SYNTAX:
CALL32{EX}{a} {@}R
1
{Immed32|Index32}
CALL64{EX}{a} Immed64
DESCRIPTION:
The CALL instruction pushes the address of the following instruction on the stack and jumps to a
subroutine. The subroutine may be either EBC or native code, and may be to an absolute or
IP-relative address. CALL32 is used to jump directly to EBC code within a given application,
whereas CALLEX is used to jump to external code (either native or EBC), which requires
thunking. Functionally, the CALL does the following:
R0 = R0 - 8;
PUSH64 ReturnAddress
if (Opcode.ImmedData64Bit) {
if (Operands.EbcCall) {
IP = Immed64;
} else {
NativeCall (Immed64);
}
} else {
if (Operand1 != R0) {
Addr = Operand1;
} else {
Addr = Immed32;
}
if (Operands.EbcCall) {
if (Operands.RelativeAddress) {
IP += Addr + SizeOfThisInstruction;
} else {
IP = Addr
}
} else {
if (Operands.RelativeAddress) {
NativeCall (IP + Addr)
} else {
NativeCall (Addr)
}
}