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>
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
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
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
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
#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) \