reg.h revision 1.3 1 1.1 deraadt /*
2 1.1 deraadt * Copyright (c) 1988 University of Utah.
3 1.2 glass * Copyright (c) 1992, 1993
4 1.2 glass * The Regents of the University of California. All rights reserved.
5 1.1 deraadt *
6 1.1 deraadt * This code is derived from software contributed to Berkeley by
7 1.1 deraadt * the Systems Programming Group of the University of Utah Computer
8 1.1 deraadt * Science Department and Ralph Campbell.
9 1.1 deraadt *
10 1.1 deraadt * Redistribution and use in source and binary forms, with or without
11 1.1 deraadt * modification, are permitted provided that the following conditions
12 1.1 deraadt * are met:
13 1.1 deraadt * 1. Redistributions of source code must retain the above copyright
14 1.1 deraadt * notice, this list of conditions and the following disclaimer.
15 1.1 deraadt * 2. Redistributions in binary form must reproduce the above copyright
16 1.1 deraadt * notice, this list of conditions and the following disclaimer in the
17 1.1 deraadt * documentation and/or other materials provided with the distribution.
18 1.1 deraadt * 3. All advertising materials mentioning features or use of this software
19 1.1 deraadt * must display the following acknowledgement:
20 1.1 deraadt * This product includes software developed by the University of
21 1.1 deraadt * California, Berkeley and its contributors.
22 1.1 deraadt * 4. Neither the name of the University nor the names of its contributors
23 1.1 deraadt * may be used to endorse or promote products derived from this software
24 1.1 deraadt * without specific prior written permission.
25 1.1 deraadt *
26 1.1 deraadt * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27 1.1 deraadt * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 1.1 deraadt * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 1.1 deraadt * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30 1.1 deraadt * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 1.1 deraadt * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 1.1 deraadt * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 1.1 deraadt * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 1.1 deraadt * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 1.1 deraadt * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 1.1 deraadt * SUCH DAMAGE.
37 1.1 deraadt *
38 1.1 deraadt * from: Utah Hdr: reg.h 1.1 90/07/09
39 1.2 glass *
40 1.2 glass * from: @(#)reg.h 8.2 (Berkeley) 1/11/94
41 1.2 glass * $Id: reg.h,v 1.3 1994/05/27 09:02:12 glass Exp $
42 1.1 deraadt */
43 1.1 deraadt
44 1.1 deraadt /*
45 1.1 deraadt * Location of the users' stored
46 1.1 deraadt * registers relative to ZERO.
47 1.1 deraadt * Usage is p->p_regs[XX].
48 1.1 deraadt */
49 1.1 deraadt #define ZERO 0
50 1.1 deraadt #define AST 1
51 1.1 deraadt #define V0 2
52 1.1 deraadt #define V1 3
53 1.1 deraadt #define A0 4
54 1.1 deraadt #define A1 5
55 1.1 deraadt #define A2 6
56 1.1 deraadt #define A3 7
57 1.1 deraadt #define T0 8
58 1.1 deraadt #define T1 9
59 1.1 deraadt #define T2 10
60 1.1 deraadt #define T3 11
61 1.1 deraadt #define T4 12
62 1.1 deraadt #define T5 13
63 1.1 deraadt #define T6 14
64 1.1 deraadt #define T7 15
65 1.1 deraadt #define S0 16
66 1.1 deraadt #define S1 17
67 1.1 deraadt #define S2 18
68 1.1 deraadt #define S3 19
69 1.1 deraadt #define S4 20
70 1.1 deraadt #define S5 21
71 1.1 deraadt #define S6 22
72 1.1 deraadt #define S7 23
73 1.1 deraadt #define T8 24
74 1.1 deraadt #define T9 25
75 1.1 deraadt #define K0 26
76 1.1 deraadt #define K1 27
77 1.1 deraadt #define GP 28
78 1.1 deraadt #define SP 29
79 1.1 deraadt #define S8 30
80 1.1 deraadt #define RA 31
81 1.1 deraadt #define MULLO 32
82 1.1 deraadt #define MULHI 33
83 1.1 deraadt #define PC 34
84 1.1 deraadt #define SR 35
85 1.1 deraadt #define PS 35 /* alias for SR */
86 1.1 deraadt #define F0 36
87 1.1 deraadt #define F1 37
88 1.1 deraadt #define F2 38
89 1.1 deraadt #define F3 39
90 1.1 deraadt #define F4 40
91 1.1 deraadt #define F5 41
92 1.1 deraadt #define F6 42
93 1.1 deraadt #define F7 43
94 1.1 deraadt #define F8 44
95 1.1 deraadt #define F9 45
96 1.1 deraadt #define F10 46
97 1.1 deraadt #define F11 47
98 1.1 deraadt #define F12 48
99 1.1 deraadt #define F13 49
100 1.1 deraadt #define F14 50
101 1.1 deraadt #define F15 51
102 1.1 deraadt #define F16 52
103 1.1 deraadt #define F17 53
104 1.1 deraadt #define F18 54
105 1.1 deraadt #define F19 55
106 1.1 deraadt #define F20 56
107 1.1 deraadt #define F21 57
108 1.1 deraadt #define F22 58
109 1.1 deraadt #define F23 59
110 1.1 deraadt #define F24 60
111 1.1 deraadt #define F25 61
112 1.1 deraadt #define F26 62
113 1.1 deraadt #define F27 63
114 1.1 deraadt #define F28 64
115 1.1 deraadt #define F29 65
116 1.1 deraadt #define F30 66
117 1.1 deraadt #define F31 67
118 1.1 deraadt #define FSR 68
119 1.1 deraadt
120 1.1 deraadt #ifdef IPCREG
121 1.1 deraadt #define NIPCREG 69
122 1.1 deraadt int ipcreg[NIPCREG] = {
123 1.1 deraadt ZERO, AST, V0, V1, A0, A1, A2, A3, T0, T1, T2, T3, T4, T5, T6, T7,
124 1.1 deraadt S0, S1, S2, S3, S4, S5, S6, S7, T8, T9, K0, K1, GP, SP, S8, RA,
125 1.1 deraadt MULLO, MULHI, PC,
126 1.1 deraadt F0, F1, F2, F3, F4, F5, F6, F7,
127 1.1 deraadt F8, F9, F10, F11, F12, F13, F14, F15,
128 1.1 deraadt F16, F17, F18, F19, F20, F21, F22, F23,
129 1.1 deraadt F24, F25, F26, F27, F28, F29, F30, F31, FSR,
130 1.1 deraadt };
131 1.1 deraadt #endif
132 1.2 glass
133 1.2 glass #ifdef LANGUAGE_C
134 1.2 glass /*
135 1.2 glass * Register set accessible via /proc/$pid/reg
136 1.2 glass */
137 1.2 glass struct reg {
138 1.2 glass int r_regs[69]; /* numbered as above */
139 1.2 glass };
140 1.2 glass #endif /* LANGUAGE_C */
141