The calling sequence and stack frame for 32-bit OS X/AIX

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)
  padding (optional)
  Local storage (optional)
24(r1) Parameter area ($>= 8$ words)
20(r1) TOC save area
16(r1) Link editor doubleword
12(r1) Compiler doubleword
8(r1) Link register (LR) save
4(r1) Condition register (CR) save
0(r1) ptr to callee's stack

Clint Whaley 2012-07-10