/[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.10 - (hide annotations)
Thu Sep 15 18:26:52 2005 UTC (8 years, 7 months ago) by rtoy
Branch: MAIN
CVS Tags: sparc-tramp-assem-base, double-double-array-base, post-merge-intl-branch, merged-unicode-utf16-extfmt-2009-06-11, double-double-init-sparc-2, unicode-utf16-extfmt-2009-03-27, double-double-base, snapshot-2007-09, snapshot-2007-08, snapshot-2008-08, snapshot-2008-09, sse2-packed-2008-11-12, snapshot-2008-05, snapshot-2008-06, snapshot-2008-07, snapshot-2007-05, snapshot-2008-01, snapshot-2008-02, snapshot-2008-03, intl-branch-working-2010-02-19-1000, snapshot-2006-11, snapshot-2006-10, double-double-init-sparc, snapshot-2006-12, unicode-string-buffer-impl-base, sse2-base, release-20b-pre1, release-20b-pre2, unicode-string-buffer-base, sse2-packed-base, sparc-tramp-assem-2010-07-19, amd64-dd-start, release-19f-pre1, snapshot-2008-12, snapshot-2008-11, intl-2-branch-base, snapshot-2007-01, snapshot-2007-02, release-19e, release-19d, GIT-CONVERSION, double-double-init-ppc, release-19c, unicode-utf16-sync-2008-12, release-19c-base, cross-sol-x86-merged, label-2009-03-16, release-19f-base, merge-sse2-packed, merge-with-19f, intl-branch-working-2010-02-11-1000, unicode-snapshot-2009-05, unicode-snapshot-2009-06, double-double-init-%make-sparc, unicode-utf16-sync-2008-07, unicode-utf16-sync-2008-09, unicode-utf16-extfmts-sync-2008-12, RELEASE_20b, snapshot-2008-04, unicode-utf16-sync-label-2009-03-16, RELEASE_19f, snapshot-2007-03, release-20a-base, cross-sol-x86-base, unicode-utf16-char-support-2009-03-26, unicode-utf16-char-support-2009-03-25, unicode-utf16-extfmts-pre-sync-2008-11, snapshot-2008-10, snapshot-2007-04, snapshot-2010-12, snapshot-2010-11, unicode-utf16-sync-2008-11, snapshot-2007-07, snapshot-2011-09, snapshot-2011-06, snapshot-2011-07, snapshot-2011-04, snapshot-2007-06, snapshot-2011-02, snapshot-2011-03, snapshot-2011-01, pre-merge-intl-branch, double-double-array-checkpoint, double-double-reader-checkpoint-1, release-19d-base, release-19e-pre1, double-double-irrat-end, release-19e-pre2, snapshot-2010-05, snapshot-2010-04, snapshot-2010-07, snapshot-2010-06, snapshot-2010-01, snapshot-2010-03, snapshot-2010-02, release-19d-pre2, release-19d-pre1, snapshot-2010-08, double-double-init-checkpoint-1, double-double-reader-base, label-2009-03-25, cross-sol-x86-2010-12-20, double-double-init-x86, sse2-checkpoint-2008-10-01, intl-branch-2010-03-18-1300, snapshot-2005-11, double-double-sparc-checkpoint-1, sse2-merge-with-2008-11, sse2-merge-with-2008-10, snapshot-2005-10, RELEASE_20a, snapshot-2005-12, release-20a-pre1, snapshot-2009-11, snapshot-2009-12, unicode-utf16-extfmt-2009-06-11, portable-clx-import-2009-06-16, unicode-utf16-string-support, release-19c-pre1, cross-sparc-branch-base, release-19e-base, intl-branch-base, double-double-irrat-start, unicode-utf16-base, portable-clx-base, snapshot-2009-08, snapshot-2007-12, snapshot-2007-10, snapshot-2007-11, snapshot-2009-02, snapshot-2009-01, snapshot-2009-07, snapshot-2009-05, snapshot-2009-04, snapshot-2006-02, snapshot-2006-03, snapshot-2006-01, snapshot-2006-06, snapshot-2006-07, snapshot-2006-04, snapshot-2006-05, pre-telent-clx, snapshot-2006-08, snapshot-2006-09, HEAD
Branch point for: double-double-reader-branch, double-double-array-branch, RELEASE-19F-BRANCH, portable-clx-branch, cross-sparc-branch, RELEASE-20B-BRANCH, unicode-string-buffer-branch, sparc-tramp-assem-branch, release-19d-branch, sse2-packed-branch, RELEASE-20A-BRANCH, amd64-dd-branch, double-double-branch, unicode-string-buffer-impl-branch, intl-branch, unicode-utf16-branch, cross-sol-x86-branch, release-19e-branch, sse2-branch, release-19c-branch, intl-2-branch, unicode-utf16-extfmt-branch
Changes since 1.9: +2 -2 lines
File MIME type: text/plain
Indent all source files using GNU indent using the config in
.indent.pro.
1 rtoy 1.10 /* $Header: /tiger/var/lib/cvsroots/cmucl/src/lisp/sparc-lispregs.h,v 1.10 2005/09/15 18:26:52 rtoy Rel $ */
2 ram 1.3
3 fgilham 1.8 #ifndef _SPARC_LISPREGS_H_
4     #define _SPARC_LISPREGS_H_
5 wlott 1.1
6     #ifdef LANGUAGE_ASSEMBLY
7    
8 ram 1.3 #ifdef __STDC__
9     /* Standard C token concatenation */
10     #define CAT(a,b) a ## b
11    
12     #else
13     /* Reisser CPP token concatenation */
14     #define CAT(a,b) a/**/b
15    
16     #endif
17    
18     /*
19     * Note: concatenation to non preprocessor symbols is not defined,
20     * SunPRO C 2.0.1 yields % g0, perfectly valid according to ANSI
21     */
22     #define GREG(num) CAT(%g,num)
23     #define OREG(num) CAT(%o,num)
24     #define LREG(num) CAT(%l,num)
25     #define IREG(num) CAT(%i,num)
26 wlott 1.1
27     #else
28    
29     #define GREG(num) (num)
30     #define OREG(num) ((num)+8)
31     #define LREG(num) ((num)+16)
32     #define IREG(num) ((num)+24)
33    
34     #endif
35    
36 toy 1.6 #define GREG_NUM(num) (num)
37     #define OREG_NUM(num) ((num)+8)
38     #define LREG_NUM(num) ((num)+16)
39     #define IREG_NUM(num) ((num)+24)
40    
41 wlott 1.1 #define NREGS (32)
42    
43 toy 1.6 /*
44     * Define all the Lisp registers appropriately for assembly and C.
45     * The registers ending with NUM are meant for use in assembly
46     * routines where we need the register number for getting SC_OFFSET
47     */
48 wlott 1.1 #define reg_ZERO GREG(0)
49 toy 1.6 #define reg_ZERO_NUM GREG_NUM(0)
50 wlott 1.1 #define reg_ALLOC GREG(1)
51 toy 1.6 #define reg_ALLOC_NUM GREG_NUM(1)
52 wlott 1.1 #define reg_NIL GREG(2)
53 toy 1.6 #define reg_NIL_NUM GREG_NUM(2)
54 wlott 1.1 #define reg_CSP GREG(3)
55 toy 1.6 #define reg_CSP_NUM GREG_NUM(3)
56 wlott 1.1 #define reg_CFP GREG(4)
57 toy 1.6 #define reg_CFP_NUM GREG_NUM(4)
58 wlott 1.1 #define reg_BSP GREG(5)
59 toy 1.6 #define reg_BSP_NUM GREG_NUM(5)
60 dtc 1.5 /* %g6 and %g7 are supposed to be reserved for the system */
61 wlott 1.1
62     #define reg_NL0 OREG(0)
63 toy 1.6 #define reg_NL0_NUM OREG_NUM(0)
64 wlott 1.1 #define reg_NL1 OREG(1)
65 toy 1.6 #define reg_NL1_NUM OREG_NUM(1)
66 wlott 1.1 #define reg_NL2 OREG(2)
67 toy 1.6 #define reg_NL2_NUM OREG_NUM(2)
68 wlott 1.1 #define reg_NL3 OREG(3)
69 toy 1.6 #define reg_NL3_NUM OREG_NUM(3)
70 wlott 1.1 #define reg_NL4 OREG(4)
71 toy 1.6 #define reg_NL4_NUM OREG_NUM(4)
72 wlott 1.1 #define reg_NL5 OREG(5)
73 toy 1.6 #define reg_NL5_NUM OREG_NUM(5)
74 wlott 1.1 #define reg_NSP OREG(6)
75 toy 1.6 #define reg_NSP_NUM OREG_NUM(6)
76 wlott 1.1 #define reg_NARGS OREG(7)
77 toy 1.6 #define reg_NARGS_NUM OREG_NUM(7)
78 wlott 1.1
79     #define reg_A0 LREG(0)
80 toy 1.6 #define reg_A0_NUM LREG_NUM(0)
81 wlott 1.1 #define reg_A1 LREG(1)
82 toy 1.6 #define reg_A1_NUM LREG_NUM(1)
83 wlott 1.1 #define reg_A2 LREG(2)
84 toy 1.6 #define reg_A2_NUM LREG_NUM(2)
85 wlott 1.1 #define reg_A3 LREG(3)
86 toy 1.6 #define reg_A3_NUM LREG_NUM(3)
87 wlott 1.1 #define reg_A4 LREG(4)
88 toy 1.6 #define reg_A4_NUM LREG_NUM(4)
89 wlott 1.1 #define reg_A5 LREG(5)
90 toy 1.6 #define reg_A5_NUM LREG_NUM(5)
91 wlott 1.1 #define reg_OCFP LREG(6)
92 toy 1.6 #define reg_OCFP_NUM LREG_NUM(6)
93 wlott 1.1 #define reg_LRA LREG(7)
94 toy 1.6 #define reg_LRA_NUM LREG_NUM(7)
95 wlott 1.1
96     #define reg_FDEFN IREG(0)
97 toy 1.6 #define reg_FDEFN_NUM IREG_NUM(0)
98 wlott 1.1 #define reg_LEXENV IREG(1)
99 toy 1.6 #define reg_LEXENV_NUM IREG_NUM(1)
100 wlott 1.1 #define reg_L0 IREG(2)
101 toy 1.6 #define reg_L0_NUM IREG_NUM(2)
102 dtc 1.5 #define reg_NFP IREG(3)
103 toy 1.6 #define reg_NFP_NUM IREG_NUM(3)
104 dtc 1.5 #define reg_CFUNC IREG(4)
105 toy 1.6 #define reg_CFUNC_NUM IREG_NUM(4)
106 wlott 1.1 #define reg_CODE IREG(5)
107 toy 1.6 #define reg_CODE_NUM IREG_NUM(5)
108 wlott 1.1 #define reg_LIP IREG(7)
109 toy 1.6 #define reg_LIP_NUM IREG_NUM(7)
110 wlott 1.1
111     #define REGNAMES \
112     "ZERO", "ALLOC", "NULL", "CSP", \
113 dtc 1.5 "CFP", "BSP", "%g6", "%g7", \
114 wlott 1.1 "NL0", "NL1", "NL2", "NL3", \
115     "NL4", "NL5", "NSP", "NARGS", \
116     "A0", "A1", "A2", "A3", \
117     "A4", "A5", "OCFP", "LRA", \
118 dtc 1.5 "FDEFN", "LEXENV", "L0", "NFP", \
119     "CFUNC", "CODE", "???", "LIP"
120 wlott 1.1
121     #define BOXED_REGISTERS { \
122     reg_A0, reg_A1, reg_A2, reg_A3, reg_A4, reg_A5, reg_FDEFN, reg_LEXENV, \
123 rtoy 1.9 reg_OCFP, reg_LRA, reg_CODE \
124 wlott 1.1 }
125    
126     #ifndef LANGUAGE_ASSEMBLY
127    
128 ram 1.3 #ifdef SOLARIS
129    
130     #include <ucontext.h>
131    
132 rtoy 1.10 extern int *solaris_register_address(struct ucontext *, int);
133 ram 1.3
134     #define SC_REG(sc, reg) (*solaris_register_address(sc,reg))
135    
136     /* short cuts */
137    
138     #define SC_PC(sc) ((sc)->uc_mcontext.gregs[REG_PC])
139     #define SC_NPC(sc) ((sc)->uc_mcontext.gregs[REG_nPC])
140    
141     #else
142    
143 wlott 1.1 #define SC_REG(sc, n) (((int *)((sc)->sc_g1))[n])
144     #define SC_PC(sc) ((sc)->sc_pc)
145     #define SC_NPC(sc) ((sc)->sc_npc)
146 ram 1.3
147     #endif /* SOLARIS */
148 wlott 1.1
149     #endif
150 fgilham 1.8
151     #endif /* _SPARC_LISPREGS_H_ */

  ViewVC Help
Powered by ViewVC 1.1.5