Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100056
b: refs/heads/master
c: 770546b
h: refs/heads/master
v: v3
  • Loading branch information
Glauber Costa authored and Ingo Molnar committed Jul 9, 2008
1 parent f41fb6a commit d1f5113
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 70706e432ee5618abf59381101d8dea7b8d97a7d
refs/heads/master: 770546b99fb99e71a3aa4181980d42664f9c18bd
18 changes: 9 additions & 9 deletions trunk/arch/x86/lib/putuser_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/asm-x86/uaccess_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit d1f5113

Please sign in to comment.