beautypg.com

Intel 253666-024US User Manual

Page 142

background image

3-96 Vol. 2A

CALL—Call Procedure

INSTRUCTION SET REFERENCE, A-M

tempEIP ← tempEIP AND 0000FFFFH; FI; (* Clear upper 16 bits *)

IF (EFER.LMA = 0 or target mode = Compatibility mode) and (tempEIP outside new code
segment limit)

THEN #GP(0); FI;

IF tempEIP is non-canonical

THEN #GP(0); FI;

IF OperandSize

=

32

THEN

Push(CS); (* Padded with 16 high-order bits *)
Push(EIP);
CS ← DEST(CodeSegmentSelector);

(* Segment descriptor information also loaded *)
CS(RPL) ← CPL;

EIP ← tempEIP;

ELSE

IF OperandSize

=

16

THEN

Push(CS);
Push(IP);
CS ← DEST(CodeSegmentSelector);

(* Segment descriptor information also loaded *)
CS(RPL) ← CPL;

EIP ← tempEIP;

ELSE (* OperandSize

=

64 *)

Push(CS); (* Padded with 48 high-order bits *)
Push(RIP);
CS ← DEST(CodeSegmentSelector);

(* Segment descriptor information also loaded *)
CS(RPL) ← CPL;

RIP ← tempEIP;

FI;

FI;

END;

NONCONFORMING-CODE-SEGMENT:

IF L-Bit

=

1 and D-BIT

=

1 and IA32_EFER.LMA

=

1

THEN GP(new code segment selector); FI;

IF (RPL > CPL) or (DPL

CPL)

THEN #GP(new code segment selector); FI;

IF segment not present

THEN #NP(new code segment selector); FI;

IF stack not large enough for return address

THEN #SS(0); FI;