* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
[glibc.git] / sysdeps / unix / sysv / linux / sparc / bits / setjmp.h
blob45aa2655ee230e668941bc7a0ed8b283efd6c01b
1 /* Copyright (C) 1997,1999,2000,2003, 2005 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
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 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, write to the Free
16 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17 02111-1307 USA. */
19 #ifndef _BITS_SETJMP_H
20 #define _BITS_SETJMP_H 1
22 #if !defined _SETJMP_H && !defined _PTHREAD_H
23 # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
24 #endif
26 #include <bits/wordsize.h>
28 #if __WORDSIZE == 64
30 #ifndef _ASM
31 typedef struct __sparc64_jmp_buf
33 struct __sparc64_jmp_buf *uc_link;
34 unsigned long uc_flags;
35 unsigned long uc_sigmask;
36 struct __sparc64_jmp_buf_mcontext
38 unsigned long mc_gregs[19];
39 unsigned long mc_fp;
40 unsigned long mc_i7;
41 struct __sparc64_jmp_buf_fpu
43 union
45 unsigned int sregs[32];
46 unsigned long dregs[32];
47 long double qregs[16];
48 } mcfpu_fpregs;
49 unsigned long mcfpu_fprs;
50 unsigned long mcfpu_gsr;
51 void *mcfpu_fq;
52 unsigned char mcfpu_qcnt;
53 unsigned char mcfpu_qentsz;
54 unsigned char mcfpu_enab;
55 } mc_fpregs;
56 } uc_mcontext;
57 } __jmp_buf[1];
58 #endif
60 /* Test if longjmp to JMPBUF would unwind the frame
61 containing a local variable at ADDRESS. */
62 #define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
63 ((unsigned long int) (address) < demangle ((jmpbuf)->uc_mcontext.mc_fp))
65 #else
67 #if defined __USE_MISC || defined _ASM
68 # define JB_SP 0
69 # define JB_FP 1
70 # define JB_PC 2
71 #endif
73 #ifndef _ASM
74 typedef int __jmp_buf[3];
75 #endif
77 /* Test if longjmp to JMPBUF would unwind the frame
78 containing a local variable at ADDRESS. */
79 #define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
80 ((int) (address) < demangle ((jmpbuf)[JB_SP]))
82 #endif
84 #endif /* bits/setjmp.h */