Register usage for 32-bit OS X or AIX

Integer Registers
r01 Used in prolog/epilog NO
r1 Stack pointer YES
r2 TOC pointer (reserved) YES
r3 1st para/return NO
r4 2nd para/return NO
r5-r10 3-8th para NO
r11 Environment pointer NO
r12 Used by global linkage NO
r13-31 Global int registers YES
Floating Point Registers
f0 Scratch reg NO
f1-13 1-13th fp para NO
f14-f31 Global fp regs YES
Special Registers
LR Link register YES
CTR Count register NO
XER Fixed pt exception NO
FPSCR fp status & ctrl NO
CR0-CR7 Condition reg fields, each 4 bits wide 2, 3, 4 : YES

Note that if an OS X/AIX routine accepts a floating point register, the appropriate number of integer registers are skipped, even though the value is passed in a fp reg. Linux does not waste registers in this way.

Clint Whaley 2012-07-10