Sync usage with man page.
[netbsd-mini2440.git] / sys / arch / m68k / include / svr4_machdep.h
blob174448d2c398faf6021a0783ba5e6d5e14485da8
1 /* $NetBSD: svr4_machdep.h,v 1.4 2005/12/11 12:17:53 christos Exp $ */
3 /*-
4 * Copyright (c) 1999 The NetBSD Foundation, Inc.
5 * All rights reserved.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Klaus Klein.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
32 #ifndef _M68K_SVR4_MACHDEP_H_
33 #define _M68K_SVR4_MACHDEP_H_
35 #include <compat/svr4/svr4_types.h>
37 #ifdef _KERNEL
38 #include <m68k/frame.h>
39 #endif
42 * Machine-dependent portions [M68K].
45 #define SVR4_M68K_D0 0
46 #define SVR4_M68K_D1 1
47 #define SVR4_M68K_D2 2
48 #define SVR4_M68K_D3 3
49 #define SVR4_M68K_D4 4
50 #define SVR4_M68K_D5 5
51 #define SVR4_M68K_D6 6
52 #define SVR4_M68K_D7 7
53 #define SVR4_M68K_A0 8
54 #define SVR4_M68K_A1 9
55 #define SVR4_M68K_A2 10
56 #define SVR4_M68K_A3 11
57 #define SVR4_M68K_A4 12
58 #define SVR4_M68K_A5 13
59 #define SVR4_M68K_A6 14
60 #define SVR4_M68K_A7 15
61 #define SVR4_M68K_PC 16
62 #define SVR4_M68K_PS 17
63 #define SVR4_M68K_MAXREG 18
65 #define SVR4_M68K_FP SVR4_M68K_A6
66 #define SVR4_M68K_SP SVR4_M68K_A7
68 typedef int svr4_greg_t;
69 typedef svr4_greg_t svr4_gregset_t[SVR4_M68K_MAXREG];
71 typedef struct svr4_fpregset {
72 int f_pcr;
73 int f_psr;
74 int f_piaddr;
75 int f_fpregs[8][3];
76 } svr4_fpregset_t;
78 typedef struct svr4_mcontext {
79 svr4_gregset_t gregs;
80 svr4_fpregset_t fpregs;
81 union {
82 long mc_state[202];
83 #ifdef _KERNEL
84 struct {
85 /* Rest of exception frame. */
86 unsigned int format;
87 unsigned int vector;
88 union F_u exframe;
89 /* Rest of FPU frame. */
90 union FPF_u1 fpf_u1;
91 union FPF_u2 fpf_u2;
92 } frame;
93 #endif
94 } mc_pad;
95 } svr4_mcontext_t;
97 #define mc_state mc_pad.mc_state
99 /* No padding in ucontext_t; we need all the `padding' in mcontext_t. */
100 #undef SVR4_UC_MACHINE_PAD
103 * sysm68k() commands
105 #define SVR4_SYSARCH_SETNAME 56
106 #define SVR4_SYSARCH_BIURW 92
107 #define SVR4_SYSARCH_EXOP 93
108 #define SVR4_SYSARCH_AB_STKFRM 94
109 #define SVR4_SYSARCH_LIMUSER 95
110 #define SVR4_SYSARCH_KERNADDR 99
112 void svr4_syscall_intern(struct proc *);
114 #endif /* !_M68K_SVR4_MACHDEP_H_ */