explicit structure sharing in typed accessor function definitions
[sbcl.git] / src / runtime / ppc-lispregs.h
blob1ba8fab1cf9dfba8263880036cce5e4ee9d55fdb
1 #if defined LISP_FEATURE_DARWIN
2 #if defined LANGUAGE_ASSEMBLY
3 #define REG(num) r##num
4 #define FREG(num) f##num
5 #else
6 #define REG(num) num
7 #define FREG(num) num
8 #endif
9 #else
10 #define REG(num) num
11 #define FREG(num) num
12 #endif
14 #define NREGS 32
16 #define reg_ZERO REG(0) /* Should always contain 0 in lisp */
17 #define reg_NSP REG(1) /* The number/C stack pointer */
18 #define reg_POLL REG(2) /* Lisp preemption/Mystery SVR4 ABI reg */
19 #define reg_NL0 REG(3) /* FF param/result 1 */
20 #define reg_NL1 REG(4) /* FF param/result 2 */
21 #define reg_NL2 REG(5) /* FF param 3 */
22 #define reg_NL3 REG(6)
23 #define reg_NL4 REG(7)
24 #define reg_NL5 REG(8)
25 #define reg_NL6 REG(9) /* Last (7th) FF param */
26 #define reg_FDEFN REG(10) /* was NL7 until recently -dan */
27 #define reg_NARGS REG(11)
28 #ifdef LISP_FEATURE_DARWIN
29 #define reg_CFUNC REG(12) /* Silly to blow a reg on FF-name */
30 #define reg_NFP REG(13) /* Lisp may save around FF-call */
31 #else
32 #define reg_NFP REG(12) /* Lisp may save around FF-call */
33 #define reg_CFUNC REG(13) /* Silly to blow a reg on FF-name */
34 #endif
35 #define reg_BSP REG(14) /* Binding stack pointer */
36 #define reg_CFP REG(15) /* Control/value stack frame pointer */
37 #define reg_CSP REG(16) /* Control/value stack top */
38 #define reg_ALLOC REG(17) /* (Global) dynamic free pointer */
39 #define reg_NULL REG(18) /* NIL and globals nearby */
40 #define reg_CODE REG(19) /* Current function object */
41 #define reg_CNAME REG(20) /* Current function name */
42 #define reg_LEXENV REG(21) /* And why burn a register for this ? */
43 #define reg_OCFP REG(22) /* The caller's reg_CFP */
44 #define reg_LRA REG(23) /* Tagged lisp return address */
45 #define reg_A0 REG(24) /* First function arg/return value */
46 #define reg_A1 REG(25) /* Second. */
47 #define reg_A2 REG(26) /* */
48 #define reg_A3 REG(27) /* Last of (only) 4 arg regs */
49 #define reg_L0 REG(28) /* Tagged temp regs */
50 #define reg_L1 REG(29)
51 #ifdef LISP_FEATURE_SB_THREAD
52 #define reg_THREAD REG(30) /* TLS block pointer */
53 #else
54 #define reg_L2 REG(30) /* Last lisp temp reg */
55 #endif
56 #define reg_LIP REG(31) /* Lisp Interior Pointer, e.g., locative */
58 #ifdef LISP_FEATURE_SB_THREAD
59 #define REG30_NAME "THREAD"
60 #else
61 #define REG30_NAME "L2"
62 #endif
64 #define REGNAMES \
65 "ZERO", "NSP", "???", "NL0", \
66 "NL1", "NL2", "NL3P", "NL4", \
67 "NL5", "NL6", "FDEFN", "NARGS", \
68 "NFP", "CFUNC", "BSP", "CFP", \
69 "CSP", "ALLOC", "NULL", "CODE", \
70 "CNAME", "LEXENV", "OCFP", "LRA", \
71 "A0", "A1", "A2", "A3", \
72 "L0", "L1", REG30_NAME, "LIP"
74 #define BOXED_REGISTERS { \
75 reg_FDEFN, reg_CODE, reg_CNAME, reg_LEXENV, reg_OCFP, reg_LRA, \
76 reg_A0, reg_A1, reg_A2, reg_A3, \
77 reg_L0, reg_L1, REG(30) \