diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-01-30 07:30:56 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:30:56 -0500 |
commit | 65ea5b0349903585bfed9720fa06f5edb4f1cd25 (patch) | |
tree | 6c252228c34416b7e2077f23475de34500c2ab8a /arch/x86/ia32/ptrace32.c | |
parent | 53756d3722172815f52272b28c6d5d5e9639adde (diff) |
x86: rename the struct pt_regs members for 32/64-bit consistency
We have a lot of code which differs only by the naming of specific
members of structures that contain registers. In order to enable
additional unifications, this patch drops the e- or r- size prefix
from the register names in struct pt_regs, and drops the x- prefixes
for segment registers on the 32-bit side.
This patch also performs the equivalent renames in some additional
places that might be candidates for unification in the future.
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 'arch/x86/ia32/ptrace32.c')
-rw-r--r-- | arch/x86/ia32/ptrace32.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/arch/x86/ia32/ptrace32.c b/arch/x86/ia32/ptrace32.c index 8c6fb9d8352b..1e382e3bd882 100644 --- a/arch/x86/ia32/ptrace32.c +++ b/arch/x86/ia32/ptrace32.c | |||
@@ -73,19 +73,19 @@ static int putreg32(struct task_struct *child, unsigned regno, u32 val) | |||
73 | stack[offsetof(struct pt_regs, cs)/8] = val & 0xffff; | 73 | stack[offsetof(struct pt_regs, cs)/8] = val & 0xffff; |
74 | break; | 74 | break; |
75 | 75 | ||
76 | R32(ebx, rbx); | 76 | R32(ebx, bx); |
77 | R32(ecx, rcx); | 77 | R32(ecx, cx); |
78 | R32(edx, rdx); | 78 | R32(edx, dx); |
79 | R32(edi, rdi); | 79 | R32(edi, di); |
80 | R32(esi, rsi); | 80 | R32(esi, si); |
81 | R32(ebp, rbp); | 81 | R32(ebp, bp); |
82 | R32(eax, rax); | 82 | R32(eax, ax); |
83 | R32(orig_eax, orig_rax); | 83 | R32(orig_eax, orig_ax); |
84 | R32(eip, rip); | 84 | R32(eip, ip); |
85 | R32(esp, rsp); | 85 | R32(esp, sp); |
86 | 86 | ||
87 | case offsetof(struct user32, regs.eflags): { | 87 | case offsetof(struct user32, regs.eflags): { |
88 | __u64 *flags = &stack[offsetof(struct pt_regs, eflags)/8]; | 88 | __u64 *flags = &stack[offsetof(struct pt_regs, flags)/8]; |
89 | 89 | ||
90 | val &= FLAG_MASK; | 90 | val &= FLAG_MASK; |
91 | /* | 91 | /* |
@@ -145,22 +145,22 @@ static int getreg32(struct task_struct *child, unsigned regno, u32 *val) | |||
145 | 145 | ||
146 | R32(cs, cs); | 146 | R32(cs, cs); |
147 | R32(ss, ss); | 147 | R32(ss, ss); |
148 | R32(ebx, rbx); | 148 | R32(ebx, bx); |
149 | R32(ecx, rcx); | 149 | R32(ecx, cx); |
150 | R32(edx, rdx); | 150 | R32(edx, dx); |
151 | R32(edi, rdi); | 151 | R32(edi, di); |
152 | R32(esi, rsi); | 152 | R32(esi, si); |
153 | R32(ebp, rbp); | 153 | R32(ebp, bp); |
154 | R32(eax, rax); | 154 | R32(eax, ax); |
155 | R32(orig_eax, orig_rax); | 155 | R32(orig_eax, orig_ax); |
156 | R32(eip, rip); | 156 | R32(eip, ip); |
157 | R32(esp, rsp); | 157 | R32(esp, sp); |
158 | 158 | ||
159 | case offsetof(struct user32, regs.eflags): | 159 | case offsetof(struct user32, regs.eflags): |
160 | /* | 160 | /* |
161 | * If the debugger set TF, hide it from the readout. | 161 | * If the debugger set TF, hide it from the readout. |
162 | */ | 162 | */ |
163 | *val = stack[offsetof(struct pt_regs, eflags)/8]; | 163 | *val = stack[offsetof(struct pt_regs, flags)/8]; |
164 | if (test_tsk_thread_flag(child, TIF_FORCED_TF)) | 164 | if (test_tsk_thread_flag(child, TIF_FORCED_TF)) |
165 | *val &= ~X86_EFLAGS_TF; | 165 | *val &= ~X86_EFLAGS_TF; |
166 | break; | 166 | break; |