Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100059
b: refs/heads/master
c: 766ed42
h: refs/heads/master
i:
  100057: c1faab4
  100055: f41fb6a
v: v3
  • Loading branch information
Glauber Costa authored and Ingo Molnar committed Jul 9, 2008
1 parent 1dd0286 commit 8898b03
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 19 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: 663aa96df32af9c4141ef3179282f95c7537643a
refs/heads/master: 766ed4282114eab616741107745b0dd11075e496
32 changes: 14 additions & 18 deletions trunk/arch/x86/lib/putuser_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,62 +31,58 @@
#include <asm/asm-offsets.h>
#include <asm/thread_info.h>

#define ENTER CFI_STARTPROC ; \
GET_THREAD_INFO(%rbx)
#define EXIT ret ; \
CFI_ENDPROC

.text
ENTRY(__put_user_1)
CFI_STARTPROC
GET_THREAD_INFO(%rbx)
ENTER
cmpq TI_addr_limit(%rbx),%rcx
jae bad_put_user
1: movb %al,(%rcx)
xorl %eax,%eax
ret
CFI_ENDPROC
EXIT
ENDPROC(__put_user_1)

ENTRY(__put_user_2)
CFI_STARTPROC
GET_THREAD_INFO(%rbx)
ENTER
mov TI_addr_limit(%rbx),%rbx
sub $1, %rbx
cmpq %rbx ,%rcx
jae bad_put_user
2: movw %ax,(%rcx)
xorl %eax,%eax
ret
CFI_ENDPROC
EXIT
ENDPROC(__put_user_2)

ENTRY(__put_user_4)
CFI_STARTPROC
GET_THREAD_INFO(%rbx)
ENTER
mov TI_addr_limit(%rbx),%rbx
sub $3, %rbx
cmp %rbx, %rcx
jae bad_put_user
3: movl %eax,(%rcx)
xorl %eax,%eax
ret
CFI_ENDPROC
EXIT
ENDPROC(__put_user_4)

ENTRY(__put_user_8)
CFI_STARTPROC
GET_THREAD_INFO(%rbx)
ENTER
mov TI_addr_limit(%rbx),%rbx
sub $7, %rbx
cmp %rbx, %rcx
jae bad_put_user
4: movq %rax,(%rcx)
xorl %eax,%eax
ret
CFI_ENDPROC
EXIT
ENDPROC(__put_user_8)

bad_put_user:
CFI_STARTPROC
movq $(-EFAULT),%rax
ret
CFI_ENDPROC
EXIT
END(bad_put_user)

.section __ex_table,"a"
Expand Down

0 comments on commit 8898b03

Please sign in to comment.