blob: ad1478c4ae1297b58ff8f1be6bece331769bb3b3 [file] [log] [blame]
H. Peter Anvin1965aae2008-10-22 22:26:29 -07001#ifndef _ASM_X86_SIGCONTEXT32_H
2#define _ASM_X86_SIGCONTEXT32_H
Linus Torvalds1da177e2005-04-16 15:20:36 -07003
Jaswinder Singh Rajput2de548f2009-01-30 22:55:20 +05304#include <linux/types.h>
5
Linus Torvalds1da177e2005-04-16 15:20:36 -07006/* signal context for 32bit programs. */
7
8#define X86_FXSR_MAGIC 0x0000
9
10struct _fpreg {
11 unsigned short significand[4];
12 unsigned short exponent;
13};
14
15struct _fpxreg {
16 unsigned short significand[4];
17 unsigned short exponent;
18 unsigned short padding[3];
19};
20
21struct _xmmreg {
22 __u32 element[4];
23};
24
25/* FSAVE frame with extensions */
26struct _fpstate_ia32 {
27 /* Regular FPU environment */
28 __u32 cw;
29 __u32 sw;
30 __u32 tag; /* not compatible to 64bit twd */
Joe Perches895b7642008-03-23 01:03:26 -070031 __u32 ipoff;
Linus Torvalds1da177e2005-04-16 15:20:36 -070032 __u32 cssel;
33 __u32 dataoff;
34 __u32 datasel;
35 struct _fpreg _st[8];
36 unsigned short status;
37 unsigned short magic; /* 0xffff = regular FPU data only */
38
39 /* FXSR FPU environment */
40 __u32 _fxsr_env[6];
41 __u32 mxcsr;
42 __u32 reserved;
43 struct _fpxreg _fxsr_st[8];
Joe Perches895b7642008-03-23 01:03:26 -070044 struct _xmmreg _xmm[8]; /* It's actually 16 */
Suresh Siddhabdd8cab2008-07-29 10:29:24 -070045 __u32 padding[44];
46 union {
47 __u32 padding2[12];
48 struct _fpx_sw_bytes sw_reserved;
49 };
Linus Torvalds1da177e2005-04-16 15:20:36 -070050};
51
52struct sigcontext_ia32 {
53 unsigned short gs, __gsh;
54 unsigned short fs, __fsh;
55 unsigned short es, __esh;
56 unsigned short ds, __dsh;
H. Peter Anvin742fa542008-01-30 13:30:56 +010057 unsigned int di;
58 unsigned int si;
59 unsigned int bp;
60 unsigned int sp;
61 unsigned int bx;
62 unsigned int dx;
63 unsigned int cx;
64 unsigned int ax;
Linus Torvalds1da177e2005-04-16 15:20:36 -070065 unsigned int trapno;
66 unsigned int err;
H. Peter Anvin742fa542008-01-30 13:30:56 +010067 unsigned int ip;
Linus Torvalds1da177e2005-04-16 15:20:36 -070068 unsigned short cs, __csh;
H. Peter Anvin742fa542008-01-30 13:30:56 +010069 unsigned int flags;
70 unsigned int sp_at_signal;
Linus Torvalds1da177e2005-04-16 15:20:36 -070071 unsigned short ss, __ssh;
72 unsigned int fpstate; /* really (struct _fpstate_ia32 *) */
73 unsigned int oldmask;
74 unsigned int cr2;
75};
76
H. Peter Anvin1965aae2008-10-22 22:26:29 -070077#endif /* _ASM_X86_SIGCONTEXT32_H */