]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/uclibc/lib/contrib/uclibc/libc/sysdeps/linux/sh64/sys/ucontext.h
update
[l4.git] / l4 / pkg / uclibc / lib / contrib / uclibc / libc / sysdeps / linux / sh64 / sys / ucontext.h
1 /* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
2    This file is part of the GNU C Library.
3
4    The GNU C Library is free software; you can redistribute it and/or
5    modify it under the terms of the GNU Library General Public License as
6    published by the Free Software Foundation; either version 2 of the
7    License, or (at your option) any later version.
8
9    The GNU C Library is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    Library General Public License for more details.
13
14    You should have received a copy of the GNU Library General Public
15    License along with the GNU C Library; see the file COPYING.LIB.  If not,
16    see <http://www.gnu.org/licenses/>.  */
17
18 /* Where is System V/SH ABI?  */
19
20 #ifndef _SYS_UCONTEXT_H
21 #define _SYS_UCONTEXT_H 1
22
23 #include <features.h>
24 #include <signal.h>
25
26 /* We need the signal context definitions even if they are not used
27    included in <signal.h>.  */
28 #include <bits/sigcontext.h>
29
30
31 typedef long long greg_t;
32
33 /* Number of general registers.  */
34 #define NGREG   64
35
36 /* Container for all general registers.  */
37 typedef greg_t gregset_t[NGREG];
38
39 #ifdef __USE_GNU
40 /* Number of each register is the `gregset_t' array.  */
41 enum
42 {
43   R0 = 0,
44 #define R0      R0
45   R1 = 1,
46 #define R1      R1
47   R2 = 2,
48 #define R2      R2
49   R3 = 3,
50 #define R3      R3
51   R4 = 4,
52 #define R4      R4
53   R5 = 5,
54 #define R5      R5
55   R6 = 6,
56 #define R6      R6
57   R7 = 7,
58 #define R7      R7
59   R8 = 8,
60 #define R8      R8
61   R9 = 9,
62 #define R9      R9
63   R10 = 10,
64 #define R10     R10
65   R11 = 11,
66 #define R11     R11
67   R12 = 12,
68 #define R12     R12
69   R13 = 13,
70 #define R13     R13
71   R14 = 14,
72 #define R14     R14
73   R15 = 15,
74 #define R15     R15
75   R16 = 16,
76 #define R16     R16
77   R17 = 17,
78 #define R17     R17
79   R18 = 18,
80 #define R18     R18
81   R19 = 19,
82 #define R19     R19
83   R20 = 20,
84 #define R20     R20
85   R21 = 21,
86 #define R21     R21
87   R22 = 22,
88 #define R22     R22
89   R23 = 23,
90 #define R23     R23
91   R24 = 24,
92 #define R24     R24
93   R25 = 25,
94 #define R25     R25
95   R26 = 26,
96 #define R26     R26
97   R27 = 27,
98 #define R27     R27
99   R28 = 28,
100 #define R28     R28
101   R29 = 29,
102 #define R29     R29
103   R30 = 30,
104 #define R30     R30
105   R31 = 31,
106 #define R31     R31
107   R32 = 32,
108 #define R32     R32
109   R33 = 33,
110 #define R33     R33
111   R34 = 34,
112 #define R34     R34
113   R35 = 35,
114 #define R35     R35
115   R36 = 36,
116 #define R36     R36
117   R37 = 37,
118 #define R37     R37
119   R38 = 38,
120 #define R38     R38
121   R39 = 39,
122 #define R39     R39
123   R40 = 40,
124 #define R40     R40
125   R41 = 41,
126 #define R41     R41
127   R42 = 42,
128 #define R42     R42
129   R43 = 43,
130 #define R43     R43
131   R44 = 44,
132 #define R44     R44
133   R45 = 45,
134 #define R45     R45
135   R46 = 46,
136 #define R46     R46
137   R47 = 47,
138 #define R47     R47
139   R48 = 48,
140 #define R48     R48
141   R49 = 49,
142 #define R49     R49
143   R50 = 50,
144 #define R50     R50
145   R51 = 51,
146 #define R51     R51
147   R52 = 52,
148 #define R52     R52
149   R53 = 53,
150 #define R53     R53
151   R54 = 54,
152 #define R54     R54
153   R55 = 55,
154 #define R55     R55
155   R56 = 56,
156 #define R56     R56
157   R57 = 57,
158 #define R57     R57
159   R58 = 58,
160 #define R58     R58
161   R59 = 59,
162 #define R59     R59
163   R60 = 60,
164 #define R60     R60
165   R61 = 61,
166 #define R61     R61
167   R62 = 62,
168 #define R62     R62
169   R63 = 63,
170 #define R63     R63
171 };
172 #endif
173
174 typedef int freg_t;
175
176 /* Number of FPU registers.  */
177 #define NFPREG  32
178
179 /* Structure to describe FPU registers.  */
180 typedef freg_t fpregset_t[NFPREG];
181
182 /* Context to describe whole processor state.  */
183 typedef struct
184   {
185     gregset_t gregs;
186     fpregset_t fpregs;
187     unsigned long long sc_tregs[8];
188     unsigned long long sc_pc;
189     unsigned long long sc_sr;
190     unsigned long long sc_fpscr;
191
192   } mcontext_t;
193
194 /* Userlevel context.  */
195 typedef struct ucontext
196   {
197     unsigned long int uc_flags;
198     struct ucontext *uc_link;
199     stack_t uc_stack;
200     mcontext_t uc_mcontext;
201     __sigset_t uc_sigmask;
202   } ucontext_t;
203
204 #endif /* sys/ucontext.h */