Recall: A stack frame is a block of memory allocated on top of the call stack for a function execution.
A stack frame contains:
- Information necessary to restore the stack frame of the calling function
- Space for those function local variables that must be allocated address in memory.
- Saved values of any of the "callee save" registers (%ebx, %esi, %edi) that the function uses.
When the function returns, the function must execute code that will
- restore the values of any "callee save" registers
- pop its own stack frame off the stack, and
- jump to the instruction in the calling function just after the function call