The calling sequence and stack frame for Linux

When control is passed to the called routine, the stack pointer points to the callee's frame, which looks like:
  fp reg save area (optional)
  ireg save area (optional)
  CR save area (optional)
  Local storage (optional)
8(r1) Parameter area (optional)
4(r1) Link register (LR) save
0(r1) ptr to callee's stack

Clint Whaley 2012-07-10