x86 mmiotrace: move files into arch/x86/mm/.
[linux-2.6/mini2440.git] / include / asm-x86 / sigcontext.h
blob2f9c884d2c0f3950f8a8179a6bd440fee0b228eb
1 #ifndef _ASM_X86_SIGCONTEXT_H
2 #define _ASM_X86_SIGCONTEXT_H
4 #include <linux/compiler.h>
5 #include <asm/types.h>
7 #ifdef __i386__
8 /*
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.
22 struct _fpreg {
23 unsigned short significand[4];
24 unsigned short exponent;
27 struct _fpxreg {
28 unsigned short significand[4];
29 unsigned short exponent;
30 unsigned short padding[3];
33 struct _xmmreg {
34 unsigned long element[4];
37 struct _fpstate {
38 /* Regular FPU environment */
39 unsigned long cw;
40 unsigned long sw;
41 unsigned long tag;
42 unsigned long ipoff;
43 unsigned long cssel;
44 unsigned long dataoff;
45 unsigned long datasel;
46 struct _fpreg _st[8];
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 */
52 unsigned long mxcsr;
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
61 #ifdef __KERNEL__
62 struct sigcontext {
63 unsigned short gs, __gsh;
64 unsigned short fs, __fsh;
65 unsigned short es, __esh;
66 unsigned short ds, __dsh;
67 unsigned long di;
68 unsigned long si;
69 unsigned long bp;
70 unsigned long sp;
71 unsigned long bx;
72 unsigned long dx;
73 unsigned long cx;
74 unsigned long ax;
75 unsigned long trapno;
76 unsigned long err;
77 unsigned long ip;
78 unsigned short cs, __csh;
79 unsigned long flags;
80 unsigned long sp_at_signal;
81 unsigned short ss, __ssh;
82 struct _fpstate __user *fpstate;
83 unsigned long oldmask;
84 unsigned long cr2;
86 #else /* __KERNEL__ */
88 * User-space might still rely on the old definition:
90 struct sigcontext {
91 unsigned short gs, __gsh;
92 unsigned short fs, __fsh;
93 unsigned short es, __esh;
94 unsigned short ds, __dsh;
95 unsigned long edi;
96 unsigned long esi;
97 unsigned long ebp;
98 unsigned long esp;
99 unsigned long ebx;
100 unsigned long edx;
101 unsigned long ecx;
102 unsigned long eax;
103 unsigned long trapno;
104 unsigned long err;
105 unsigned long eip;
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;
112 unsigned long cr2;
114 #endif /* !__KERNEL__ */
116 #else /* __i386__ */
118 /* FXSAVE frame */
119 /* Note: reserved1/2 may someday contain valuable data. Always save/restore
120 them when you change signal frames. */
121 struct _fpstate {
122 __u16 cwd;
123 __u16 swd;
124 __u16 twd; /* Note this is not the same as the
125 32bit/x87/FSAVE twd */
126 __u16 fop;
127 __u64 rip;
128 __u64 rdp;
129 __u32 mxcsr;
130 __u32 mxcsr_mask;
131 __u32 st_space[32]; /* 8*16 bytes for each FP-reg */
132 __u32 xmm_space[64]; /* 16*16 bytes for each XMM-reg */
133 __u32 reserved2[24];
136 #ifdef __KERNEL__
137 struct sigcontext {
138 unsigned long r8;
139 unsigned long r9;
140 unsigned long r10;
141 unsigned long r11;
142 unsigned long r12;
143 unsigned long r13;
144 unsigned long r14;
145 unsigned long r15;
146 unsigned long di;
147 unsigned long si;
148 unsigned long bp;
149 unsigned long bx;
150 unsigned long dx;
151 unsigned long ax;
152 unsigned long cx;
153 unsigned long sp;
154 unsigned long ip;
155 unsigned long flags;
156 unsigned short cs;
157 unsigned short gs;
158 unsigned short fs;
159 unsigned short __pad0;
160 unsigned long err;
161 unsigned long trapno;
162 unsigned long oldmask;
163 unsigned long cr2;
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:
171 struct sigcontext {
172 unsigned long r8;
173 unsigned long r9;
174 unsigned long r10;
175 unsigned long r11;
176 unsigned long r12;
177 unsigned long r13;
178 unsigned long r14;
179 unsigned long r15;
180 unsigned long rdi;
181 unsigned long rsi;
182 unsigned long rbp;
183 unsigned long rbx;
184 unsigned long rdx;
185 unsigned long rax;
186 unsigned long rcx;
187 unsigned long rsp;
188 unsigned long rip;
189 unsigned long eflags; /* RFLAGS */
190 unsigned short cs;
191 unsigned short gs;
192 unsigned short fs;
193 unsigned short __pad0;
194 unsigned long err;
195 unsigned long trapno;
196 unsigned long oldmask;
197 unsigned long cr2;
198 struct _fpstate __user *fpstate; /* zero when no FPU context */
199 unsigned long reserved1[8];
201 #endif /* !__KERNEL__ */
203 #endif /* !__i386__ */
205 #endif