MIPSII Epilog Example
The following example shows how to construct an epilog for a MIPSII ISA.
Issue a restore for each register saved in the prologue where N is four and incremented by four for each subsequent lower number register saved.
lw $31, framesize+frameoffset($29) ; restore return address lw reg, framesize+frameoffset-N($29) ; restore integer register ldc1 reg, framesize+frameoffset-N($29) ; restore float register
Return from the procedure.
j $31
End the routine.
.end routine_name
The minimum proper epilog for a leaf routine includes the return jump and the .end. Additionally, for a non-leaf routine, loading register $31 is required.
See Also
MIPS Epilog | MIPS16 Epilog Example
Last updated on Thursday, April 08, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.