]> err.no Git - linux-2.6/commitdiff
x86: pass argument to putuser_64 functions in ax register.
authorGlauber Costa <gcosta@redhat.com>
Tue, 24 Jun 2008 19:44:39 +0000 (16:44 -0300)
committerIngo Molnar <mingo@elte.hu>
Wed, 9 Jul 2008 07:14:08 +0000 (09:14 +0200)
This is consistent with i386 usage.

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 07028851064c0aacc214128b50fc6bbf329a279d..ce5fcd5d8c16c425c4b2c219afddeee9efd05034 100644 (file)
@@ -37,7 +37,7 @@ ENTRY(__put_user_1)
        GET_THREAD_INFO(%rbx)
        cmpq TI_addr_limit(%rbx),%rcx
        jae bad_put_user
-1:     movb %dl,(%rcx)
+1:     movb %al,(%rcx)
        xorl %eax,%eax
        ret
        CFI_ENDPROC
@@ -51,7 +51,7 @@ ENTRY(__put_user_2)
        cmpq TI_addr_limit(%rbx),%rcx
        jae 20f
        decq %rcx
-2:     movw %dx,(%rcx)
+2:     movw %ax,(%rcx)
        xorl %eax,%eax
        ret
 20:    decq %rcx
@@ -67,7 +67,7 @@ ENTRY(__put_user_4)
        cmpq TI_addr_limit(%rbx),%rcx
        jae 30f
        subq $3,%rcx
-3:     movl %edx,(%rcx)
+3:     movl %eax,(%rcx)
        xorl %eax,%eax
        ret
 30:    subq $3,%rcx
@@ -83,7 +83,7 @@ ENTRY(__put_user_8)
        cmpq TI_addr_limit(%rbx),%rcx
        jae 40f
        subq $7,%rcx
-4:     movq %rdx,(%rcx)
+4:     movq %rax,(%rcx)
        xorl %eax,%eax
        ret
 40:    subq $7,%rcx
index 21fda9ebee1396becd6506a98e64c532539b6f2d..f822a36cc1c036f8e20213364c696ec5a647c412 100644 (file)
@@ -130,7 +130,7 @@ extern void __put_user_bad(void);
 #define __put_user_x(size, ret, x, ptr)                                        \
        asm volatile("call __put_user_" #size                           \
                     :"=a" (ret)                                        \
-                    :"c" (ptr),"d" (x)                                 \
+                    :"c" (ptr),"a" (x)                                 \
                     :"ebx")
 
 #define put_user(x, ptr)                                               \