aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86')
-rw-r--r--include/asm-x86/sigcontext.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/include/asm-x86/sigcontext.h b/include/asm-x86/sigcontext.h
index 681deade5f00..d743947f4c77 100644
--- a/include/asm-x86/sigcontext.h
+++ b/include/asm-x86/sigcontext.h
@@ -58,6 +58,7 @@ struct _fpstate {
58 58
59#define X86_FXSR_MAGIC 0x0000 59#define X86_FXSR_MAGIC 0x0000
60 60
61#ifdef __KERNEL__
61struct sigcontext { 62struct sigcontext {
62 unsigned short gs, __gsh; 63 unsigned short gs, __gsh;
63 unsigned short fs, __fsh; 64 unsigned short fs, __fsh;
@@ -82,6 +83,35 @@ struct sigcontext {
82 unsigned long oldmask; 83 unsigned long oldmask;
83 unsigned long cr2; 84 unsigned long cr2;
84}; 85};
86#else /* __KERNEL__ */
87/*
88 * User-space might still rely on the old definition:
89 */
90struct sigcontext {
91 unsigned short gs, __gsh;
92 unsigned short fs, __fsh;
93 unsigned short es, __esh;
94 unsigned short ds, __dsh;
95 unsigned long edi;
96 unsigned long esi;
97 unsigned long ebp;
98 unsigned long esp;
99 unsigned long ebx;
100 unsigned long edx;
101 unsigned long ecx;
102 unsigned long eax;
103 unsigned long trapno;
104 unsigned long err;
105 unsigned long eip;
106 unsigned short cs, __csh;
107 unsigned long eflags;
108 unsigned long esp_at_signal;
109 unsigned short ss, __ssh;
110 struct _fpstate __user * fpstate;
111 unsigned long oldmask;
112 unsigned long cr2;
113};
114#endif /* !__KERNEL__ */
85 115
86#else /* __i386__ */ 116#else /* __i386__ */
87 117
@@ -102,6 +132,7 @@ struct _fpstate {
102 __u32 reserved2[24]; 132 __u32 reserved2[24];
103}; 133};
104 134
135#ifdef __KERNEL__
105struct sigcontext { 136struct sigcontext {
106 unsigned long r8; 137 unsigned long r8;
107 unsigned long r9; 138 unsigned long r9;
@@ -132,6 +163,41 @@ struct sigcontext {
132 struct _fpstate __user *fpstate; /* zero when no FPU context */ 163 struct _fpstate __user *fpstate; /* zero when no FPU context */
133 unsigned long reserved1[8]; 164 unsigned long reserved1[8];
134}; 165};
166#else /* __KERNEL__ */
167/*
168 * User-space might still rely on the old definition:
169 */
170struct sigcontext {
171 unsigned long r8;
172 unsigned long r9;
173 unsigned long r10;
174 unsigned long r11;
175 unsigned long r12;
176 unsigned long r13;
177 unsigned long r14;
178 unsigned long r15;
179 unsigned long rdi;
180 unsigned long rsi;
181 unsigned long rbp;
182 unsigned long rbx;
183 unsigned long rdx;
184 unsigned long rax;
185 unsigned long rcx;
186 unsigned long rsp;
187 unsigned long rip;
188 unsigned long eflags; /* RFLAGS */
189 unsigned short cs;
190 unsigned short gs;
191 unsigned short fs;
192 unsigned short __pad0;
193 unsigned long err;
194 unsigned long trapno;
195 unsigned long oldmask;
196 unsigned long cr2;
197 struct _fpstate __user *fpstate; /* zero when no FPU context */
198 unsigned long reserved1[8];
199};
200#endif /* !__KERNEL__ */
135 201
136#endif /* !__i386__ */ 202#endif /* !__i386__ */
137 203