diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2007-10-23 16:37:24 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2007-10-23 16:37:24 -0400 |
commit | 77129c5e3ddba94b6ab7223504b39956f653f376 (patch) | |
tree | 12ed2497361b4ff2bdf4aa8b5482fc6fba0e95d5 /include/asm-x86/sigcontext.h | |
parent | be7baf80a699644850ff27c2105c171177ece4ea (diff) |
x86: merge sigcontext_32/64.h
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/sigcontext.h')
-rw-r--r-- | include/asm-x86/sigcontext.h | 149 |
1 files changed, 137 insertions, 12 deletions
diff --git a/include/asm-x86/sigcontext.h b/include/asm-x86/sigcontext.h index 0d16ceff1599..c047f9dc3423 100644 --- a/include/asm-x86/sigcontext.h +++ b/include/asm-x86/sigcontext.h | |||
@@ -1,13 +1,138 @@ | |||
1 | #ifdef __KERNEL__ | 1 | #ifndef _ASM_X86_SIGCONTEXT_H |
2 | # ifdef CONFIG_X86_32 | 2 | #define _ASM_X86_SIGCONTEXT_H |
3 | # include "sigcontext_32.h" | 3 | |
4 | # else | 4 | #include <linux/compiler.h> |
5 | # include "sigcontext_64.h" | 5 | #include <asm/types.h> |
6 | # endif | 6 | |
7 | #else | 7 | #ifdef __i386__ |
8 | # ifdef __i386__ | 8 | /* |
9 | # include "sigcontext_32.h" | 9 | * As documented in the iBCS2 standard.. |
10 | # else | 10 | * |
11 | # include "sigcontext_64.h" | 11 | * The first part of "struct _fpstate" is just the normal i387 |
12 | # endif | 12 | * hardware setup, the extra "status" word is used to save the |
13 | * coprocessor status word before entering the handler. | ||
14 | * | ||
15 | * Pentium III FXSR, SSE support | ||
16 | * Gareth Hughes <gareth@valinux.com>, May 2000 | ||
17 | * | ||
18 | * The FPU state data structure has had to grow to accommodate the | ||
19 | * extended FPU state required by the Streaming SIMD Extensions. | ||
20 | * There is no documented standard to accomplish this at the moment. | ||
21 | */ | ||
22 | struct _fpreg { | ||
23 | unsigned short significand[4]; | ||
24 | unsigned short exponent; | ||
25 | }; | ||
26 | |||
27 | struct _fpxreg { | ||
28 | unsigned short significand[4]; | ||
29 | unsigned short exponent; | ||
30 | unsigned short padding[3]; | ||
31 | }; | ||
32 | |||
33 | struct _xmmreg { | ||
34 | unsigned long element[4]; | ||
35 | }; | ||
36 | |||
37 | struct _fpstate { | ||
38 | /* Regular FPU environment */ | ||
39 | unsigned long cw; | ||
40 | unsigned long sw; | ||
41 | unsigned long tag; | ||
42 | unsigned long ipoff; | ||
43 | unsigned long cssel; | ||
44 | unsigned long dataoff; | ||
45 | unsigned long datasel; | ||
46 | struct _fpreg _st[8]; | ||
47 | unsigned short status; | ||
48 | unsigned short magic; /* 0xffff = regular FPU data only */ | ||
49 | |||
50 | /* FXSR FPU environment */ | ||
51 | unsigned long _fxsr_env[6]; /* FXSR FPU env is ignored */ | ||
52 | unsigned long mxcsr; | ||
53 | unsigned long reserved; | ||
54 | struct _fpxreg _fxsr_st[8]; /* FXSR FPU reg data is ignored */ | ||
55 | struct _xmmreg _xmm[8]; | ||
56 | unsigned long padding[56]; | ||
57 | }; | ||
58 | |||
59 | #define X86_FXSR_MAGIC 0x0000 | ||
60 | |||
61 | struct sigcontext { | ||
62 | unsigned short gs, __gsh; | ||
63 | unsigned short fs, __fsh; | ||
64 | unsigned short es, __esh; | ||
65 | unsigned short ds, __dsh; | ||
66 | unsigned long edi; | ||
67 | unsigned long esi; | ||
68 | unsigned long ebp; | ||
69 | unsigned long esp; | ||
70 | unsigned long ebx; | ||
71 | unsigned long edx; | ||
72 | unsigned long ecx; | ||
73 | unsigned long eax; | ||
74 | unsigned long trapno; | ||
75 | unsigned long err; | ||
76 | unsigned long eip; | ||
77 | unsigned short cs, __csh; | ||
78 | unsigned long eflags; | ||
79 | unsigned long esp_at_signal; | ||
80 | unsigned short ss, __ssh; | ||
81 | struct _fpstate __user * fpstate; | ||
82 | unsigned long oldmask; | ||
83 | unsigned long cr2; | ||
84 | }; | ||
85 | |||
86 | #else /* __i386__ */ | ||
87 | |||
88 | /* FXSAVE frame */ | ||
89 | /* Note: reserved1/2 may someday contain valuable data. Always save/restore | ||
90 | them when you change signal frames. */ | ||
91 | struct _fpstate { | ||
92 | __u16 cwd; | ||
93 | __u16 swd; | ||
94 | __u16 twd; /* Note this is not the same as the 32bit/x87/FSAVE twd */ | ||
95 | __u16 fop; | ||
96 | __u64 rip; | ||
97 | __u64 rdp; | ||
98 | __u32 mxcsr; | ||
99 | __u32 mxcsr_mask; | ||
100 | __u32 st_space[32]; /* 8*16 bytes for each FP-reg */ | ||
101 | __u32 xmm_space[64]; /* 16*16 bytes for each XMM-reg */ | ||
102 | __u32 reserved2[24]; | ||
103 | }; | ||
104 | |||
105 | struct sigcontext { | ||
106 | unsigned long r8; | ||
107 | unsigned long r9; | ||
108 | unsigned long r10; | ||
109 | unsigned long r11; | ||
110 | unsigned long r12; | ||
111 | unsigned long r13; | ||
112 | unsigned long r14; | ||
113 | unsigned long r15; | ||
114 | unsigned long rdi; | ||
115 | unsigned long rsi; | ||
116 | unsigned long rbp; | ||
117 | unsigned long rbx; | ||
118 | unsigned long rdx; | ||
119 | unsigned long rax; | ||
120 | unsigned long rcx; | ||
121 | unsigned long rsp; | ||
122 | unsigned long rip; | ||
123 | unsigned long eflags; /* RFLAGS */ | ||
124 | unsigned short cs; | ||
125 | unsigned short gs; | ||
126 | unsigned short fs; | ||
127 | unsigned short __pad0; | ||
128 | unsigned long err; | ||
129 | unsigned long trapno; | ||
130 | unsigned long oldmask; | ||
131 | unsigned long cr2; | ||
132 | struct _fpstate __user *fpstate; /* zero when no FPU context */ | ||
133 | unsigned long reserved1[8]; | ||
134 | }; | ||
135 | |||
136 | #endif /* !__i386__ */ | ||
137 | |||
13 | #endif | 138 | #endif |