MIPS Prolog

The MIPS prolog has several immediately contiguous parts, regardless of whether MIPS 16-bit mode or MIPS 32-bit mode is in force.

The following list shows the required

  1. A sequence of instructions that allocates a stack frame by decrementing the $sp register.

  2. A sequence of instructions that designates locations in the local frame that the current procedure may modify.

  3. A sequence of instructions that stores the return address register, if this is a non-leaf procedure.

  4. A sequence of instructions that copies the $sp register to the designated frame pointer register, if $sp may be modified within the body of the procedure.

  5. A sequence of instructions that uses the .prologue directive to indicate the end of the prolog code.

  6. A sequence of instructions that meets any additional requirements imposed by the Virtual Unwinder to allow it to execute the prolog in reverse.

    While the standard does not specify the limitations of the Virtual Unwinder, you should make sure that prolog code is succinct and only performs the necessary operations.

See Also

MIPS Prolog and Epilog | MIPSII Prolog Example | MIPS16 Prolog Example

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.