]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
um: merge HOST_... of registers common on i386 and amd64
authorAl Viro <viro@ftp.linux.org.uk>
Thu, 18 Aug 2011 19:10:09 +0000 (20:10 +0100)
committerRichard Weinberger <richard@nod.at>
Wed, 2 Nov 2011 13:15:18 +0000 (14:15 +0100)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/x86/um/ptrace_32.c
arch/x86/um/ptrace_64.c
arch/x86/um/shared/sysdep/ptrace_32.h
arch/x86/um/shared/sysdep/ptrace_64.h
arch/x86/um/signal_32.c
arch/x86/um/signal_64.c
arch/x86/um/user-offsets.c

index a174fde2531c1b3203a8eb3741303de2a368f04b..3b949daa095cffa22895ea0ebdfbe3e58a523d32 100644 (file)
@@ -51,13 +51,13 @@ int is_syscall(unsigned long addr)
 #define FLAG_MASK 0x00044dd5
 
 static const int reg_offsets[] = {
-       [EBX] = HOST_EBX,
-       [ECX] = HOST_ECX,
-       [EDX] = HOST_EDX,
-       [ESI] = HOST_ESI,
-       [EDI] = HOST_EDI,
-       [EBP] = HOST_EBP,
-       [EAX] = HOST_EAX,
+       [EBX] = HOST_BX,
+       [ECX] = HOST_CX,
+       [EDX] = HOST_DX,
+       [ESI] = HOST_SI,
+       [EDI] = HOST_DI,
+       [EBP] = HOST_BP,
+       [EAX] = HOST_AX,
        [DS] = HOST_DS,
        [ES] = HOST_ES,
        [FS] = HOST_FS,
index 44e68e0c0d10bf8719fa00d805d948905363ea89..6e6343e73296c9b2bf1335b52521705c67e524d7 100644 (file)
@@ -30,13 +30,13 @@ static const int reg_offsets[] =
        [R15 >> 3] = HOST_R15,
        [RIP >> 3] = HOST_IP,
        [RSP >> 3] = HOST_SP,
-       [RAX >> 3] = HOST_RAX,
-       [RBX >> 3] = HOST_RBX,
-       [RCX >> 3] = HOST_RCX,
-       [RDX >> 3] = HOST_RDX,
-       [RSI >> 3] = HOST_RSI,
-       [RDI >> 3] = HOST_RDI,
-       [RBP >> 3] = HOST_RBP,
+       [RAX >> 3] = HOST_AX,
+       [RBX >> 3] = HOST_BX,
+       [RCX >> 3] = HOST_CX,
+       [RDX >> 3] = HOST_DX,
+       [RSI >> 3] = HOST_SI,
+       [RDI >> 3] = HOST_DI,
+       [RBP >> 3] = HOST_BP,
        [CS >> 3] = HOST_CS,
        [SS >> 3] = HOST_SS,
        [FS_BASE >> 3] = HOST_FS_BASE,
index bad747a239cda03da04ff9efa8f7d812508a7253..befd1df32ed0ac65fe8ab829355d71191666e393 100644 (file)
@@ -27,13 +27,13 @@ extern int sysemu_supported;
 #define REGS_IP(r) ((r)[HOST_IP])
 #define REGS_SP(r) ((r)[HOST_SP])
 #define REGS_EFLAGS(r) ((r)[HOST_EFLAGS])
-#define REGS_EAX(r) ((r)[HOST_EAX])
-#define REGS_EBX(r) ((r)[HOST_EBX])
-#define REGS_ECX(r) ((r)[HOST_ECX])
-#define REGS_EDX(r) ((r)[HOST_EDX])
-#define REGS_ESI(r) ((r)[HOST_ESI])
-#define REGS_EDI(r) ((r)[HOST_EDI])
-#define REGS_EBP(r) ((r)[HOST_EBP])
+#define REGS_EAX(r) ((r)[HOST_AX])
+#define REGS_EBX(r) ((r)[HOST_BX])
+#define REGS_ECX(r) ((r)[HOST_CX])
+#define REGS_EDX(r) ((r)[HOST_DX])
+#define REGS_ESI(r) ((r)[HOST_SI])
+#define REGS_EDI(r) ((r)[HOST_DI])
+#define REGS_EBP(r) ((r)[HOST_BP])
 #define REGS_CS(r) ((r)[HOST_CS])
 #define REGS_SS(r) ((r)[HOST_SS])
 #define REGS_DS(r) ((r)[HOST_DS])
index a360fe25431a5b6913b444372d2884534ea08a47..430dedc2505e84121274defc7389ce63cf53b36d 100644 (file)
 #define REGS_IP(r) ((r)[HOST_IP])
 #define REGS_SP(r) ((r)[HOST_SP])
 
-#define REGS_RBX(r) ((r)[HOST_RBX])
-#define REGS_RCX(r) ((r)[HOST_RCX])
-#define REGS_RDX(r) ((r)[HOST_RDX])
-#define REGS_RSI(r) ((r)[HOST_RSI])
-#define REGS_RDI(r) ((r)[HOST_RDI])
-#define REGS_RBP(r) ((r)[HOST_RBP])
-#define REGS_RAX(r) ((r)[HOST_RAX])
+#define REGS_RBX(r) ((r)[HOST_BX])
+#define REGS_RCX(r) ((r)[HOST_CX])
+#define REGS_RDX(r) ((r)[HOST_DX])
+#define REGS_RSI(r) ((r)[HOST_SI])
+#define REGS_RDI(r) ((r)[HOST_DI])
+#define REGS_RBP(r) ((r)[HOST_BP])
+#define REGS_RAX(r) ((r)[HOST_AX])
 #define REGS_R8(r) ((r)[HOST_R8])
 #define REGS_R9(r) ((r)[HOST_R9])
 #define REGS_R10(r) ((r)[HOST_R10])
index bcbfb0d6481308516a6ea5dbbe41323e4bc86ed0..2eebdc05be035203be3384109c21b52e9fd0eb50 100644 (file)
@@ -160,14 +160,14 @@ static int copy_sc_from_user(struct pt_regs *regs,
        GETREG(FS, fs);
        GETREG(ES, es);
        GETREG(DS, ds);
-       GETREG(EDI, di);
-       GETREG(ESI, si);
-       GETREG(EBP, bp);
+       GETREG(DI, di);
+       GETREG(SI, si);
+       GETREG(BP, bp);
        GETREG(SP, sp);
-       GETREG(EBX, bx);
-       GETREG(EDX, dx);
-       GETREG(ECX, cx);
-       GETREG(EAX, ax);
+       GETREG(BX, bx);
+       GETREG(DX, dx);
+       GETREG(CX, cx);
+       GETREG(AX, ax);
        GETREG(IP, ip);
        GETREG(CS, cs);
        GETREG(EFLAGS, flags);
index 255b2ca0ce67c2623e08627fd3bac63df22d7eb8..4e5b9b07a8c7658858070431a2d4526852f21423 100644 (file)
@@ -35,13 +35,13 @@ static int copy_sc_from_user(struct pt_regs *regs,
        GETREG(R13, r13);
        GETREG(R14, r14);
        GETREG(R15, r15);
-       GETREG(RDI, di);
-       GETREG(RSI, si);
-       GETREG(RBP, bp);
-       GETREG(RBX, bx);
-       GETREG(RDX, dx);
-       GETREG(RAX, ax);
-       GETREG(RCX, cx);
+       GETREG(DI, di);
+       GETREG(SI, si);
+       GETREG(BP, bp);
+       GETREG(BX, bx);
+       GETREG(DX, dx);
+       GETREG(AX, ax);
+       GETREG(CX, cx);
        GETREG(SP, sp);
        GETREG(IP, ip);
        GETREG(EFLAGS, flags);
@@ -78,18 +78,18 @@ static int copy_sc_to_user(struct sigcontext __user *to,
 
 #define PUTREG(regno, regname) sc.regname = regs->regs.gp[HOST_##regno]
 
-       PUTREG(RDI, di);
-       PUTREG(RSI, si);
-       PUTREG(RBP, bp);
+       PUTREG(DI, di);
+       PUTREG(SI, si);
+       PUTREG(BP, bp);
        /*
         * Must use original RSP, which is passed in, rather than what's in
         * signal frame.
         */
        sc.sp = sp;
-       PUTREG(RBX, bx);
-       PUTREG(RDX, dx);
-       PUTREG(RCX, cx);
-       PUTREG(RAX, ax);
+       PUTREG(BX, bx);
+       PUTREG(DX, dx);
+       PUTREG(CX, cx);
+       PUTREG(AX, ax);
        PUTREG(R8, r8);
        PUTREG(R9, r9);
        PUTREG(R10, r10);
index 3c19c48a1d4869dd348f948da15bcfd273cf54fb..88d125516ee4f108b1ca1e1d0d7a72d49640fb4d 100644 (file)
@@ -23,13 +23,13 @@ void foo(void)
        DEFINE(HOST_IP, EIP);
        DEFINE(HOST_SP, UESP);
        DEFINE(HOST_EFLAGS, EFL);
-       DEFINE(HOST_EAX, EAX);
-       DEFINE(HOST_EBX, EBX);
-       DEFINE(HOST_ECX, ECX);
-       DEFINE(HOST_EDX, EDX);
-       DEFINE(HOST_ESI, ESI);
-       DEFINE(HOST_EDI, EDI);
-       DEFINE(HOST_EBP, EBP);
+       DEFINE(HOST_AX, EAX);
+       DEFINE(HOST_BX, EBX);
+       DEFINE(HOST_CX, ECX);
+       DEFINE(HOST_DX, EDX);
+       DEFINE(HOST_SI, ESI);
+       DEFINE(HOST_DI, EDI);
+       DEFINE(HOST_BP, EBP);
        DEFINE(HOST_CS, CS);
        DEFINE(HOST_SS, SS);
        DEFINE(HOST_DS, DS);
@@ -38,13 +38,13 @@ void foo(void)
        DEFINE(HOST_GS, GS);
 #else
        DEFINE(HOST_FP_SIZE, sizeof(struct _fpstate) / sizeof(unsigned long));
-       DEFINE_LONGS(HOST_RBX, RBX);
-       DEFINE_LONGS(HOST_RCX, RCX);
-       DEFINE_LONGS(HOST_RDI, RDI);
-       DEFINE_LONGS(HOST_RSI, RSI);
-       DEFINE_LONGS(HOST_RDX, RDX);
-       DEFINE_LONGS(HOST_RBP, RBP);
-       DEFINE_LONGS(HOST_RAX, RAX);
+       DEFINE_LONGS(HOST_BX, RBX);
+       DEFINE_LONGS(HOST_CX, RCX);
+       DEFINE_LONGS(HOST_DI, RDI);
+       DEFINE_LONGS(HOST_SI, RSI);
+       DEFINE_LONGS(HOST_DX, RDX);
+       DEFINE_LONGS(HOST_BP, RBP);
+       DEFINE_LONGS(HOST_AX, RAX);
        DEFINE_LONGS(HOST_R8, R8);
        DEFINE_LONGS(HOST_R9, R9);
        DEFINE_LONGS(HOST_R10, R10);