Subversion Repositories Kolibri OS

Rev

Rev 4921 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4921 Rev 6099
Line 1... Line 1...
1
_BEGIN_STD_C
1
_BEGIN_STD_C
Line -... Line 2...
-
 
2
 
-
 
3
#if defined(__or1k__) || defined(__or1knd__)
-
 
4
#define _JBLEN 31 /* 32 GPRs - r0 */
-
 
5
#define _JBTYPE unsigned long
-
 
6
#endif
2
 
7
 
3
#if defined(__arm__) || defined(__thumb__)
8
#if defined(__arm__) || defined(__thumb__)
4
/*
9
/*
5
 * All callee preserved registers:
10
 * All callee preserved registers:
6
 * v1 - v7, fp, ip, sp, lr, f4, f5, f6, f7
11
 * v1 - v7, fp, ip, sp, lr, f4, f5, f6, f7
Line 54... Line 59...
54
#define _JBLEN  32
59
#define _JBLEN  32
55
#endif
60
#endif
56
 
61
 
Line 57... Line 62...
57
#ifdef __nds32__
62
#ifdef __nds32__
58
/* Only 17 words are currently needed.
63
/* 17 words for GPRs,
59
   Preserve one word slot if we need to expand.
64
   1 word for $fpcfg.freg and 30 words for FPUs
-
 
65
   Reserved 2 words for aligement-adjustment. When storeing double-precision
-
 
66
   floating-point register into memory, the address has to be
-
 
67
   double-word-aligned.
60
   Check newlib/libc/machine/nds32/setjmp.S for more information.  */
68
   Check libc/machine/nds32/setjmp.S for more information.  */
-
 
69
#if __NDS32_EXT_FPU_SP__ || __NDS32_EXT_FPU_DP__
-
 
70
#define	_JBLEN 50
-
 
71
#else
61
#define _JBLEN 18
72
#define _JBLEN 18
62
#endif
73
#endif
-
 
74
#endif
Line 63... Line 75...
63
 
75
 
64
#if defined(__Z8001__) || defined(__Z8002__)
76
#if defined(__Z8001__) || defined(__Z8002__)
65
/* 16 regs + pc */
77
/* 16 regs + pc */
66
#define _JBLEN 20
78
#define _JBLEN 20
Line 104... Line 116...
104
#define _JBLEN 10
116
#define _JBLEN 10
105
#endif
117
#endif
106
 
118
 
Line 107... Line 119...
107
#ifdef __mips__
119
#ifdef __mips__
108
# if defined(__mips64) || (__mips_fpr == 64)
120
# if defined(__mips64)
109
#  define _JBTYPE long long
121
#  define _JBTYPE long long
110
# endif
122
# endif
111
# ifdef __mips_soft_float
123
# ifdef __mips_soft_float
112
#  define _JBLEN 11
124
#  define _JBLEN 11
113
# else
125
# else
Line 236... Line 248...
236
#ifdef __fr30__
248
#ifdef __fr30__
237
#define _JBLEN 10
249
#define _JBLEN 10
238
#endif
250
#endif
Line -... Line 251...
-
 
251
 
-
 
252
#ifdef  __FT32__
-
 
253
#define _JBLEN 27
-
 
254
#endif
239
 
255
 
240
#ifdef __iq2000__
256
#ifdef __iq2000__
241
#define _JBLEN 32
257
#define _JBLEN 32
Line 242... Line 258...
242
#endif
258
#endif
243
 
259
 
244
#ifdef __mcore__
260
#ifdef __mcore__
Line -... Line 261...
-
 
261
#define _JBLEN 16
-
 
262
#endif
-
 
263
 
-
 
264
#ifdef __arc__
245
#define _JBLEN 16
265
#define _JBLEN 25 /* r13-r30,blink,lp_count,lp_start,lp_end,mlo,mhi,status32 */
246
#endif
266
#endif
247
 
267
 
248
#ifdef __MMIX__
268
#ifdef __MMIX__
249
/* Using a layout compatible with GCC's built-in.  */
269
/* Using a layout compatible with GCC's built-in.  */
Line 273... Line 293...
273
#ifdef __CRIS__
293
#ifdef __CRIS__
274
#define _JBLEN 18
294
#define _JBLEN 18
275
#endif
295
#endif
Line -... Line 296...
-
 
296
 
-
 
297
#ifdef __ia64
-
 
298
#define _JBLEN 64
-
 
299
#endif
276
 
300
 
277
#ifdef __lm32__
301
#ifdef __lm32__
278
#define _JBLEN 19
302
#define _JBLEN 19
Line 279... Line 303...
279
#endif
303
#endif
Line 324... Line 348...
324
#ifdef __RX__
348
#ifdef __RX__
325
#define _JBLEN 0x44
349
#define _JBLEN 0x44
326
#endif
350
#endif
Line -... Line 351...
-
 
351
 
-
 
352
#ifdef __VISIUM__
-
 
353
/* All call-saved GP registers: r11-r19,r21,r22,r23.  */
-
 
354
#define _JBLEN 12
-
 
355
#endif
327
 
356
 
328
#ifdef _JBLEN
357
#ifdef _JBLEN
329
#ifdef _JBTYPE
358
#ifdef _JBTYPE
330
typedef	_JBTYPE jmp_buf[_JBLEN];
359
typedef	_JBTYPE jmp_buf[_JBLEN];
331
#else
360
#else
Line 362... Line 391...
362
#else
391
#else
363
#define __SIGMASK_FUNC sigprocmask
392
#define __SIGMASK_FUNC sigprocmask
364
#endif
393
#endif
365
 
394
 
Line -... Line 395...
-
 
395
#ifdef __CYGWIN__
-
 
396
/* Per POSIX, siglongjmp has to be implemented as function.  Cygwin
-
 
397
   provides functions for both, siglongjmp and sigsetjmp since 2.2.0. */
-
 
398
extern void siglongjmp (sigjmp_buf, int) __attribute__ ((__noreturn__));
-
 
399
extern int sigsetjmp (sigjmp_buf, int);
-
 
400
#endif
-
 
401
 
366
#if defined(__GNUC__)
402
#if defined(__GNUC__)
Line 367... Line 403...
367
 
403
 
368
#define sigsetjmp(env, savemask) \
404
#define sigsetjmp(env, savemask) \
369
            __extension__ \
405
            __extension__ \
Line 399... Line 435...
399
/* POSIX _setjmp/_longjmp, maintained for XSI compatibility.  These
435
/* POSIX _setjmp/_longjmp, maintained for XSI compatibility.  These
400
   are equivalent to sigsetjmp/siglongjmp when not saving the signal mask.
436
   are equivalent to sigsetjmp/siglongjmp when not saving the signal mask.
401
   New applications should use sigsetjmp/siglongjmp instead. */
437
   New applications should use sigsetjmp/siglongjmp instead. */
402
#ifdef __CYGWIN__
438
#ifdef __CYGWIN__
403
extern void _longjmp(jmp_buf, int);
439
extern void _longjmp (jmp_buf, int) __attribute__ ((__noreturn__));
404
extern int _setjmp(jmp_buf);
440
extern int _setjmp (jmp_buf);
405
#else
441
#else
406
#define _setjmp(env)		sigsetjmp ((env), 0)
442
#define _setjmp(env)		sigsetjmp ((env), 0)
407
#define _longjmp(env, val)	siglongjmp ((env), (val))
443
#define _longjmp(env, val)	siglongjmp ((env), (val))
408
#endif
444
#endif