···11-#ifdef __KERNEL__22-# ifdef CONFIG_X86_3233-# include "sigcontext_32.h"44-# else55-# include "sigcontext_64.h"66-# endif77-#else88-# ifdef __i386__99-# include "sigcontext_32.h"1010-# else1111-# include "sigcontext_64.h"1212-# endif11+#ifndef _ASM_X86_SIGCONTEXT_H22+#define _ASM_X86_SIGCONTEXT_H33+44+#include <linux/compiler.h>55+#include <asm/types.h>66+77+#ifdef __i386__88+/*99+ * As documented in the iBCS2 standard..1010+ *1111+ * The first part of "struct _fpstate" is just the normal i3871212+ * hardware setup, the extra "status" word is used to save the1313+ * coprocessor status word before entering the handler.1414+ *1515+ * Pentium III FXSR, SSE support1616+ * Gareth Hughes <gareth@valinux.com>, May 20001717+ *1818+ * The FPU state data structure has had to grow to accommodate the1919+ * extended FPU state required by the Streaming SIMD Extensions.2020+ * There is no documented standard to accomplish this at the moment.2121+ */2222+struct _fpreg {2323+ unsigned short significand[4];2424+ unsigned short exponent;2525+};2626+2727+struct _fpxreg {2828+ unsigned short significand[4];2929+ unsigned short exponent;3030+ unsigned short padding[3];3131+};3232+3333+struct _xmmreg {3434+ unsigned long element[4];3535+};3636+3737+struct _fpstate {3838+ /* Regular FPU environment */3939+ unsigned long cw;4040+ unsigned long sw;4141+ unsigned long tag;4242+ unsigned long ipoff;4343+ unsigned long cssel;4444+ unsigned long dataoff;4545+ unsigned long datasel;4646+ struct _fpreg _st[8];4747+ unsigned short status;4848+ unsigned short magic; /* 0xffff = regular FPU data only */4949+5050+ /* FXSR FPU environment */5151+ unsigned long _fxsr_env[6]; /* FXSR FPU env is ignored */5252+ unsigned long mxcsr;5353+ unsigned long reserved;5454+ struct _fpxreg _fxsr_st[8]; /* FXSR FPU reg data is ignored */5555+ struct _xmmreg _xmm[8];5656+ unsigned long padding[56];5757+};5858+5959+#define X86_FXSR_MAGIC 0x00006060+6161+struct sigcontext {6262+ unsigned short gs, __gsh;6363+ unsigned short fs, __fsh;6464+ unsigned short es, __esh;6565+ unsigned short ds, __dsh;6666+ unsigned long edi;6767+ unsigned long esi;6868+ unsigned long ebp;6969+ unsigned long esp;7070+ unsigned long ebx;7171+ unsigned long edx;7272+ unsigned long ecx;7373+ unsigned long eax;7474+ unsigned long trapno;7575+ unsigned long err;7676+ unsigned long eip;7777+ unsigned short cs, __csh;7878+ unsigned long eflags;7979+ unsigned long esp_at_signal;8080+ unsigned short ss, __ssh;8181+ struct _fpstate __user * fpstate;8282+ unsigned long oldmask;8383+ unsigned long cr2;8484+};8585+8686+#else /* __i386__ */8787+8888+/* FXSAVE frame */8989+/* Note: reserved1/2 may someday contain valuable data. Always save/restore9090+ them when you change signal frames. */9191+struct _fpstate {9292+ __u16 cwd;9393+ __u16 swd;9494+ __u16 twd; /* Note this is not the same as the 32bit/x87/FSAVE twd */9595+ __u16 fop;9696+ __u64 rip;9797+ __u64 rdp;9898+ __u32 mxcsr;9999+ __u32 mxcsr_mask;100100+ __u32 st_space[32]; /* 8*16 bytes for each FP-reg */101101+ __u32 xmm_space[64]; /* 16*16 bytes for each XMM-reg */102102+ __u32 reserved2[24];103103+};104104+105105+struct sigcontext {106106+ unsigned long r8;107107+ unsigned long r9;108108+ unsigned long r10;109109+ unsigned long r11;110110+ unsigned long r12;111111+ unsigned long r13;112112+ unsigned long r14;113113+ unsigned long r15;114114+ unsigned long rdi;115115+ unsigned long rsi;116116+ unsigned long rbp;117117+ unsigned long rbx;118118+ unsigned long rdx;119119+ unsigned long rax;120120+ unsigned long rcx;121121+ unsigned long rsp;122122+ unsigned long rip;123123+ unsigned long eflags; /* RFLAGS */124124+ unsigned short cs;125125+ unsigned short gs;126126+ unsigned short fs;127127+ unsigned short __pad0;128128+ unsigned long err;129129+ unsigned long trapno;130130+ unsigned long oldmask;131131+ unsigned long cr2;132132+ struct _fpstate __user *fpstate; /* zero when no FPU context */133133+ unsigned long reserved1[8];134134+};135135+136136+#endif /* !__i386__ */137137+13138#endif
-85
include/asm-x86/sigcontext_32.h
···11-#ifndef _ASMi386_SIGCONTEXT_H22-#define _ASMi386_SIGCONTEXT_H33-44-#include <linux/compiler.h>55-66-/*77- * As documented in the iBCS2 standard..88- *99- * The first part of "struct _fpstate" is just the normal i3871010- * hardware setup, the extra "status" word is used to save the1111- * coprocessor status word before entering the handler.1212- *1313- * Pentium III FXSR, SSE support1414- * Gareth Hughes <gareth@valinux.com>, May 20001515- *1616- * The FPU state data structure has had to grow to accommodate the1717- * extended FPU state required by the Streaming SIMD Extensions.1818- * There is no documented standard to accomplish this at the moment.1919- */2020-struct _fpreg {2121- unsigned short significand[4];2222- unsigned short exponent;2323-};2424-2525-struct _fpxreg {2626- unsigned short significand[4];2727- unsigned short exponent;2828- unsigned short padding[3];2929-};3030-3131-struct _xmmreg {3232- unsigned long element[4];3333-};3434-3535-struct _fpstate {3636- /* Regular FPU environment */3737- unsigned long cw;3838- unsigned long sw;3939- unsigned long tag;4040- unsigned long ipoff;4141- unsigned long cssel;4242- unsigned long dataoff;4343- unsigned long datasel;4444- struct _fpreg _st[8];4545- unsigned short status;4646- unsigned short magic; /* 0xffff = regular FPU data only */4747-4848- /* FXSR FPU environment */4949- unsigned long _fxsr_env[6]; /* FXSR FPU env is ignored */5050- unsigned long mxcsr;5151- unsigned long reserved;5252- struct _fpxreg _fxsr_st[8]; /* FXSR FPU reg data is ignored */5353- struct _xmmreg _xmm[8];5454- unsigned long padding[56];5555-};5656-5757-#define X86_FXSR_MAGIC 0x00005858-5959-struct sigcontext {6060- unsigned short gs, __gsh;6161- unsigned short fs, __fsh;6262- unsigned short es, __esh;6363- unsigned short ds, __dsh;6464- unsigned long edi;6565- unsigned long esi;6666- unsigned long ebp;6767- unsigned long esp;6868- unsigned long ebx;6969- unsigned long edx;7070- unsigned long ecx;7171- unsigned long eax;7272- unsigned long trapno;7373- unsigned long err;7474- unsigned long eip;7575- unsigned short cs, __csh;7676- unsigned long eflags;7777- unsigned long esp_at_signal;7878- unsigned short ss, __ssh;7979- struct _fpstate __user * fpstate;8080- unsigned long oldmask;8181- unsigned long cr2;8282-};8383-8484-8585-#endif
-55
include/asm-x86/sigcontext_64.h
···11-#ifndef _ASM_X86_64_SIGCONTEXT_H22-#define _ASM_X86_64_SIGCONTEXT_H33-44-#include <asm/types.h>55-#include <linux/compiler.h>66-77-/* FXSAVE frame */88-/* Note: reserved1/2 may someday contain valuable data. Always save/restore99- them when you change signal frames. */1010-struct _fpstate {1111- __u16 cwd;1212- __u16 swd;1313- __u16 twd; /* Note this is not the same as the 32bit/x87/FSAVE twd */1414- __u16 fop;1515- __u64 rip;1616- __u64 rdp; 1717- __u32 mxcsr;1818- __u32 mxcsr_mask;1919- __u32 st_space[32]; /* 8*16 bytes for each FP-reg */2020- __u32 xmm_space[64]; /* 16*16 bytes for each XMM-reg */2121- __u32 reserved2[24];2222-};2323-2424-struct sigcontext { 2525- unsigned long r8;2626- unsigned long r9;2727- unsigned long r10;2828- unsigned long r11;2929- unsigned long r12;3030- unsigned long r13;3131- unsigned long r14;3232- unsigned long r15;3333- unsigned long rdi;3434- unsigned long rsi;3535- unsigned long rbp;3636- unsigned long rbx;3737- unsigned long rdx;3838- unsigned long rax;3939- unsigned long rcx;4040- unsigned long rsp;4141- unsigned long rip;4242- unsigned long eflags; /* RFLAGS */4343- unsigned short cs;4444- unsigned short gs;4545- unsigned short fs;4646- unsigned short __pad0; 4747- unsigned long err;4848- unsigned long trapno;4949- unsigned long oldmask;5050- unsigned long cr2;5151- struct _fpstate __user *fpstate; /* zero when no FPU context */5252- unsigned long reserved1[8];5353-};5454-5555-#endif