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