/[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.3 - (hide annotations)
Tue Oct 25 00:15:24 1994 UTC (19 years, 5 months ago) by ram
Branch: MAIN
Changes since 1.2: +38 -5 lines
File MIME type: text/plain
Solaris patches.
1 ram 1.3 /* $Header: /tiger/var/lib/cvsroots/cmucl/src/lisp/sparc-lispregs.h,v 1.3 1994/10/25 00:15:24 ram Exp $ */
2    
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     #define reg_NFP GREG(6)
44     #define reg_CFUNC GREG(7)
45    
46     #define reg_NL0 OREG(0)
47     #define reg_NL1 OREG(1)
48     #define reg_NL2 OREG(2)
49     #define reg_NL3 OREG(3)
50     #define reg_NL4 OREG(4)
51     #define reg_NL5 OREG(5)
52     #define reg_NSP OREG(6)
53     #define reg_NARGS OREG(7)
54    
55     #define reg_A0 LREG(0)
56     #define reg_A1 LREG(1)
57     #define reg_A2 LREG(2)
58     #define reg_A3 LREG(3)
59     #define reg_A4 LREG(4)
60     #define reg_A5 LREG(5)
61     #define reg_OCFP LREG(6)
62     #define reg_LRA LREG(7)
63    
64     #define reg_FDEFN IREG(0)
65     #define reg_LEXENV IREG(1)
66     #define reg_L0 IREG(2)
67     #define reg_L1 IREG(3)
68     #define reg_L2 IREG(4)
69     #define reg_CODE IREG(5)
70     #define reg_LIP IREG(7)
71    
72     #define REGNAMES \
73     "ZERO", "ALLOC", "NULL", "CSP", \
74     "CFP", "BSP", "NFP", "CFUNC", \
75     "NL0", "NL1", "NL2", "NL3", \
76     "NL4", "NL5", "NSP", "NARGS", \
77     "A0", "A1", "A2", "A3", \
78     "A4", "A5", "OCFP", "LRA", \
79     "FDEFN", "LEXENV", "L0", "L1", \
80     "L2", "CODE", "???", "LIP"
81    
82     #define BOXED_REGISTERS { \
83     reg_A0, reg_A1, reg_A2, reg_A3, reg_A4, reg_A5, reg_FDEFN, reg_LEXENV, \
84 wlott 1.2 reg_NFP, reg_OCFP, reg_LRA, reg_L0, reg_L1, reg_L2, reg_CODE \
85 wlott 1.1 }
86    
87     #ifndef LANGUAGE_ASSEMBLY
88    
89 ram 1.3 #ifdef SOLARIS
90    
91     #include <ucontext.h>
92    
93     extern int * solaris_register_address(struct ucontext *, int);
94    
95     #define SC_REG(sc, reg) (*solaris_register_address(sc,reg))
96    
97     /* short cuts */
98    
99     #define SC_PC(sc) ((sc)->uc_mcontext.gregs[REG_PC])
100     #define SC_NPC(sc) ((sc)->uc_mcontext.gregs[REG_nPC])
101    
102     #else
103    
104 wlott 1.1 #define SC_REG(sc, n) (((int *)((sc)->sc_g1))[n])
105     #define SC_PC(sc) ((sc)->sc_pc)
106     #define SC_NPC(sc) ((sc)->sc_npc)
107 ram 1.3
108     #endif /* SOLARIS */
109 wlott 1.1
110     #endif

  ViewVC Help
Powered by ViewVC 1.1.5