]>
Commit | Line | Data |
---|---|---|
688903eb | 1 | /* Copyright (C) 1996-2018 Free Software Foundation, Inc. |
d5efd131 MF |
2 | This file is part of the GNU C Library. |
3 | Contributed by Jes Sorensen <jes@linuxcare.com>, July 2000 | |
4 | ||
5 | The GNU C Library is free software; you can redistribute it and/or | |
6 | modify it under the terms of the GNU Lesser General Public | |
7 | License as published by the Free Software Foundation; either | |
8 | version 2.1 of the License, or (at your option) any later version. | |
9 | ||
10 | The GNU C Library is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 | Lesser General Public License for more details. | |
14 | ||
15 | You should have received a copy of the GNU Lesser General Public | |
75efb018 MF |
16 | License along with the GNU C Library; if not, see |
17 | <http://www.gnu.org/licenses/>. */ | |
d5efd131 | 18 | |
c66b29f9 ZW |
19 | #ifndef _BITS_SIGCONTEXT_H |
20 | #define _BITS_SIGCONTEXT_H 1 | |
21 | ||
d5efd131 MF |
22 | #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H |
23 | # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead." | |
24 | #endif | |
25 | ||
d5efd131 MF |
26 | #define __need_size_t |
27 | #include <stddef.h> | |
28 | #include <bits/sigstack.h> | |
0bcec532 JM |
29 | #include <bits/types/struct_sigstack.h> |
30 | #include <bits/types/stack_t.h> | |
31 | #include <bits/ss_flags.h> | |
d5efd131 | 32 | |
c8c9ab8b | 33 | struct __ia64_fpreg |
d5efd131 MF |
34 | { |
35 | union | |
36 | { | |
37 | unsigned long bits[2]; | |
38 | } u; | |
c757085e | 39 | } __attribute__ ((__aligned__ (16))); |
d5efd131 MF |
40 | |
41 | struct sigcontext | |
42 | { | |
43 | unsigned long int sc_flags; /* see manifest constants below */ | |
44 | unsigned long int sc_nat; /* bit i == 1 iff scratch reg gr[i] is a NaT */ | |
45 | stack_t sc_stack; /* previously active stack */ | |
46 | ||
47 | unsigned long int sc_ip; /* instruction pointer */ | |
48 | unsigned long int sc_cfm; /* current frame marker */ | |
49 | unsigned long int sc_um; /* user mask bits */ | |
50 | unsigned long int sc_ar_rsc; /* register stack configuration register */ | |
51 | unsigned long int sc_ar_bsp; /* backing store pointer */ | |
52 | unsigned long int sc_ar_rnat; /* RSE NaT collection register */ | |
53 | unsigned long int sc_ar_ccv; /* compare & exchange compare value register */ | |
54 | unsigned long int sc_ar_unat; /* ar.unat of interrupted context */ | |
55 | unsigned long int sc_ar_fpsr; /* floating-point status register */ | |
56 | unsigned long int sc_ar_pfs; /* previous function state */ | |
57 | unsigned long int sc_ar_lc; /* loop count register */ | |
58 | unsigned long int sc_pr; /* predicate registers */ | |
59 | unsigned long int sc_br[8]; /* branch registers */ | |
60 | unsigned long int sc_gr[32]; /* general registers (static partition) */ | |
c8c9ab8b | 61 | struct __ia64_fpreg sc_fr[128]; /* floating-point registers */ |
d5efd131 MF |
62 | unsigned long int sc_rbs_base;/* NULL or new base of sighandler's rbs */ |
63 | unsigned long int sc_loadrs; /* see description above */ | |
64 | unsigned long int sc_ar25; /* cmp8xchg16 uses this */ | |
65 | unsigned long int sc_ar26; /* rsvd for scratch use */ | |
66 | unsigned long int sc_rsvd[12];/* reserved for future use */ | |
67 | ||
68 | /* sc_mask is actually an sigset_t but we don't want to | |
69 | * include the kernel headers here. */ | |
70 | unsigned long int sc_mask; /* signal mask to restore after handler returns */ | |
71 | }; | |
72 | ||
73 | /* sc_flag bit definitions. */ | |
74 | #define IA64_SC_FLAG_ONSTACK_BIT 0 /* is handler running on signal stack? */ | |
75 | #define IA64_SC_FLAG_IN_SYSCALL_BIT 1 /* did signal interrupt a syscall? */ | |
76 | #define IA64_SC_FLAG_FPH_VALID_BIT 2 /* is state in f[32]-f[127] valid? */ | |
77 | ||
78 | #define IA64_SC_FLAG_ONSTACK (1 << IA64_SC_FLAG_ONSTACK_BIT) | |
79 | #define IA64_SC_FLAG_IN_SYSCALL (1 << IA64_SC_FLAG_IN_SYSCALL_BIT) | |
80 | #define IA64_SC_FLAG_FPH_VALID (1 << IA64_SC_FLAG_FPH_VALID_BIT) | |
81 | ||
82 | #endif /* _BITS_SIGCONTEXT_H */ |