![]() ![]() |
![]() |
![]() Intel and compatable CPU's Programming Information ![]() |
|
Intel SSE MMX2 KNI documentation AMD 64 Bit & Opteron resource on this site Intel Itanium 64 Bit processor Intel 80386 Reference Programmer's Manual Our Partners: |
![]() |
prev: LEA Load Effective Address next: LGDT/LIDT Load Global/Interrupt Descriptor Table Register
LEAVE -- High Level Procedure ExitOpcode Instruction Clocks Description C9 LEAVE 4 Set SP to BP, then pop BP C9 LEAVE 4 Set ESP to EBP, then pop EBP OperationIF StackAddrSize = 16 THEN SP := BP; ELSE (* StackAddrSize = 32 *) ESP := EBP; FI; IF OperandSize = 16 THEN BP := Pop(); ELSE (* OperandSize = 32 *) EBP := Pop(); FI; DescriptionLEAVE reverses the actions of the ENTER instruction. By copying the frame pointer to the stack pointer, LEAVE releases the stack space used by a procedure for its local variables. The old frame pointer is popped into BP or EBP, restoring the caller's frame. A subsequent RET instruction removes any arguments pushed onto the stack of the exiting procedure.Flags AffectedNoneProtected Mode Exceptions#SS(0) if BP does not point to a location within the limits of the current stack segmentReal Address Mode ExceptionsInterrupt 13 if any part of the operand would lie outside of the effective address space from 0 to 0FFFFHVirtual 8086 Mode ExceptionsSame exceptions as in Real Address Mode
up:
Chapter 17 -- 80386 Instruction Set |