aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/user_64.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-01-30 07:30:56 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:30:56 -0500
commit153d5f2e5787c74e9cbb6b6687c9b04be1b59893 (patch)
treecacde0a0ce46bb797a6b4b8e6817ceef996ebc5e /include/asm-x86/user_64.h
parent65ea5b0349903585bfed9720fa06f5edb4f1cd25 (diff)
x86: use generic register names in struct user_regs_struct
Switch struct user_regs_struct (defined in <asm/user.h>, which is no longer exported to userspace) to using register names without e- or r-prefixes for both 32 and 64 bit x86. This is intended as a preliminary step in unifying this code between architectures. Also, be a bit more strict in truncating 32-bit "extended" segment register values to 16 bits. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/user_64.h')
-rw-r--r--include/asm-x86/user_64.h41
1 files changed, 31 insertions, 10 deletions
diff --git a/include/asm-x86/user_64.h b/include/asm-x86/user_64.h
index 12785c649ac5..a5449d456cc0 100644
--- a/include/asm-x86/user_64.h
+++ b/include/asm-x86/user_64.h
@@ -40,13 +40,13 @@
40 * and both the standard and SIMD floating point data can be accessed via 40 * and both the standard and SIMD floating point data can be accessed via
41 * the new ptrace requests. In either case, changes to the FPU environment 41 * the new ptrace requests. In either case, changes to the FPU environment
42 * will be reflected in the task's state as expected. 42 * will be reflected in the task's state as expected.
43 * 43 *
44 * x86-64 support by Andi Kleen. 44 * x86-64 support by Andi Kleen.
45 */ 45 */
46 46
47/* This matches the 64bit FXSAVE format as defined by AMD. It is the same 47/* This matches the 64bit FXSAVE format as defined by AMD. It is the same
48 as the 32bit format defined by Intel, except that the selector:offset pairs for 48 as the 32bit format defined by Intel, except that the selector:offset pairs for
49 data and eip are replaced with flat 64bit pointers. */ 49 data and eip are replaced with flat 64bit pointers. */
50struct user_i387_struct { 50struct user_i387_struct {
51 unsigned short cwd; 51 unsigned short cwd;
52 unsigned short swd; 52 unsigned short swd;
@@ -65,13 +65,34 @@ struct user_i387_struct {
65 * Segment register layout in coredumps. 65 * Segment register layout in coredumps.
66 */ 66 */
67struct user_regs_struct { 67struct user_regs_struct {
68 unsigned long r15,r14,r13,r12,rbp,rbx,r11,r10; 68 unsigned long r15;
69 unsigned long r9,r8,rax,rcx,rdx,rsi,rdi,orig_rax; 69 unsigned long r14;
70 unsigned long rip,cs,eflags; 70 unsigned long r13;
71 unsigned long rsp,ss; 71 unsigned long r12;
72 unsigned long fs_base, gs_base; 72 unsigned long bp;
73 unsigned long ds,es,fs,gs; 73 unsigned long bx;
74}; 74 unsigned long r11;
75 unsigned long r10;
76 unsigned long r9;
77 unsigned long r8;
78 unsigned long ax;
79 unsigned long cx;
80 unsigned long dx;
81 unsigned long si;
82 unsigned long di;
83 unsigned long orig_ax;
84 unsigned long ip;
85 unsigned long cs;
86 unsigned long flags;
87 unsigned long sp;
88 unsigned long ss;
89 unsigned long fs_base;
90 unsigned long gs_base;
91 unsigned long ds;
92 unsigned long es;
93 unsigned long fs;
94 unsigned long gs;
95};
75 96
76/* When the kernel dumps core, it starts by dumping the user struct - 97/* When the kernel dumps core, it starts by dumping the user struct -
77 this will be used by gdb to figure out where the data and stack segments 98 this will be used by gdb to figure out where the data and stack segments
@@ -94,7 +115,7 @@ struct user{
94 This is actually the bottom of the stack, 115 This is actually the bottom of the stack,
95 the top of the stack is always found in the 116 the top of the stack is always found in the
96 esp register. */ 117 esp register. */
97 long int signal; /* Signal that caused the core dump. */ 118 long int signal; /* Signal that caused the core dump. */
98 int reserved; /* No longer used */ 119 int reserved; /* No longer used */
99 int pad1; 120 int pad1;
100 struct user_pt_regs * u_ar0; /* Used by gdb to help find the values for */ 121 struct user_pt_regs * u_ar0; /* Used by gdb to help find the values for */