H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 1 | #ifndef _ASM_X86_SIGCONTEXT32_H |
| 2 | #define _ASM_X86_SIGCONTEXT32_H |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | |
Jaswinder Singh Rajput | 2de548f | 2009-01-30 22:55:20 +0530 | [diff] [blame] | 4 | #include <linux/types.h> |
| 5 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | /* signal context for 32bit programs. */ |
| 7 | |
| 8 | #define X86_FXSR_MAGIC 0x0000 |
| 9 | |
| 10 | struct _fpreg { |
| 11 | unsigned short significand[4]; |
| 12 | unsigned short exponent; |
| 13 | }; |
| 14 | |
| 15 | struct _fpxreg { |
| 16 | unsigned short significand[4]; |
| 17 | unsigned short exponent; |
| 18 | unsigned short padding[3]; |
| 19 | }; |
| 20 | |
| 21 | struct _xmmreg { |
| 22 | __u32 element[4]; |
| 23 | }; |
| 24 | |
| 25 | /* FSAVE frame with extensions */ |
| 26 | struct _fpstate_ia32 { |
| 27 | /* Regular FPU environment */ |
| 28 | __u32 cw; |
| 29 | __u32 sw; |
| 30 | __u32 tag; /* not compatible to 64bit twd */ |
Joe Perches | 895b764 | 2008-03-23 01:03:26 -0700 | [diff] [blame] | 31 | __u32 ipoff; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | __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 Perches | 895b764 | 2008-03-23 01:03:26 -0700 | [diff] [blame] | 44 | struct _xmmreg _xmm[8]; /* It's actually 16 */ |
Suresh Siddha | bdd8cab | 2008-07-29 10:29:24 -0700 | [diff] [blame] | 45 | __u32 padding[44]; |
| 46 | union { |
| 47 | __u32 padding2[12]; |
| 48 | struct _fpx_sw_bytes sw_reserved; |
| 49 | }; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | }; |
| 51 | |
| 52 | struct sigcontext_ia32 { |
| 53 | unsigned short gs, __gsh; |
| 54 | unsigned short fs, __fsh; |
| 55 | unsigned short es, __esh; |
| 56 | unsigned short ds, __dsh; |
H. Peter Anvin | 742fa54 | 2008-01-30 13:30:56 +0100 | [diff] [blame] | 57 | 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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 65 | unsigned int trapno; |
| 66 | unsigned int err; |
H. Peter Anvin | 742fa54 | 2008-01-30 13:30:56 +0100 | [diff] [blame] | 67 | unsigned int ip; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 68 | unsigned short cs, __csh; |
H. Peter Anvin | 742fa54 | 2008-01-30 13:30:56 +0100 | [diff] [blame] | 69 | unsigned int flags; |
| 70 | unsigned int sp_at_signal; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 71 | unsigned short ss, __ssh; |
| 72 | unsigned int fpstate; /* really (struct _fpstate_ia32 *) */ |
| 73 | unsigned int oldmask; |
| 74 | unsigned int cr2; |
| 75 | }; |
| 76 | |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 77 | #endif /* _ASM_X86_SIGCONTEXT32_H */ |