1 #ifndef _ASM_X86_SIGCONTEXT_H
2 #define _ASM_X86_SIGCONTEXT_H
4 #include <linux/compiler.h>
9 * As documented in the iBCS2 standard..
11 * The first part of "struct _fpstate" is just the normal i387
12 * hardware setup, the extra "status" word is used to save the
13 * coprocessor status word before entering the handler.
15 * Pentium III FXSR, SSE support
16 * Gareth Hughes <gareth@valinux.com>, May 2000
18 * The FPU state data structure has had to grow to accommodate the
19 * extended FPU state required by the Streaming SIMD Extensions.
20 * There is no documented standard to accomplish this at the moment.
23 unsigned short significand[4];
24 unsigned short exponent;
28 unsigned short significand[4];
29 unsigned short exponent;
30 unsigned short padding[3];
34 unsigned long element[4];
38 /* Regular FPU environment */
44 unsigned long dataoff;
45 unsigned long datasel;
47 unsigned short status;
48 unsigned short magic; /* 0xffff = regular FPU data only */
50 /* FXSR FPU environment */
51 unsigned long _fxsr_env[6]; /* FXSR FPU env is ignored */
53 unsigned long reserved;
54 struct _fpxreg _fxsr_st[8]; /* FXSR FPU reg data is ignored */
55 struct _xmmreg _xmm[8];
56 unsigned long padding[56];
59 #define X86_FXSR_MAGIC 0x0000
63 unsigned short gs, __gsh;
64 unsigned short fs, __fsh;
65 unsigned short es, __esh;
66 unsigned short ds, __dsh;
78 unsigned short cs, __csh;
80 unsigned long sp_at_signal;
81 unsigned short ss, __ssh;
82 struct _fpstate __user *fpstate;
83 unsigned long oldmask;
86 #else /* __KERNEL__ */
88 * User-space might still rely on the old definition:
91 unsigned short gs, __gsh;
92 unsigned short fs, __fsh;
93 unsigned short es, __esh;
94 unsigned short ds, __dsh;
103 unsigned long trapno;
106 unsigned short cs, __csh;
107 unsigned long eflags;
108 unsigned long esp_at_signal;
109 unsigned short ss, __ssh;
110 struct _fpstate __user *fpstate;
111 unsigned long oldmask;
114 #endif /* !__KERNEL__ */
119 /* Note: reserved1/2 may someday contain valuable data. Always save/restore
120 them when you change signal frames. */
124 __u16 twd; /* Note this is not the same as the
125 32bit/x87/FSAVE twd */
131 __u32 st_space[32]; /* 8*16 bytes for each FP-reg */
132 __u32 xmm_space[64]; /* 16*16 bytes for each XMM-reg */
159 unsigned short __pad0;
161 unsigned long trapno;
162 unsigned long oldmask;
164 struct _fpstate __user *fpstate; /* zero when no FPU context */
165 unsigned long reserved1[8];
167 #else /* __KERNEL__ */
169 * User-space might still rely on the old definition:
189 unsigned long eflags; /* RFLAGS */
193 unsigned short __pad0;
195 unsigned long trapno;
196 unsigned long oldmask;
198 struct _fpstate __user *fpstate; /* zero when no FPU context */
199 unsigned long reserved1[8];
201 #endif /* !__KERNEL__ */
203 #endif /* !__i386__ */