1 /* Copyright (C) 2002 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, see
16 <http://www.gnu.org/licenses/>. */
18 #ifndef _BITS_SIGCONTEXT_H
19 #define _BITS_SIGCONTEXT_H 1
21 #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
22 # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
25 #include <bits/wordsize.h>
29 unsigned short significand[4];
30 unsigned short exponent;
35 unsigned short significand[4];
36 unsigned short exponent;
37 unsigned short padding[3];
42 __uint32_t element[4];
51 /* Regular FPU environment. */
60 unsigned short status;
63 /* FXSR FPU environment. */
64 __uint32_t _fxsr_env[6];
67 struct _fpxreg _fxsr_st[8];
68 struct _xmmreg _xmm[8];
69 __uint32_t padding[56];
72 #ifndef sigcontext_struct
73 /* Kernel headers before 2.1.1 define a struct sigcontext_struct, but
74 we need sigcontext. Some packages have come to rely on
75 sigcontext_struct being defined on 32-bit x86, so define this for
77 # define sigcontext_struct sigcontext
82 unsigned short gs, __gsh;
83 unsigned short fs, __fsh;
84 unsigned short es, __esh;
85 unsigned short ds, __dsh;
97 unsigned short cs, __csh;
99 unsigned long esp_at_signal;
100 unsigned short ss, __ssh;
101 struct _fpstate * fpstate;
102 unsigned long oldmask;
106 #else /* __WORDSIZE == 64 */
110 /* FPU environment matching the 64-bit FXSAVE layout. */
118 __uint32_t mxcr_mask;
119 struct _fpxreg _st[8];
120 struct _xmmreg _xmm[16];
121 __uint32_t padding[24];
143 unsigned long eflags;
147 unsigned short __pad0;
149 unsigned long trapno;
150 unsigned long oldmask;
152 struct _fpstate * fpstate;
153 unsigned long __reserved1 [8];
156 #endif /* __WORDSIZE == 64 */
158 #endif /* _BITS_SIGCONTEXT_H */