aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/elf.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
commit65ea5b0349903585bfed9720fa06f5edb4f1cd25 (patch)
tree6c252228c34416b7e2077f23475de34500c2ab8a /include/asm-x86/elf.h
parent53756d3722172815f52272b28c6d5d5e9639adde (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 'include/asm-x86/elf.h')
-rw-r--r--include/asm-x86/elf.h66
1 files changed, 33 insertions, 33 deletions
diff --git a/include/asm-x86/elf.h b/include/asm-x86/elf.h
index 60f5101d9483..5e5705bf082a 100644
--- a/include/asm-x86/elf.h
+++ b/include/asm-x86/elf.h
@@ -99,32 +99,32 @@ typedef struct user_fxsr_struct elf_fpxregset_t;
99 just to make things more deterministic. 99 just to make things more deterministic.
100 */ 100 */
101#define ELF_PLAT_INIT(_r, load_addr) do { \ 101#define ELF_PLAT_INIT(_r, load_addr) do { \
102 _r->ebx = 0; _r->ecx = 0; _r->edx = 0; \ 102 _r->bx = 0; _r->cx = 0; _r->dx = 0; \
103 _r->esi = 0; _r->edi = 0; _r->ebp = 0; \ 103 _r->si = 0; _r->di = 0; _r->bp = 0; \
104 _r->eax = 0; \ 104 _r->ax = 0; \
105} while (0) 105} while (0)
106 106
107/* regs is struct pt_regs, pr_reg is elf_gregset_t (which is 107/* regs is struct pt_regs, pr_reg is elf_gregset_t (which is
108 now struct_user_regs, they are different) */ 108 now struct_user_regs, they are different) */
109 109
110#define ELF_CORE_COPY_REGS(pr_reg, regs) \ 110#define ELF_CORE_COPY_REGS(pr_reg, regs) \
111 pr_reg[0] = regs->ebx; \ 111 pr_reg[0] = regs->bx; \
112 pr_reg[1] = regs->ecx; \ 112 pr_reg[1] = regs->cx; \
113 pr_reg[2] = regs->edx; \ 113 pr_reg[2] = regs->dx; \
114 pr_reg[3] = regs->esi; \ 114 pr_reg[3] = regs->si; \
115 pr_reg[4] = regs->edi; \ 115 pr_reg[4] = regs->di; \
116 pr_reg[5] = regs->ebp; \ 116 pr_reg[5] = regs->bp; \
117 pr_reg[6] = regs->eax; \ 117 pr_reg[6] = regs->ax; \
118 pr_reg[7] = regs->xds & 0xffff; \ 118 pr_reg[7] = regs->ds & 0xffff; \
119 pr_reg[8] = regs->xes & 0xffff; \ 119 pr_reg[8] = regs->es & 0xffff; \
120 pr_reg[9] = regs->xfs & 0xffff; \ 120 pr_reg[9] = regs->fs & 0xffff; \
121 savesegment(gs,pr_reg[10]); \ 121 savesegment(gs,pr_reg[10]); \
122 pr_reg[11] = regs->orig_eax; \ 122 pr_reg[11] = regs->orig_ax; \
123 pr_reg[12] = regs->eip; \ 123 pr_reg[12] = regs->ip; \
124 pr_reg[13] = regs->xcs & 0xffff; \ 124 pr_reg[13] = regs->cs & 0xffff; \
125 pr_reg[14] = regs->eflags; \ 125 pr_reg[14] = regs->flags; \
126 pr_reg[15] = regs->esp; \ 126 pr_reg[15] = regs->sp; \
127 pr_reg[16] = regs->xss & 0xffff; 127 pr_reg[16] = regs->ss & 0xffff;
128 128
129#define ELF_PLATFORM (utsname()->machine) 129#define ELF_PLATFORM (utsname()->machine)
130#define set_personality_64bit() do { } while (0) 130#define set_personality_64bit() do { } while (0)
@@ -142,9 +142,9 @@ extern unsigned int vdso_enabled;
142 142
143#define ELF_PLAT_INIT(_r, load_addr) do { \ 143#define ELF_PLAT_INIT(_r, load_addr) do { \
144 struct task_struct *cur = current; \ 144 struct task_struct *cur = current; \
145 (_r)->rbx = 0; (_r)->rcx = 0; (_r)->rdx = 0; \ 145 (_r)->bx = 0; (_r)->cx = 0; (_r)->dx = 0; \
146 (_r)->rsi = 0; (_r)->rdi = 0; (_r)->rbp = 0; \ 146 (_r)->si = 0; (_r)->di = 0; (_r)->bp = 0; \
147 (_r)->rax = 0; \ 147 (_r)->ax = 0; \
148 (_r)->r8 = 0; \ 148 (_r)->r8 = 0; \
149 (_r)->r9 = 0; \ 149 (_r)->r9 = 0; \
150 (_r)->r10 = 0; \ 150 (_r)->r10 = 0; \
@@ -169,22 +169,22 @@ extern unsigned int vdso_enabled;
169 (pr_reg)[1] = (regs)->r14; \ 169 (pr_reg)[1] = (regs)->r14; \
170 (pr_reg)[2] = (regs)->r13; \ 170 (pr_reg)[2] = (regs)->r13; \
171 (pr_reg)[3] = (regs)->r12; \ 171 (pr_reg)[3] = (regs)->r12; \
172 (pr_reg)[4] = (regs)->rbp; \ 172 (pr_reg)[4] = (regs)->bp; \
173 (pr_reg)[5] = (regs)->rbx; \ 173 (pr_reg)[5] = (regs)->bx; \
174 (pr_reg)[6] = (regs)->r11; \ 174 (pr_reg)[6] = (regs)->r11; \
175 (pr_reg)[7] = (regs)->r10; \ 175 (pr_reg)[7] = (regs)->r10; \
176 (pr_reg)[8] = (regs)->r9; \ 176 (pr_reg)[8] = (regs)->r9; \
177 (pr_reg)[9] = (regs)->r8; \ 177 (pr_reg)[9] = (regs)->r8; \
178 (pr_reg)[10] = (regs)->rax; \ 178 (pr_reg)[10] = (regs)->ax; \
179 (pr_reg)[11] = (regs)->rcx; \ 179 (pr_reg)[11] = (regs)->cx; \
180 (pr_reg)[12] = (regs)->rdx; \ 180 (pr_reg)[12] = (regs)->dx; \
181 (pr_reg)[13] = (regs)->rsi; \ 181 (pr_reg)[13] = (regs)->si; \
182 (pr_reg)[14] = (regs)->rdi; \ 182 (pr_reg)[14] = (regs)->di; \
183 (pr_reg)[15] = (regs)->orig_rax; \ 183 (pr_reg)[15] = (regs)->orig_ax; \
184 (pr_reg)[16] = (regs)->rip; \ 184 (pr_reg)[16] = (regs)->ip; \
185 (pr_reg)[17] = (regs)->cs; \ 185 (pr_reg)[17] = (regs)->cs; \
186 (pr_reg)[18] = (regs)->eflags; \ 186 (pr_reg)[18] = (regs)->flags; \
187 (pr_reg)[19] = (regs)->rsp; \ 187 (pr_reg)[19] = (regs)->sp; \
188 (pr_reg)[20] = (regs)->ss; \ 188 (pr_reg)[20] = (regs)->ss; \
189 (pr_reg)[21] = current->thread.fs; \ 189 (pr_reg)[21] = current->thread.fs; \
190 (pr_reg)[22] = current->thread.gs; \ 190 (pr_reg)[22] = current->thread.gs; \