/[cmucl]/src/lisp/sparc-lispregs.h
ViewVC logotype

Contents of /src/lisp/sparc-lispregs.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4.2.1 - (hide annotations)
Fri Oct 27 19:41:22 2000 UTC (13 years, 5 months ago) by dtc
Branch: RELENG_18
CVS Tags: RELEASE_18c
Changes since 1.4: +8 -9 lines
File MIME type: text/plain
Update register names and BOXED_REGISTERS for the moving of NFP and
CFUNC.  From Raymond Toy.
1 dtc 1.4.2.1 /* $Header: /tiger/var/lib/cvsroots/cmucl/src/lisp/sparc-lispregs.h,v 1.4.2.1 2000/10/27 19:41:22 dtc Exp $ */
2 ram 1.3
3    
4 wlott 1.1
5     #ifdef LANGUAGE_ASSEMBLY
6    
7 ram 1.3 #ifdef __STDC__
8     /* Standard C token concatenation */
9     #define CAT(a,b) a ## b
10    
11     #else
12     /* Reisser CPP token concatenation */
13     #define CAT(a,b) a/**/b
14    
15     #endif
16    
17     /*
18     * Note: concatenation to non preprocessor symbols is not defined,
19     * SunPRO C 2.0.1 yields % g0, perfectly valid according to ANSI
20     */
21     #define GREG(num) CAT(%g,num)
22     #define OREG(num) CAT(%o,num)
23     #define LREG(num) CAT(%l,num)
24     #define IREG(num) CAT(%i,num)
25 wlott 1.1
26     #else
27    
28     #define GREG(num) (num)
29     #define OREG(num) ((num)+8)
30     #define LREG(num) ((num)+16)
31     #define IREG(num) ((num)+24)
32    
33     #endif
34    
35     #define NREGS (32)
36    
37     #define reg_ZERO GREG(0)
38     #define reg_ALLOC GREG(1)
39     #define reg_NIL GREG(2)
40     #define reg_CSP GREG(3)
41     #define reg_CFP GREG(4)
42     #define reg_BSP GREG(5)
43 dtc 1.4.2.1 /* %g6 and %g7 are supposed to be reserved for the system */
44 wlott 1.1
45     #define reg_NL0 OREG(0)
46     #define reg_NL1 OREG(1)
47     #define reg_NL2 OREG(2)
48     #define reg_NL3 OREG(3)
49     #define reg_NL4 OREG(4)
50     #define reg_NL5 OREG(5)
51     #define reg_NSP OREG(6)
52     #define reg_NARGS OREG(7)
53    
54     #define reg_A0 LREG(0)
55     #define reg_A1 LREG(1)
56     #define reg_A2 LREG(2)
57     #define reg_A3 LREG(3)
58     #define reg_A4 LREG(4)
59     #define reg_A5 LREG(5)
60     #define reg_OCFP LREG(6)
61     #define reg_LRA LREG(7)
62    
63     #define reg_FDEFN IREG(0)
64     #define reg_LEXENV IREG(1)
65     #define reg_L0 IREG(2)
66 dtc 1.4.2.1 #define reg_NFP IREG(3)
67     #define reg_CFUNC IREG(4)
68 wlott 1.1 #define reg_CODE IREG(5)
69     #define reg_LIP IREG(7)
70    
71     #define REGNAMES \
72     "ZERO", "ALLOC", "NULL", "CSP", \
73 dtc 1.4.2.1 "CFP", "BSP", "%g6", "%g7", \
74 wlott 1.1 "NL0", "NL1", "NL2", "NL3", \
75     "NL4", "NL5", "NSP", "NARGS", \
76     "A0", "A1", "A2", "A3", \
77     "A4", "A5", "OCFP", "LRA", \
78 dtc 1.4.2.1 "FDEFN", "LEXENV", "L0", "NFP", \
79     "CFUNC", "CODE", "???", "LIP"
80 wlott 1.1
81     #define BOXED_REGISTERS { \
82     reg_A0, reg_A1, reg_A2, reg_A3, reg_A4, reg_A5, reg_FDEFN, reg_LEXENV, \
83 dtc 1.4.2.1 reg_OCFP, reg_LRA, reg_L0, reg_CODE \
84 wlott 1.1 }
85    
86     #ifndef LANGUAGE_ASSEMBLY
87    
88 ram 1.3 #ifdef SOLARIS
89    
90     #include <ucontext.h>
91    
92     extern int * solaris_register_address(struct ucontext *, int);
93    
94     #define SC_REG(sc, reg) (*solaris_register_address(sc,reg))
95    
96     /* short cuts */
97    
98     #define SC_PC(sc) ((sc)->uc_mcontext.gregs[REG_PC])
99     #define SC_NPC(sc) ((sc)->uc_mcontext.gregs[REG_nPC])
100    
101     #else
102    
103 wlott 1.1 #define SC_REG(sc, n) (((int *)((sc)->sc_g1))[n])
104     #define SC_PC(sc) ((sc)->sc_pc)
105     #define SC_NPC(sc) ((sc)->sc_npc)
106 ram 1.3
107     #endif /* SOLARIS */
108 wlott 1.1
109     #endif

  ViewVC Help
Powered by ViewVC 1.1.5