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

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

Advertisement

LEAVE—High Level Procedure Exit
Opcode
C9
C9
Description
Executes a return from a procedure or group of nested procedures established by an
earlier ENTER instruction. The instruction copies the frame pointer (in the EBP register)
into the stack pointer register (ESP), releasing the stack space used by a procedure for
its local variables. The old frame pointer (the frame pointer for the calling procedure
that issued the ENTER instruction) is then popped from the stack into the EBP register,
restoring the calling procedure's frame.
A RET instruction is commonly executed following a LEAVE instruction to return
program control to the calling procedure and remove any arguments pushed onto the
stack by the procedure being returned from.
Operation
IF StackAddressSize = 32
THEN
ESP  EBP;
ELSE (* StackAddressSize = 16*)
SP  BP;
FI;
IF OperandSize = 32
THEN
EBP  Pop();
ELSE (* OperandSize = 16*)
BP  Pop();
FI;
Flags Affected
None.
Additional Itanium System Environment Exceptions
Itanium Reg Faults NaT Register Consumption Abort.
Itanium Mem FaultsVHPT Data Fault, Nested TLB Fault, Data TLB Fault, Alternate Data
Protected Mode Exceptions
#SS(0)
4:260
Instruction
Description
LEAVE
Set SP to BP, then pop BP
LEAVE
Set ESP to EBP, then pop EBP
TLB Fault, Data Page Not Present Fault, Data NaT Page Consumption
Abort, Data Key Miss Fault, Data Key Permission Fault, Data Access
Rights Fault, Data Access Bit Fault, Data Dirty Bit Fault
If the EBP register points to a location that is not within the limits of
the current stack segment.
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