]> err.no Git - linux-2.6/commitdiff
x86: clobber rbx in putuser_64.S.
authorGlauber Costa <gcosta@redhat.com>
Tue, 24 Jun 2008 18:03:40 +0000 (15:03 -0300)
committerIngo Molnar <mingo@elte.hu>
Wed, 9 Jul 2008 07:14:08 +0000 (09:14 +0200)
Instead of clobbering r8, clobber rbx, which is the i386 way.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/lib/putuser_64.S
include/asm-x86/uaccess_64.h

index 940796fa0d9821e5e8e7b138934e7204775966c6..07028851064c0aacc214128b50fc6bbf329a279d 100644 (file)
@@ -18,7 +18,7 @@
  *
  * Outputs:    %rax is error code (0 or -EFAULT)
  *
- * %r8 is destroyed.
+ * %rbx is destroyed.
  *
  * These functions should not modify any other registers,
  * as they get called from within inline assembly.
@@ -34,8 +34,8 @@
        .text
 ENTRY(__put_user_1)
        CFI_STARTPROC
-       GET_THREAD_INFO(%r8)
-       cmpq TI_addr_limit(%r8),%rcx
+       GET_THREAD_INFO(%rbx)
+       cmpq TI_addr_limit(%rbx),%rcx
        jae bad_put_user
 1:     movb %dl,(%rcx)
        xorl %eax,%eax
@@ -45,10 +45,10 @@ ENDPROC(__put_user_1)
 
 ENTRY(__put_user_2)
        CFI_STARTPROC
-       GET_THREAD_INFO(%r8)
+       GET_THREAD_INFO(%rbx)
        addq $1,%rcx
        jc 20f
-       cmpq TI_addr_limit(%r8),%rcx
+       cmpq TI_addr_limit(%rbx),%rcx
        jae 20f
        decq %rcx
 2:     movw %dx,(%rcx)
@@ -61,10 +61,10 @@ ENDPROC(__put_user_2)
 
 ENTRY(__put_user_4)
        CFI_STARTPROC
-       GET_THREAD_INFO(%r8)
+       GET_THREAD_INFO(%rbx)
        addq $3,%rcx
        jc 30f
-       cmpq TI_addr_limit(%r8),%rcx
+       cmpq TI_addr_limit(%rbx),%rcx
        jae 30f
        subq $3,%rcx
 3:     movl %edx,(%rcx)
@@ -77,10 +77,10 @@ ENDPROC(__put_user_4)
 
 ENTRY(__put_user_8)
        CFI_STARTPROC
-       GET_THREAD_INFO(%r8)
+       GET_THREAD_INFO(%rbx)
        addq $7,%rcx
        jc 40f
-       cmpq TI_addr_limit(%r8),%rcx
+       cmpq TI_addr_limit(%rbx),%rcx
        jae 40f
        subq $7,%rcx
 4:     movq %rdx,(%rcx)
index a2d49078e19cad6a5d0a1997583351833b9947ec..21fda9ebee1396becd6506a98e64c532539b6f2d 100644 (file)
@@ -131,7 +131,7 @@ extern void __put_user_bad(void);
        asm volatile("call __put_user_" #size                           \
                     :"=a" (ret)                                        \
                     :"c" (ptr),"d" (x)                                 \
-                    :"r8")
+                    :"ebx")
 
 #define put_user(x, ptr)                                               \
        __put_user_check((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr)))