Intel 253666-024US User Manual
Page 330

3-284 Vol. 2A
ENTER—Make Stack Frame for Procedure Parameters
INSTRUCTION SET REFERENCE, A-M
FI;
FI;
OD;
FI;
IF 64-Bit Mode (StackSize = 64)
THEN
Push(FrameTemp); (* Quadword push *)
ELSE IF OperandSize = 32
THEN
Push(FrameTemp); FI; (* Doubleword push *)
ELSE (* OperandSize = 16 *)
Push(FrameTemp); (* Word push *)
FI;
CONTINUE:
IF 64-Bit Mode (StackSize = 64)
THEN
RBP ← FrameTemp;
RSP
← RSP
−
Size;
ELSE IF StackSize
=
32
THEN
EBP ← FrameTemp;
ESP
← ESP
−
Size; FI;
ELSE (* StackSize
=
16 *)
BP ← FrameTemp;
SP
← SP
−
Size;
FI;
END;
Flags Affected
None.
Protected Mode Exceptions
#SS(0)
If the new value of the SP or ESP register is outside the stack
segment limit.
#PF(fault-code)
If a page fault occurs or if a write using the final value of the
stack pointer (within the current stack segment) would cause a
page fault.
#UD
If the LOCK prefix is used.