um: unify KSTK_...
authorAl Viro <viro@ftp.linux.org.uk>
Thu, 18 Aug 2011 19:12:09 +0000 (20:12 +0100)
committerRichard Weinberger <richard@nod.at>
Wed, 2 Nov 2011 13:15:26 +0000 (14:15 +0100)
... and switch get_thread_register() to HOST_... for register numbers

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/x86/um/asm/processor.h
arch/x86/um/asm/processor_32.h
arch/x86/um/asm/processor_64.h
arch/x86/um/os-Linux/registers.c

index f34c4b2d09f35909c54df1d6c145b63a1778f50d..118c143a9cb49ca03ced909f1a0744902889d701 100644 (file)
 # include "processor_64.h"
 #endif
 
+#define KSTK_EIP(tsk) KSTK_REG(tsk, HOST_IP)
+#define KSTK_ESP(tsk) KSTK_REG(tsk, HOST_IP)
+#define KSTK_EBP(tsk) KSTK_REG(tsk, HOST_BP)
+
 #define ARCH_IS_STACKGROW(address) \
        (address + 65536 + 32 * sizeof(unsigned long) >= UPT_SP(&current->thread.regs.regs))
 
index c4078b581df11a04112f54ca1c287e9e97c08cba..018f732704ddb25a5d26bf9a58688083ac636a27 100644 (file)
@@ -63,8 +63,4 @@ static inline void rep_nop(void)
 #define current_text_addr() \
        ({ void *pc; __asm__("movl $1f,%0\n1:":"=g" (pc)); pc; })
 
-#define KSTK_EIP(tsk) KSTK_REG(tsk, EIP)
-#define KSTK_ESP(tsk) KSTK_REG(tsk, UESP)
-#define KSTK_EBP(tsk) KSTK_REG(tsk, EBP)
-
 #endif
index 0186c61d0a7edb8c081508558ffb5c56ac3a29be..61de92d916c332e41eb1f1a6775bb8e571593dfa 100644 (file)
@@ -42,7 +42,4 @@ static inline void arch_copy_thread(struct arch_thread *from,
 #define current_text_addr() \
        ({ void *pc; __asm__("movq $1f,%0\n1:":"=g" (pc)); pc; })
 
-#define KSTK_EIP(tsk) KSTK_REG(tsk, RIP)
-#define KSTK_ESP(tsk) KSTK_REG(tsk, RSP)
-
 #endif
index 3a9b6247bbbc5aa93f4bff7bc792d264d7c79e82..fa2e5a669e419fc238add06bbf63fcb94555b89b 100644 (file)
@@ -89,18 +89,18 @@ unsigned long get_thread_reg(int reg, jmp_buf *buf)
 {
        switch (reg) {
 #ifdef __i386__
-       case EIP:
+       case HOST_IP:
                return buf[0]->__eip;
-       case UESP:
+       case HOST_SP:
                return buf[0]->__esp;
-       case EBP:
+       case HOST_BP:
                return buf[0]->__ebp;
 #else
-       case RIP:
+       case HOST_IP:
                return buf[0]->__rip;
-       case RSP:
+       case HOST_SP:
                return buf[0]->__rsp;
-       case RBP:
+       case HOST_BP:
                return buf[0]->__rbp;
 #endif
        default: