regnum.h revision 1.7 1 1.7 he /* $NetBSD: regnum.h,v 1.7 2003/11/26 08:36:49 he Exp $ */
2 1.1 jonathan
3 1.1 jonathan /*
4 1.1 jonathan * Copyright (c) 1992, 1993
5 1.1 jonathan * The Regents of the University of California. All rights reserved.
6 1.6 agc *
7 1.6 agc * This code is derived from software contributed to Berkeley by
8 1.6 agc * the Systems Programming Group of the University of Utah Computer
9 1.6 agc * Science Department and Ralph Campbell.
10 1.6 agc *
11 1.6 agc * Redistribution and use in source and binary forms, with or without
12 1.6 agc * modification, are permitted provided that the following conditions
13 1.6 agc * are met:
14 1.6 agc * 1. Redistributions of source code must retain the above copyright
15 1.6 agc * notice, this list of conditions and the following disclaimer.
16 1.6 agc * 2. Redistributions in binary form must reproduce the above copyright
17 1.6 agc * notice, this list of conditions and the following disclaimer in the
18 1.6 agc * documentation and/or other materials provided with the distribution.
19 1.6 agc * 3. Neither the name of the University nor the names of its contributors
20 1.6 agc * may be used to endorse or promote products derived from this software
21 1.6 agc * without specific prior written permission.
22 1.6 agc *
23 1.6 agc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24 1.6 agc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 1.6 agc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 1.6 agc * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 1.6 agc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 1.6 agc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 1.6 agc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 1.6 agc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 1.6 agc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 1.6 agc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 1.6 agc * SUCH DAMAGE.
34 1.6 agc *
35 1.6 agc * from: Utah Hdr: reg.h 1.1 90/07/09
36 1.6 agc *
37 1.6 agc * @(#)reg.h 8.2 (Berkeley) 1/11/94
38 1.6 agc */
39 1.6 agc /*
40 1.6 agc * Copyright (c) 1988 University of Utah.
41 1.1 jonathan *
42 1.1 jonathan * This code is derived from software contributed to Berkeley by
43 1.1 jonathan * the Systems Programming Group of the University of Utah Computer
44 1.1 jonathan * Science Department and Ralph Campbell.
45 1.1 jonathan *
46 1.1 jonathan * Redistribution and use in source and binary forms, with or without
47 1.1 jonathan * modification, are permitted provided that the following conditions
48 1.1 jonathan * are met:
49 1.1 jonathan * 1. Redistributions of source code must retain the above copyright
50 1.1 jonathan * notice, this list of conditions and the following disclaimer.
51 1.1 jonathan * 2. Redistributions in binary form must reproduce the above copyright
52 1.1 jonathan * notice, this list of conditions and the following disclaimer in the
53 1.1 jonathan * documentation and/or other materials provided with the distribution.
54 1.1 jonathan * 3. All advertising materials mentioning features or use of this software
55 1.1 jonathan * must display the following acknowledgement:
56 1.1 jonathan * This product includes software developed by the University of
57 1.1 jonathan * California, Berkeley and its contributors.
58 1.1 jonathan * 4. Neither the name of the University nor the names of its contributors
59 1.1 jonathan * may be used to endorse or promote products derived from this software
60 1.1 jonathan * without specific prior written permission.
61 1.1 jonathan *
62 1.1 jonathan * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
63 1.1 jonathan * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
64 1.1 jonathan * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
65 1.1 jonathan * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
66 1.1 jonathan * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
67 1.1 jonathan * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
68 1.1 jonathan * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
69 1.1 jonathan * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
70 1.1 jonathan * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
71 1.1 jonathan * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
72 1.1 jonathan * SUCH DAMAGE.
73 1.1 jonathan *
74 1.1 jonathan * from: Utah Hdr: reg.h 1.1 90/07/09
75 1.1 jonathan *
76 1.1 jonathan * @(#)reg.h 8.2 (Berkeley) 1/11/94
77 1.1 jonathan */
78 1.1 jonathan
79 1.1 jonathan /*
80 1.1 jonathan * Location of the users' stored
81 1.1 jonathan * registers relative to ZERO.
82 1.1 jonathan * Usage is p->p_regs[XX].
83 1.1 jonathan */
84 1.7 he #define _R_ZERO 0
85 1.7 he #define _R_AST 1
86 1.7 he #define _R_V0 2
87 1.7 he #define _R_V1 3
88 1.7 he #define _R_A0 4
89 1.7 he #define _R_A1 5
90 1.7 he #define _R_A2 6
91 1.7 he #define _R_A3 7
92 1.4 thorpej #if defined(__mips_n32) || defined(__mips_n64)
93 1.7 he #define _R_A4 8
94 1.7 he #define _R_A5 9
95 1.7 he #define _R_A6 10
96 1.7 he #define _R_A7 11
97 1.7 he #define _R_T0 12
98 1.7 he #define _R_T1 13
99 1.7 he #define _R_T2 14
100 1.7 he #define _R_T3 15
101 1.4 thorpej #else
102 1.7 he #define _R_T0 8
103 1.7 he #define _R_T1 9
104 1.7 he #define _R_T2 10
105 1.7 he #define _R_T3 11
106 1.7 he #define _R_T4 12
107 1.7 he #define _R_T5 13
108 1.7 he #define _R_T6 14
109 1.7 he #define _R_T7 15
110 1.4 thorpej #endif /* __mips_n32 || __mips_n64 */
111 1.7 he #define _R_S0 16
112 1.7 he #define _R_S1 17
113 1.7 he #define _R_S2 18
114 1.7 he #define _R_S3 19
115 1.7 he #define _R_S4 20
116 1.7 he #define _R_S5 21
117 1.7 he #define _R_S6 22
118 1.7 he #define _R_S7 23
119 1.7 he #define _R_T8 24
120 1.7 he #define _R_T9 25
121 1.7 he #define _R_K0 26
122 1.7 he #define _R_K1 27
123 1.7 he #define _R_GP 28
124 1.7 he #define _R_SP 29
125 1.7 he #define _R_S8 30
126 1.7 he #define _R_RA 31
127 1.7 he #define _R_SR 32
128 1.3 jonathan #ifndef _KERNEL /* clashes with netccitt/pk.h */
129 1.7 he #define _R_PS _R_SR /* alias for SR */
130 1.3 jonathan #endif
131 1.5 thorpej
132 1.5 thorpej /* See <mips/regdef.h> for an explanation. */
133 1.5 thorpej #if defined(__mips_n32) || defined(__mips_n64)
134 1.7 he #define _R_TA0 8
135 1.7 he #define _R_TA1 9
136 1.7 he #define _R_TA2 10
137 1.7 he #define _R_TA3 11
138 1.5 thorpej #else
139 1.7 he #define _R_TA0 12
140 1.7 he #define _R_TA1 13
141 1.7 he #define _R_TA2 14
142 1.7 he #define _R_TA3 15
143 1.5 thorpej #endif /* __mips_n32 || __mips_n64 */
144 1.3 jonathan
145 1.7 he #define _R_MULLO 33
146 1.7 he #define _R_MULHI 34
147 1.7 he #define _R_BADVADDR 35
148 1.7 he #define _R_CAUSE 36
149 1.7 he #define _R_PC 37
150 1.1 jonathan
151 1.7 he #define _FPBASE 38
152 1.7 he #define _R_F0 (_FPBASE+0)
153 1.7 he #define _R_F1 (_FPBASE+1)
154 1.7 he #define _R_F2 (_FPBASE+2)
155 1.7 he #define _R_F3 (_FPBASE+3)
156 1.7 he #define _R_F4 (_FPBASE+4)
157 1.7 he #define _R_F5 (_FPBASE+5)
158 1.7 he #define _R_F6 (_FPBASE+6)
159 1.7 he #define _R_F7 (_FPBASE+7)
160 1.7 he #define _R_F8 (_FPBASE+8)
161 1.7 he #define _R_F9 (_FPBASE+9)
162 1.7 he #define _R_F10 (_FPBASE+10)
163 1.7 he #define _R_F11 (_FPBASE+11)
164 1.7 he #define _R_F12 (_FPBASE+12)
165 1.7 he #define _R_F13 (_FPBASE+13)
166 1.7 he #define _R_F14 (_FPBASE+14)
167 1.7 he #define _R_F15 (_FPBASE+15)
168 1.7 he #define _R_F16 (_FPBASE+16)
169 1.7 he #define _R_F17 (_FPBASE+17)
170 1.7 he #define _R_F18 (_FPBASE+18)
171 1.7 he #define _R_F19 (_FPBASE+19)
172 1.7 he #define _R_F20 (_FPBASE+20)
173 1.7 he #define _R_F21 (_FPBASE+21)
174 1.7 he #define _R_F22 (_FPBASE+22)
175 1.7 he #define _R_F23 (_FPBASE+23)
176 1.7 he #define _R_F24 (_FPBASE+24)
177 1.7 he #define _R_F25 (_FPBASE+25)
178 1.7 he #define _R_F26 (_FPBASE+26)
179 1.7 he #define _R_F27 (_FPBASE+27)
180 1.7 he #define _R_F28 (_FPBASE+28)
181 1.7 he #define _R_F29 (_FPBASE+29)
182 1.7 he #define _R_F30 (_FPBASE+30)
183 1.7 he #define _R_F31 (_FPBASE+31)
184 1.7 he #define _R_FSR (_FPBASE+32)
185