1 #ifndef _ASM_X86_SIGCONTEXT32_H 2 #define _ASM_X86_SIGCONTEXT32_H 3 4 #include <linux/types.h> 5 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 */ 31 __u32 ipoff; 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]; 44 struct _xmmreg _xmm[8]; /* It's actually 16 */ 45 __u32 padding[44]; 46 union { 47 __u32 padding2[12]; 48 struct _fpx_sw_bytes sw_reserved; 49 }; 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; 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; 65 unsigned int trapno; 66 unsigned int err; 67 unsigned int ip; 68 unsigned short cs, __csh; 69 unsigned int flags; 70 unsigned int sp_at_signal; 71 unsigned short ss, __ssh; 72 unsigned int fpstate; /* really (struct _fpstate_ia32 *) */ 73 unsigned int oldmask; 74 unsigned int cr2; 75 }; 76 77 #endif /* _ASM_X86_SIGCONTEXT32_H */ 78