Share via


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.

  1. A segment that restores $sp from the frame pointer register, if it was saved in the prolog.
  2. A segment that restores any nonvolatile registers that the prolog saved by loading them from designated stack locations.
  3. A segment that restores the return address, either to RA or to a general-purpose register, if this is a non-leaf procedure.
  4. A segment that de-allocates the local frame by incrementing $sp.
  5. 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.