regnum.h revision 1.6 1 1.6 agc /* $NetBSD: regnum.h,v 1.6 2003/08/07 16:28:28 agc 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.1 jonathan #define ZERO 0
85 1.1 jonathan #define AST 1
86 1.1 jonathan #define V0 2
87 1.1 jonathan #define V1 3
88 1.1 jonathan #define A0 4
89 1.1 jonathan #define A1 5
90 1.1 jonathan #define A2 6
91 1.1 jonathan #define A3 7
92 1.4 thorpej #if defined(__mips_n32) || defined(__mips_n64)
93 1.4 thorpej #define A4 8
94 1.4 thorpej #define A5 9
95 1.4 thorpej #define A6 10
96 1.4 thorpej #define A7 11
97 1.4 thorpej #define T0 12
98 1.4 thorpej #define T1 13
99 1.4 thorpej #define T2 14
100 1.4 thorpej #define T3 15
101 1.4 thorpej #else
102 1.1 jonathan #define T0 8
103 1.1 jonathan #define T1 9
104 1.1 jonathan #define T2 10
105 1.1 jonathan #define T3 11
106 1.1 jonathan #define T4 12
107 1.1 jonathan #define T5 13
108 1.1 jonathan #define T6 14
109 1.1 jonathan #define T7 15
110 1.4 thorpej #endif /* __mips_n32 || __mips_n64 */
111 1.1 jonathan #define S0 16
112 1.1 jonathan #define S1 17
113 1.1 jonathan #define S2 18
114 1.1 jonathan #define S3 19
115 1.1 jonathan #define S4 20
116 1.1 jonathan #define S5 21
117 1.1 jonathan #define S6 22
118 1.1 jonathan #define S7 23
119 1.1 jonathan #define T8 24
120 1.1 jonathan #define T9 25
121 1.1 jonathan #define K0 26
122 1.1 jonathan #define K1 27
123 1.1 jonathan #define GP 28
124 1.1 jonathan #define SP 29
125 1.1 jonathan #define S8 30
126 1.1 jonathan #define RA 31
127 1.1 jonathan #define SR 32
128 1.3 jonathan #ifndef _KERNEL /* clashes with netccitt/pk.h */
129 1.1 jonathan #define PS 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.5 thorpej #define TA0 8
135 1.5 thorpej #define TA1 9
136 1.5 thorpej #define TA2 10
137 1.5 thorpej #define TA3 11
138 1.5 thorpej #else
139 1.5 thorpej #define TA0 12
140 1.5 thorpej #define TA1 13
141 1.5 thorpej #define TA2 14
142 1.5 thorpej #define TA3 15
143 1.5 thorpej #endif /* __mips_n32 || __mips_n64 */
144 1.3 jonathan
145 1.1 jonathan #define MULLO 33
146 1.1 jonathan #define MULHI 34
147 1.1 jonathan #define BADVADDR 35
148 1.1 jonathan #define CAUSE 36
149 1.1 jonathan #define PC 37
150 1.1 jonathan
151 1.1 jonathan #define FPBASE 38
152 1.1 jonathan #define F0 (FPBASE+0)
153 1.1 jonathan #define F1 (FPBASE+1)
154 1.1 jonathan #define F2 (FPBASE+2)
155 1.1 jonathan #define F3 (FPBASE+3)
156 1.1 jonathan #define F4 (FPBASE+4)
157 1.1 jonathan #define F5 (FPBASE+5)
158 1.1 jonathan #define F6 (FPBASE+6)
159 1.1 jonathan #define F7 (FPBASE+7)
160 1.1 jonathan #define F8 (FPBASE+8)
161 1.1 jonathan #define F9 (FPBASE+9)
162 1.1 jonathan #define F10 (FPBASE+10)
163 1.1 jonathan #define F11 (FPBASE+11)
164 1.1 jonathan #define F12 (FPBASE+12)
165 1.1 jonathan #define F13 (FPBASE+13)
166 1.1 jonathan #define F14 (FPBASE+14)
167 1.1 jonathan #define F15 (FPBASE+15)
168 1.1 jonathan #define F16 (FPBASE+16)
169 1.1 jonathan #define F17 (FPBASE+17)
170 1.1 jonathan #define F18 (FPBASE+18)
171 1.1 jonathan #define F19 (FPBASE+19)
172 1.1 jonathan #define F20 (FPBASE+20)
173 1.1 jonathan #define F21 (FPBASE+21)
174 1.1 jonathan #define F22 (FPBASE+22)
175 1.1 jonathan #define F23 (FPBASE+23)
176 1.1 jonathan #define F24 (FPBASE+24)
177 1.1 jonathan #define F25 (FPBASE+25)
178 1.1 jonathan #define F26 (FPBASE+26)
179 1.1 jonathan #define F27 (FPBASE+27)
180 1.1 jonathan #define F28 (FPBASE+28)
181 1.1 jonathan #define F29 (FPBASE+29)
182 1.1 jonathan #define F30 (FPBASE+30)
183 1.1 jonathan #define F31 (FPBASE+31)
184 1.1 jonathan #define FSR (FPBASE+32)
185