Annotation of sys/arch/sparc/include/svr4_machdep.h, Revision 1.1.1.1
1.1 nbrk 1: /* $OpenBSD: svr4_machdep.h,v 1.7 2002/03/14 01:26:44 millert Exp $ */
2: /* $NetBSD: svr4_machdep.h,v 1.4 1996/03/31 22:21:45 pk Exp $ */
3:
4: /*
5: * Copyright (c) 1994 Christos Zoulas
6: * All rights reserved.
7: *
8: * Redistribution and use in source and binary forms, with or without
9: * modification, are permitted provided that the following conditions
10: * are met:
11: * 1. Redistributions of source code must retain the above copyright
12: * notice, this list of conditions and the following disclaimer.
13: * 2. Redistributions in binary form must reproduce the above copyright
14: * notice, this list of conditions and the following disclaimer in the
15: * documentation and/or other materials provided with the distribution.
16: * 3. The name of the author may not be used to endorse or promote products
17: * derived from this software without specific prior written permission
18: *
19: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22: * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28: * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29: */
30:
31: #ifndef _SPARC_SVR4_MACHDEP_H_
32: #define _SPARC_SVR4_MACHDEP_H_
33:
34: #include <compat/svr4/svr4_types.h>
35:
36: /*
37: * Machine dependent portions [SPARC]
38: */
39:
40: #define SVR4_SPARC_PSR 0
41: #define SVR4_SPARC_PC 1
42: #define SVR4_SPARC_nPC 2
43: #define SVR4_SPARC_Y 3
44: #define SVR4_SPARC_G1 4
45: #define SVR4_SPARC_G2 5
46: #define SVR4_SPARC_G3 6
47: #define SVR4_SPARC_G4 7
48: #define SVR4_SPARC_G5 8
49: #define SVR4_SPARC_G6 9
50: #define SVR4_SPARC_G7 10
51: #define SVR4_SPARC_O0 11
52: #define SVR4_SPARC_O1 12
53: #define SVR4_SPARC_O2 13
54: #define SVR4_SPARC_O3 14
55: #define SVR4_SPARC_O4 15
56: #define SVR4_SPARC_O5 16
57: #define SVR4_SPARC_O6 17
58: #define SVR4_SPARC_O7 18
59: #define SVR4_SPARC_MAXREG 19
60:
61: #define SVR4_SPARC_SP SVR4_SPARC_O6
62: #define SVR4_SPARC_PS SVR4_SPARC_PSR
63:
64: #define SVR4_SPARC_MAXWIN 31
65:
66: typedef int svr4_greg_t;
67:
68: typedef struct {
69: svr4_greg_t rwin_lo[8];
70: svr4_greg_t rwin_in[8];
71: } svr4_rwindow_t;
72:
73: typedef struct {
74: int cnt;
75: int *sp[SVR4_SPARC_MAXWIN];
76: svr4_rwindow_t win[SVR4_SPARC_MAXWIN];
77: } svr4_gwindow_t;
78:
79: typedef svr4_greg_t svr4_gregset_t[SVR4_SPARC_MAXREG];
80:
81: typedef struct {
82: union {
83: u_int fp_ri[32];
84: double fp_rd[16];
85: } fpu_regs;
86: void *fp_q;
87: unsigned fp_fsr;
88: u_char fp_nqel;
89: u_char fp_nqsize;
90: u_char fp_busy;
91: } svr4_fregset_t;
92:
93: typedef struct {
94: svr4_gregset_t greg;
95: svr4_gwindow_t *gwin;
96: svr4_fregset_t freg;
97: long pad[21];
98: } svr4_mcontext_t;
99:
100: struct svr4_ucontext;
101:
102: void svr4_getcontext(struct proc *, struct svr4_ucontext *,
103: int, int);
104: int svr4_setcontext(struct proc *p, struct svr4_ucontext *);
105: void svr4_sendsig(sig_t, int, int, u_long, int, union sigval);
106: int svr4_trap(int, struct proc *);
107:
108: /*
109: * Processor traps
110: */
111: #define SVR4_T_DIVIDE 0
112: #define SVR4_T_TRCTRAP 1
113: #define SVR4_T_NMI 2
114: #define SVR4_T_BPTFLT 3
115: #define SVR4_T_OFLOW 4
116: #define SVR4_T_BOUND 5
117: #define SVR4_T_PRIVINFLT 6
118: #define SVR4_T_DNA 7
119: #define SVR4_T_DOUBLEFLT 8
120: #define SVR4_T_FPOPFLT 9
121: #define SVR4_T_TSSFLT 10
122: #define SVR4_T_SEGNPFLT 11
123: #define SVR4_T_STKFLT 12
124: #define SVR4_T_PROTFLT 13
125: #define SVR4_T_PAGEFLT 14
126: #define SVR4_T_ALIGNFLT 17
127:
128: #endif /* !_SPARC_SVR4_MACHDEP_H_ */
CVSweb