Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _SIGCONTEXT32_H |
| 2 | #define _SIGCONTEXT32_H 1 |
| 3 | |
| 4 | /* signal context for 32bit programs. */ |
| 5 | |
| 6 | #define X86_FXSR_MAGIC 0x0000 |
| 7 | |
| 8 | struct _fpreg { |
| 9 | unsigned short significand[4]; |
| 10 | unsigned short exponent; |
| 11 | }; |
| 12 | |
| 13 | struct _fpxreg { |
| 14 | unsigned short significand[4]; |
| 15 | unsigned short exponent; |
| 16 | unsigned short padding[3]; |
| 17 | }; |
| 18 | |
| 19 | struct _xmmreg { |
| 20 | __u32 element[4]; |
| 21 | }; |
| 22 | |
| 23 | /* FSAVE frame with extensions */ |
| 24 | struct _fpstate_ia32 { |
| 25 | /* Regular FPU environment */ |
| 26 | __u32 cw; |
| 27 | __u32 sw; |
| 28 | __u32 tag; /* not compatible to 64bit twd */ |
Joe Perches | 895b764 | 2008-03-23 01:03:26 -0700 | [diff] [blame] | 29 | __u32 ipoff; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 30 | __u32 cssel; |
| 31 | __u32 dataoff; |
| 32 | __u32 datasel; |
| 33 | struct _fpreg _st[8]; |
| 34 | unsigned short status; |
| 35 | unsigned short magic; /* 0xffff = regular FPU data only */ |
| 36 | |
| 37 | /* FXSR FPU environment */ |
| 38 | __u32 _fxsr_env[6]; |
| 39 | __u32 mxcsr; |
| 40 | __u32 reserved; |
| 41 | struct _fpxreg _fxsr_st[8]; |
Joe Perches | 895b764 | 2008-03-23 01:03:26 -0700 | [diff] [blame] | 42 | struct _xmmreg _xmm[8]; /* It's actually 16 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 43 | __u32 padding[56]; |
| 44 | }; |
| 45 | |
| 46 | struct sigcontext_ia32 { |
| 47 | unsigned short gs, __gsh; |
| 48 | unsigned short fs, __fsh; |
| 49 | unsigned short es, __esh; |
| 50 | unsigned short ds, __dsh; |
H. Peter Anvin | 742fa54 | 2008-01-30 13:30:56 +0100 | [diff] [blame] | 51 | unsigned int di; |
| 52 | unsigned int si; |
| 53 | unsigned int bp; |
| 54 | unsigned int sp; |
| 55 | unsigned int bx; |
| 56 | unsigned int dx; |
| 57 | unsigned int cx; |
| 58 | unsigned int ax; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 59 | unsigned int trapno; |
| 60 | unsigned int err; |
H. Peter Anvin | 742fa54 | 2008-01-30 13:30:56 +0100 | [diff] [blame] | 61 | unsigned int ip; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 62 | unsigned short cs, __csh; |
H. Peter Anvin | 742fa54 | 2008-01-30 13:30:56 +0100 | [diff] [blame] | 63 | unsigned int flags; |
| 64 | unsigned int sp_at_signal; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 65 | unsigned short ss, __ssh; |
| 66 | unsigned int fpstate; /* really (struct _fpstate_ia32 *) */ |
| 67 | unsigned int oldmask; |
| 68 | unsigned int cr2; |
| 69 | }; |
| 70 | |
| 71 | #endif |