Prolog
9/7/2007
A prolog has several immediately contiguous parts, with no intervening instructions.
Typically, a prolog segment contains separate sequences of instructions that perform the following tasks:
- Allocate a stack frame.
- Save incoming argument registers.
- Set up the frame pointer, if one is to be established. The prolog copies the stack pointer to a designated register before the initial register saves; then it uses this value to compute the value of the frame pointer.
- Save the link register with return address.
- Allocate space for compiler-generated temporaries, local variables, and an argument build area.
- Indicate the end of the prolog code.
Be sure your prolog code is succinct and only performs the necessary operations.