1af170c50SDavid Howells #ifndef _ASM_X86_SIGCONTEXT32_H 2af170c50SDavid Howells #define _ASM_X86_SIGCONTEXT32_H 3af170c50SDavid Howells 4af170c50SDavid Howells #include <linux/types.h> 5af170c50SDavid Howells 6af170c50SDavid Howells /* signal context for 32bit programs. */ 7af170c50SDavid Howells 8af170c50SDavid Howells #define X86_FXSR_MAGIC 0x0000 9af170c50SDavid Howells 10af170c50SDavid Howells struct _fpreg { 11af170c50SDavid Howells unsigned short significand[4]; 12af170c50SDavid Howells unsigned short exponent; 13af170c50SDavid Howells }; 14af170c50SDavid Howells 15af170c50SDavid Howells struct _fpxreg { 16af170c50SDavid Howells unsigned short significand[4]; 17af170c50SDavid Howells unsigned short exponent; 18af170c50SDavid Howells unsigned short padding[3]; 19af170c50SDavid Howells }; 20af170c50SDavid Howells 21af170c50SDavid Howells struct _xmmreg { 22af170c50SDavid Howells __u32 element[4]; 23af170c50SDavid Howells }; 24af170c50SDavid Howells 25af170c50SDavid Howells /* FSAVE frame with extensions */ 26af170c50SDavid Howells struct _fpstate_ia32 { 27af170c50SDavid Howells /* Regular FPU environment */ 28af170c50SDavid Howells __u32 cw; 29af170c50SDavid Howells __u32 sw; 30af170c50SDavid Howells __u32 tag; /* not compatible to 64bit twd */ 31af170c50SDavid Howells __u32 ipoff; 32af170c50SDavid Howells __u32 cssel; 33af170c50SDavid Howells __u32 dataoff; 34af170c50SDavid Howells __u32 datasel; 35af170c50SDavid Howells struct _fpreg _st[8]; 36af170c50SDavid Howells unsigned short status; 37af170c50SDavid Howells unsigned short magic; /* 0xffff = regular FPU data only */ 38af170c50SDavid Howells 39af170c50SDavid Howells /* FXSR FPU environment */ 40af170c50SDavid Howells __u32 _fxsr_env[6]; 41af170c50SDavid Howells __u32 mxcsr; 42af170c50SDavid Howells __u32 reserved; 43af170c50SDavid Howells struct _fpxreg _fxsr_st[8]; 44af170c50SDavid Howells struct _xmmreg _xmm[8]; /* It's actually 16 */ 45af170c50SDavid Howells __u32 padding[44]; 46af170c50SDavid Howells union { 47af170c50SDavid Howells __u32 padding2[12]; 48af170c50SDavid Howells struct _fpx_sw_bytes sw_reserved; 49af170c50SDavid Howells }; 50af170c50SDavid Howells }; 51af170c50SDavid Howells 52af170c50SDavid Howells struct sigcontext_ia32 { 53af170c50SDavid Howells unsigned short gs, __gsh; 54af170c50SDavid Howells unsigned short fs, __fsh; 55af170c50SDavid Howells unsigned short es, __esh; 56af170c50SDavid Howells unsigned short ds, __dsh; 57af170c50SDavid Howells unsigned int di; 58af170c50SDavid Howells unsigned int si; 59af170c50SDavid Howells unsigned int bp; 60af170c50SDavid Howells unsigned int sp; 61af170c50SDavid Howells unsigned int bx; 62af170c50SDavid Howells unsigned int dx; 63af170c50SDavid Howells unsigned int cx; 64af170c50SDavid Howells unsigned int ax; 65af170c50SDavid Howells unsigned int trapno; 66af170c50SDavid Howells unsigned int err; 67af170c50SDavid Howells unsigned int ip; 68af170c50SDavid Howells unsigned short cs, __csh; 69af170c50SDavid Howells unsigned int flags; 70af170c50SDavid Howells unsigned int sp_at_signal; 71af170c50SDavid Howells unsigned short ss, __ssh; 72af170c50SDavid Howells unsigned int fpstate; /* really (struct _fpstate_ia32 *) */ 73af170c50SDavid Howells unsigned int oldmask; 74af170c50SDavid Howells unsigned int cr2; 75af170c50SDavid Howells }; 76af170c50SDavid Howells 77af170c50SDavid Howells #endif /* _ASM_X86_SIGCONTEXT32_H */ 78