diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2011-08-18 15:10:09 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2011-11-02 09:15:18 -0400 |
commit | 3579a389730dd74d9f280152c52aa851dd1da860 (patch) | |
tree | fffea858abf10a13da5f76b3f3f5bf85fd4fa568 | |
parent | 8edc4147bec5b7b92b48a6013ec99c41b16c5f93 (diff) |
um: merge HOST_... of registers common on i386 and amd64
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
-rw-r--r-- | arch/x86/um/ptrace_32.c | 14 | ||||
-rw-r--r-- | arch/x86/um/ptrace_64.c | 14 | ||||
-rw-r--r-- | arch/x86/um/shared/sysdep/ptrace_32.h | 14 | ||||
-rw-r--r-- | arch/x86/um/shared/sysdep/ptrace_64.h | 14 | ||||
-rw-r--r-- | arch/x86/um/signal_32.c | 14 | ||||
-rw-r--r-- | arch/x86/um/signal_64.c | 28 | ||||
-rw-r--r-- | arch/x86/um/user-offsets.c | 28 |
7 files changed, 63 insertions, 63 deletions
diff --git a/arch/x86/um/ptrace_32.c b/arch/x86/um/ptrace_32.c index a174fde2531c..3b949daa095c 100644 --- a/arch/x86/um/ptrace_32.c +++ b/arch/x86/um/ptrace_32.c | |||
@@ -51,13 +51,13 @@ int is_syscall(unsigned long addr) | |||
51 | #define FLAG_MASK 0x00044dd5 | 51 | #define FLAG_MASK 0x00044dd5 |
52 | 52 | ||
53 | static const int reg_offsets[] = { | 53 | static const int reg_offsets[] = { |
54 | [EBX] = HOST_EBX, | 54 | [EBX] = HOST_BX, |
55 | [ECX] = HOST_ECX, | 55 | [ECX] = HOST_CX, |
56 | [EDX] = HOST_EDX, | 56 | [EDX] = HOST_DX, |
57 | [ESI] = HOST_ESI, | 57 | [ESI] = HOST_SI, |
58 | [EDI] = HOST_EDI, | 58 | [EDI] = HOST_DI, |
59 | [EBP] = HOST_EBP, | 59 | [EBP] = HOST_BP, |
60 | [EAX] = HOST_EAX, | 60 | [EAX] = HOST_AX, |
61 | [DS] = HOST_DS, | 61 | [DS] = HOST_DS, |
62 | [ES] = HOST_ES, | 62 | [ES] = HOST_ES, |
63 | [FS] = HOST_FS, | 63 | [FS] = HOST_FS, |
diff --git a/arch/x86/um/ptrace_64.c b/arch/x86/um/ptrace_64.c index 44e68e0c0d10..6e6343e73296 100644 --- a/arch/x86/um/ptrace_64.c +++ b/arch/x86/um/ptrace_64.c | |||
@@ -30,13 +30,13 @@ static const int reg_offsets[] = | |||
30 | [R15 >> 3] = HOST_R15, | 30 | [R15 >> 3] = HOST_R15, |
31 | [RIP >> 3] = HOST_IP, | 31 | [RIP >> 3] = HOST_IP, |
32 | [RSP >> 3] = HOST_SP, | 32 | [RSP >> 3] = HOST_SP, |
33 | [RAX >> 3] = HOST_RAX, | 33 | [RAX >> 3] = HOST_AX, |
34 | [RBX >> 3] = HOST_RBX, | 34 | [RBX >> 3] = HOST_BX, |
35 | [RCX >> 3] = HOST_RCX, | 35 | [RCX >> 3] = HOST_CX, |
36 | [RDX >> 3] = HOST_RDX, | 36 | [RDX >> 3] = HOST_DX, |
37 | [RSI >> 3] = HOST_RSI, | 37 | [RSI >> 3] = HOST_SI, |
38 | [RDI >> 3] = HOST_RDI, | 38 | [RDI >> 3] = HOST_DI, |
39 | [RBP >> 3] = HOST_RBP, | 39 | [RBP >> 3] = HOST_BP, |
40 | [CS >> 3] = HOST_CS, | 40 | [CS >> 3] = HOST_CS, |
41 | [SS >> 3] = HOST_SS, | 41 | [SS >> 3] = HOST_SS, |
42 | [FS_BASE >> 3] = HOST_FS_BASE, | 42 | [FS_BASE >> 3] = HOST_FS_BASE, |
diff --git a/arch/x86/um/shared/sysdep/ptrace_32.h b/arch/x86/um/shared/sysdep/ptrace_32.h index bad747a239cd..befd1df32ed0 100644 --- a/arch/x86/um/shared/sysdep/ptrace_32.h +++ b/arch/x86/um/shared/sysdep/ptrace_32.h | |||
@@ -27,13 +27,13 @@ extern int sysemu_supported; | |||
27 | #define REGS_IP(r) ((r)[HOST_IP]) | 27 | #define REGS_IP(r) ((r)[HOST_IP]) |
28 | #define REGS_SP(r) ((r)[HOST_SP]) | 28 | #define REGS_SP(r) ((r)[HOST_SP]) |
29 | #define REGS_EFLAGS(r) ((r)[HOST_EFLAGS]) | 29 | #define REGS_EFLAGS(r) ((r)[HOST_EFLAGS]) |
30 | #define REGS_EAX(r) ((r)[HOST_EAX]) | 30 | #define REGS_EAX(r) ((r)[HOST_AX]) |
31 | #define REGS_EBX(r) ((r)[HOST_EBX]) | 31 | #define REGS_EBX(r) ((r)[HOST_BX]) |
32 | #define REGS_ECX(r) ((r)[HOST_ECX]) | 32 | #define REGS_ECX(r) ((r)[HOST_CX]) |
33 | #define REGS_EDX(r) ((r)[HOST_EDX]) | 33 | #define REGS_EDX(r) ((r)[HOST_DX]) |
34 | #define REGS_ESI(r) ((r)[HOST_ESI]) | 34 | #define REGS_ESI(r) ((r)[HOST_SI]) |
35 | #define REGS_EDI(r) ((r)[HOST_EDI]) | 35 | #define REGS_EDI(r) ((r)[HOST_DI]) |
36 | #define REGS_EBP(r) ((r)[HOST_EBP]) | 36 | #define REGS_EBP(r) ((r)[HOST_BP]) |
37 | #define REGS_CS(r) ((r)[HOST_CS]) | 37 | #define REGS_CS(r) ((r)[HOST_CS]) |
38 | #define REGS_SS(r) ((r)[HOST_SS]) | 38 | #define REGS_SS(r) ((r)[HOST_SS]) |
39 | #define REGS_DS(r) ((r)[HOST_DS]) | 39 | #define REGS_DS(r) ((r)[HOST_DS]) |
diff --git a/arch/x86/um/shared/sysdep/ptrace_64.h b/arch/x86/um/shared/sysdep/ptrace_64.h index a360fe25431a..430dedc2505e 100644 --- a/arch/x86/um/shared/sysdep/ptrace_64.h +++ b/arch/x86/um/shared/sysdep/ptrace_64.h | |||
@@ -17,13 +17,13 @@ | |||
17 | #define REGS_IP(r) ((r)[HOST_IP]) | 17 | #define REGS_IP(r) ((r)[HOST_IP]) |
18 | #define REGS_SP(r) ((r)[HOST_SP]) | 18 | #define REGS_SP(r) ((r)[HOST_SP]) |
19 | 19 | ||
20 | #define REGS_RBX(r) ((r)[HOST_RBX]) | 20 | #define REGS_RBX(r) ((r)[HOST_BX]) |
21 | #define REGS_RCX(r) ((r)[HOST_RCX]) | 21 | #define REGS_RCX(r) ((r)[HOST_CX]) |
22 | #define REGS_RDX(r) ((r)[HOST_RDX]) | 22 | #define REGS_RDX(r) ((r)[HOST_DX]) |
23 | #define REGS_RSI(r) ((r)[HOST_RSI]) | 23 | #define REGS_RSI(r) ((r)[HOST_SI]) |
24 | #define REGS_RDI(r) ((r)[HOST_RDI]) | 24 | #define REGS_RDI(r) ((r)[HOST_DI]) |
25 | #define REGS_RBP(r) ((r)[HOST_RBP]) | 25 | #define REGS_RBP(r) ((r)[HOST_BP]) |
26 | #define REGS_RAX(r) ((r)[HOST_RAX]) | 26 | #define REGS_RAX(r) ((r)[HOST_AX]) |
27 | #define REGS_R8(r) ((r)[HOST_R8]) | 27 | #define REGS_R8(r) ((r)[HOST_R8]) |
28 | #define REGS_R9(r) ((r)[HOST_R9]) | 28 | #define REGS_R9(r) ((r)[HOST_R9]) |
29 | #define REGS_R10(r) ((r)[HOST_R10]) | 29 | #define REGS_R10(r) ((r)[HOST_R10]) |
diff --git a/arch/x86/um/signal_32.c b/arch/x86/um/signal_32.c index bcbfb0d64813..2eebdc05be03 100644 --- a/arch/x86/um/signal_32.c +++ b/arch/x86/um/signal_32.c | |||
@@ -160,14 +160,14 @@ static int copy_sc_from_user(struct pt_regs *regs, | |||
160 | GETREG(FS, fs); | 160 | GETREG(FS, fs); |
161 | GETREG(ES, es); | 161 | GETREG(ES, es); |
162 | GETREG(DS, ds); | 162 | GETREG(DS, ds); |
163 | GETREG(EDI, di); | 163 | GETREG(DI, di); |
164 | GETREG(ESI, si); | 164 | GETREG(SI, si); |
165 | GETREG(EBP, bp); | 165 | GETREG(BP, bp); |
166 | GETREG(SP, sp); | 166 | GETREG(SP, sp); |
167 | GETREG(EBX, bx); | 167 | GETREG(BX, bx); |
168 | GETREG(EDX, dx); | 168 | GETREG(DX, dx); |
169 | GETREG(ECX, cx); | 169 | GETREG(CX, cx); |
170 | GETREG(EAX, ax); | 170 | GETREG(AX, ax); |
171 | GETREG(IP, ip); | 171 | GETREG(IP, ip); |
172 | GETREG(CS, cs); | 172 | GETREG(CS, cs); |
173 | GETREG(EFLAGS, flags); | 173 | GETREG(EFLAGS, flags); |
diff --git a/arch/x86/um/signal_64.c b/arch/x86/um/signal_64.c index 255b2ca0ce67..4e5b9b07a8c7 100644 --- a/arch/x86/um/signal_64.c +++ b/arch/x86/um/signal_64.c | |||
@@ -35,13 +35,13 @@ static int copy_sc_from_user(struct pt_regs *regs, | |||
35 | GETREG(R13, r13); | 35 | GETREG(R13, r13); |
36 | GETREG(R14, r14); | 36 | GETREG(R14, r14); |
37 | GETREG(R15, r15); | 37 | GETREG(R15, r15); |
38 | GETREG(RDI, di); | 38 | GETREG(DI, di); |
39 | GETREG(RSI, si); | 39 | GETREG(SI, si); |
40 | GETREG(RBP, bp); | 40 | GETREG(BP, bp); |
41 | GETREG(RBX, bx); | 41 | GETREG(BX, bx); |
42 | GETREG(RDX, dx); | 42 | GETREG(DX, dx); |
43 | GETREG(RAX, ax); | 43 | GETREG(AX, ax); |
44 | GETREG(RCX, cx); | 44 | GETREG(CX, cx); |
45 | GETREG(SP, sp); | 45 | GETREG(SP, sp); |
46 | GETREG(IP, ip); | 46 | GETREG(IP, ip); |
47 | GETREG(EFLAGS, flags); | 47 | GETREG(EFLAGS, flags); |
@@ -78,18 +78,18 @@ static int copy_sc_to_user(struct sigcontext __user *to, | |||
78 | 78 | ||
79 | #define PUTREG(regno, regname) sc.regname = regs->regs.gp[HOST_##regno] | 79 | #define PUTREG(regno, regname) sc.regname = regs->regs.gp[HOST_##regno] |
80 | 80 | ||
81 | PUTREG(RDI, di); | 81 | PUTREG(DI, di); |
82 | PUTREG(RSI, si); | 82 | PUTREG(SI, si); |
83 | PUTREG(RBP, bp); | 83 | PUTREG(BP, bp); |
84 | /* | 84 | /* |
85 | * Must use original RSP, which is passed in, rather than what's in | 85 | * Must use original RSP, which is passed in, rather than what's in |
86 | * signal frame. | 86 | * signal frame. |
87 | */ | 87 | */ |
88 | sc.sp = sp; | 88 | sc.sp = sp; |
89 | PUTREG(RBX, bx); | 89 | PUTREG(BX, bx); |
90 | PUTREG(RDX, dx); | 90 | PUTREG(DX, dx); |
91 | PUTREG(RCX, cx); | 91 | PUTREG(CX, cx); |
92 | PUTREG(RAX, ax); | 92 | PUTREG(AX, ax); |
93 | PUTREG(R8, r8); | 93 | PUTREG(R8, r8); |
94 | PUTREG(R9, r9); | 94 | PUTREG(R9, r9); |
95 | PUTREG(R10, r10); | 95 | PUTREG(R10, r10); |
diff --git a/arch/x86/um/user-offsets.c b/arch/x86/um/user-offsets.c index 3c19c48a1d48..88d125516ee4 100644 --- a/arch/x86/um/user-offsets.c +++ b/arch/x86/um/user-offsets.c | |||
@@ -23,13 +23,13 @@ void foo(void) | |||
23 | DEFINE(HOST_IP, EIP); | 23 | DEFINE(HOST_IP, EIP); |
24 | DEFINE(HOST_SP, UESP); | 24 | DEFINE(HOST_SP, UESP); |
25 | DEFINE(HOST_EFLAGS, EFL); | 25 | DEFINE(HOST_EFLAGS, EFL); |
26 | DEFINE(HOST_EAX, EAX); | 26 | DEFINE(HOST_AX, EAX); |
27 | DEFINE(HOST_EBX, EBX); | 27 | DEFINE(HOST_BX, EBX); |
28 | DEFINE(HOST_ECX, ECX); | 28 | DEFINE(HOST_CX, ECX); |
29 | DEFINE(HOST_EDX, EDX); | 29 | DEFINE(HOST_DX, EDX); |
30 | DEFINE(HOST_ESI, ESI); | 30 | DEFINE(HOST_SI, ESI); |
31 | DEFINE(HOST_EDI, EDI); | 31 | DEFINE(HOST_DI, EDI); |
32 | DEFINE(HOST_EBP, EBP); | 32 | DEFINE(HOST_BP, EBP); |
33 | DEFINE(HOST_CS, CS); | 33 | DEFINE(HOST_CS, CS); |
34 | DEFINE(HOST_SS, SS); | 34 | DEFINE(HOST_SS, SS); |
35 | DEFINE(HOST_DS, DS); | 35 | DEFINE(HOST_DS, DS); |
@@ -38,13 +38,13 @@ void foo(void) | |||
38 | DEFINE(HOST_GS, GS); | 38 | DEFINE(HOST_GS, GS); |
39 | #else | 39 | #else |
40 | DEFINE(HOST_FP_SIZE, sizeof(struct _fpstate) / sizeof(unsigned long)); | 40 | DEFINE(HOST_FP_SIZE, sizeof(struct _fpstate) / sizeof(unsigned long)); |
41 | DEFINE_LONGS(HOST_RBX, RBX); | 41 | DEFINE_LONGS(HOST_BX, RBX); |
42 | DEFINE_LONGS(HOST_RCX, RCX); | 42 | DEFINE_LONGS(HOST_CX, RCX); |
43 | DEFINE_LONGS(HOST_RDI, RDI); | 43 | DEFINE_LONGS(HOST_DI, RDI); |
44 | DEFINE_LONGS(HOST_RSI, RSI); | 44 | DEFINE_LONGS(HOST_SI, RSI); |
45 | DEFINE_LONGS(HOST_RDX, RDX); | 45 | DEFINE_LONGS(HOST_DX, RDX); |
46 | DEFINE_LONGS(HOST_RBP, RBP); | 46 | DEFINE_LONGS(HOST_BP, RBP); |
47 | DEFINE_LONGS(HOST_RAX, RAX); | 47 | DEFINE_LONGS(HOST_AX, RAX); |
48 | DEFINE_LONGS(HOST_R8, R8); | 48 | DEFINE_LONGS(HOST_R8, R8); |
49 | DEFINE_LONGS(HOST_R9, R9); | 49 | DEFINE_LONGS(HOST_R9, R9); |
50 | DEFINE_LONGS(HOST_R10, R10); | 50 | DEFINE_LONGS(HOST_R10, R10); |