Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1693 serge 1
 
2
3
 
4
/*
5
 * All callee preserved registers:
6
 * v1 - v7, fp, ip, sp, lr, f4, f5, f6, f7
7
 */
8
#define _JBLEN 23
9
#endif
10
11
 
12
#define _JBLEN 24
13
#endif
14
15
 
16
/*
17
 * onsstack,sigmask,sp,pc,npc,psr,g1,o0,wbcnt (sigcontext).
18
 * All else recovered by under/over(flow) handling.
19
 */
20
#define	_JBLEN	13
21
#endif
22
23
 
24
#define _JBLEN  40
25
#endif
26
27
 
28
29
 
30
/*
31
 * onsstack,sigmask,sp,pc,psl,d2-d7,a2-a6,
32
 * fp2-fp7	for 68881.
33
 * All else recovered by under/over(flow) handling.
34
 */
35
#define	_JBLEN	34
36
#endif
37
38
 
39
/*
40
 * D, X, Y are not saved.
41
 * Only take into account the pseudo soft registers (max 32).
42
 */
43
#define _JBLEN  32
44
#endif
45
46
 
47
/* 16 regs + pc */
48
#define _JBLEN 20
49
#endif
50
51
 
52
/*
53
 * onsstack,sigmask,sp,pc,npc,psr,g1,o0,wbcnt (sigcontext).
54
 * All else recovered by under/over(flow) handling.
55
 */
56
#define	_JBLEN	9
57
#endif
58
59
 
60
#define _JBLEN (13 * 4)
61
#elif defined (__i386__)
62
#if defined(__unix__) || defined(__rtems__)
63
# define _JBLEN	9
64
#else
65
#include "setjmp-dj.h"
66
#endif
67
#endif
68
69
 
70
#define _JBTYPE long long
71
#define _JBLEN  8
72
#endif
73
74
 
75
#define _JBLEN 35
76
#endif
77
78
 
79
/* Only 8 words are currently needed.  10 gives us some slop if we need
80
   to expand.  */
81
#define _JBLEN 10
82
#endif
83
84
 
85
#ifdef __mips64
86
#define _JBTYPE long long
87
#endif
88
#ifdef __mips_soft_float
89
#define _JBLEN 11
90
#else
91
#define _JBLEN 23
92
#endif
93
#endif
94
95
 
96
#define _JBLEN 21
97
#endif
98
99
 
100
#define _JBLEN 5
101
#define _JBTYPE int
102
#endif
103
104
 
105
/* same as H8/300 but registers are twice as big */
106
#define _JBLEN 5
107
#define _JBTYPE long
108
#endif
109
110
 
111
/* same as H8/300 but registers are twice as big */
112
#define _JBLEN 5
113
#define _JBTYPE long
114
#endif
115
116
 
117
#define _JBLEN 4
118
#endif
119
120
 
121
#if __SH5__
122
#define _JBLEN 50
123
#define _JBTYPE long long
124
#else
125
#define _JBLEN 20
126
#endif /* __SH5__ */
127
#endif
128
129
 
130
#define _JBLEN 28
131
#endif
132
133
 
134
#ifdef __ALTIVEC__
135
#define _JBLEN 64
136
#else
137
#define _JBLEN 32
138
#endif
139
#define _JBTYPE double
140
#endif
141
142
 
143
#define _JBLEN  20
144
#define _JBTYPE unsigned int
145
#endif
146
147
 
148
/* %r30, %r2-%r18, %r27, pad, %fr12-%fr15.
149
   Note space exists for the FP registers, but they are not
150
   saved.  */
151
#define _JBLEN 28
152
#endif
153
154
 
155
#ifdef __AM33_2__
156
#define _JBLEN 26
157
#else
158
/* A guess */
159
#define _JBLEN 10
160
#endif
161
#endif
162
163
 
164
/* I think our setjmp is saving 15 regs at the moment.  Gives us one word
165
   slop if we need to expand.  */
166
#define _JBLEN 16
167
#endif
168
169
 
170
#define _JBLEN 10
171
#endif
172
#if defined(_C3x)
173
#define _JBLEN 9
174
#endif
175
176
 
177
#define _JBLEN 13
178
#endif
179
180
 
181
#define _JBLEN 13
182
#endif
183
184
 
185
#define _JBLEN 8
186
#endif
187
188
 
