MIPS Epilog
While each procedure has only one prolog, a procedure may contain any number of epilogs if the procedure uses multiple exit points. Each epilog is required to have certain specific parts. All parts are contiguous with no intervening instructions.
The following list shows the required parts for a MIPS epilog.
- A segment that restores $sp from the frame pointer register, if it was saved in the prolog.
- A segment that restores any nonvolatile registers that the prolog saved by loading them from designated stack locations.
- A segment that restores the return address, either to RA or to a general-purpose register, if this is a non-leaf procedure.
- A segment that de-allocates the local frame by incrementing $sp.
- A segment that returns to the calling function.
See Also
MIPS Prolog and Epilog | MIPSII Prolog Example | MIPS16 Epilog Example
Last updated on Thursday, April 08, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.