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