189
#define _JBLEN ((64 /* GPR */ + (2*2) /* ACs */ + 18 /* CRs */) / 2)
190
#define _JBTYPE double
191
#endif
192
193
 
194
#define _JBLEN (68/2)  /* room for 68 32-bit regs */
195
#define _JBTYPE double
196
#endif
197
198
 
199
#define _JBLEN 16
200
#endif
201
202
 
203
#define _JBLEN 9
204
#endif
205
206
 
207
#define _JBLEN 10
208
#endif
209
210
 
211
#define _JBLEN 32
212
#endif
213
214
 
215
#define _JBLEN 16
216
#endif
217
218
 
219
/* Using a layout compatible with GCC's built-in.  */
220
#define _JBLEN 5
221
#define _JBTYPE unsigned long
222
#endif
223
224
 
225
#define _JBLEN 16
226
#endif
227
228
 
229
#define _JBLEN 50
230
#define _JBTYPE __vector signed int
231
#endif
232
233
 
234
/* 4 GPRs plus SP plus PC. */
235
#define _JBLEN 8
236
#endif
237
238
 
239
/* 16 GPRs, pc, hi, lo */
240
#define _JBLEN 19
241
#endif
242
243
 
244
#define _JBLEN 18
245
#endif
246
247
 
248
#define _JBLEN 19
249
#endif
250
251
 
252
#if defined(__r8c_cpu__) || defined(__m16c_cpu__)
253
#define _JBLEN (22/2)
254
#else
255
#define _JBLEN (34/2)
256
#endif
257
#define _JBTYPE unsigned short
258
#endif /* __m32c__ */
259
260
 
261
#define _JBLEN 0x44
262
#endif
263
264
 
265
#ifdef _JBTYPE
266
typedef	_JBTYPE jmp_buf[_JBLEN];
267
#else
268
typedef	int jmp_buf[_JBLEN];
269
#endif
270
#endif
271
272
 
273
274
 
275
#include 
276
277
 
278
extern "C" {
279
#endif
280
281
 
282
#ifdef _JBTYPE
283
typedef _JBTYPE sigjmp_buf[_JBLEN+1+(sizeof (sigset_t)/sizeof (_JBTYPE))];
284
#else
285
typedef int sigjmp_buf[_JBLEN+1+(sizeof (sigset_t)/sizeof (int))];
286
#endif
287
288
 
289
#define _SIGMASK	(_JBLEN+1)
290
291
 
292
# define _CYGWIN_WORKING_SIGSETJMP
293
#endif
294
295
 
296
#define __SIGMASK_FUNC pthread_sigmask
297
#else
298
#define __SIGMASK_FUNC sigprocmask
299
#endif
300
301
 
302
303
 
304
            __extension__ \
305
            ({ \
306
              sigjmp_buf *_sjbuf = &(env); \
307
              ((*_sjbuf)[_SAVEMASK] = savemask,\
308
              __SIGMASK_FUNC (SIG_SETMASK, 0, (sigset_t *)((*_sjbuf) + _SIGMASK)),\
309
              setjmp (*_sjbuf)); \
310
            })
311
312
 
313
            __extension__ \
314
            ({ \
315
              sigjmp_buf *_sjbuf = &(env); \
316
              ((((*_sjbuf)[_SAVEMASK]) ? \
317
               __SIGMASK_FUNC (SIG_SETMASK, (sigset_t *)((*_sjbuf) + _SIGMASK), 0)\
318
               : 0), \
319
               longjmp (*_sjbuf, val)); \
320
            })
321
322
 
323
324
 
325
               __SIGMASK_FUNC (SIG_SETMASK, 0, (sigset_t *) ((env) + _SIGMASK)),\
326
               setjmp (env))
327
328
 
329
               __SIGMASK_FUNC (SIG_SETMASK, (sigset_t *) ((env) + _SIGMASK), 0):0),\
330
               longjmp (env, val))
331
332
 
333
334
 
335
   are equivalent to sigsetjmp/siglongjmp when not saving the signal mask.
336
   New applications should use sigsetjmp/siglongjmp instead. */
337
#ifdef __CYGWIN__
338
extern void _longjmp(jmp_buf, int);
339
extern int _setjmp(jmp_buf);
340
#else
341
#define _setjmp(env)		sigsetjmp ((env), 0)
342
#define _longjmp(env, val)	siglongjmp ((env), (val))
343
#endif
344
345
 
346
}
347
#endif
348
#endif /* __CYGWIN__ or __rtems__ */
349