aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/lib/getuser_64.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/lib/getuser_64.S')
-rw-r--r--arch/x86/lib/getuser_64.S36
1 files changed, 18 insertions, 18 deletions
diff --git a/arch/x86/lib/getuser_64.S b/arch/x86/lib/getuser_64.S
index 6134752a75fd..63b0e5c1e582 100644
--- a/arch/x86/lib/getuser_64.S
+++ b/arch/x86/lib/getuser_64.S
@@ -13,14 +13,13 @@
13/* 13/*
14 * __get_user_X 14 * __get_user_X
15 * 15 *
16 * Inputs: %rcx contains the address. 16 * Inputs: %rax contains the address.
17 * The register is modified, but all changes are undone 17 * The register is modified, but all changes are undone
18 * before returning because the C code doesn't know about it. 18 * before returning because the C code doesn't know about it.
19 * 19 *
20 * Outputs: %rax is error code (0 or -EFAULT) 20 * Outputs: %rax is error code (0 or -EFAULT)
21 * %rdx contains zero-extended value 21 * %rdx contains zero-extended value
22 * 22 *
23 * %r8 is destroyed.
24 * 23 *
25 * These functions should not modify any other registers, 24 * These functions should not modify any other registers,
26 * as they get called from within inline assembly. 25 * as they get called from within inline assembly.
@@ -32,14 +31,15 @@
32#include <asm/errno.h> 31#include <asm/errno.h>
33#include <asm/asm-offsets.h> 32#include <asm/asm-offsets.h>
34#include <asm/thread_info.h> 33#include <asm/thread_info.h>
34#include <asm/asm.h>
35 35
36 .text 36 .text
37ENTRY(__get_user_1) 37ENTRY(__get_user_1)
38 CFI_STARTPROC 38 CFI_STARTPROC
39 GET_THREAD_INFO(%rdx) 39 GET_THREAD_INFO(%_ASM_DX)
40 cmp TI_addr_limit(%rdx),%rax 40 cmp TI_addr_limit(%_ASM_DX),%_ASM_AX
41 jae bad_get_user 41 jae bad_get_user
421: movzb (%rax),%edx 421: movzb (%_ASM_AX),%edx
43 xor %eax,%eax 43 xor %eax,%eax
44 ret 44 ret
45 CFI_ENDPROC 45 CFI_ENDPROC
@@ -47,12 +47,12 @@ ENDPROC(__get_user_1)
47 47
48ENTRY(__get_user_2) 48ENTRY(__get_user_2)
49 CFI_STARTPROC 49 CFI_STARTPROC
50 add $1,%rax 50 add $1,%_ASM_AX
51 jc bad_get_user 51 jc bad_get_user
52 GET_THREAD_INFO(%rdx) 52 GET_THREAD_INFO(%_ASM_DX)
53 cmp TI_addr_limit(%rdx),%rax 53 cmp TI_addr_limit(%_ASM_DX),%_ASM_AX
54 jae bad_get_user 54 jae bad_get_user
552: movzwl -1(%rax),%edx 552: movzwl -1(%_ASM_AX),%edx
56 xor %eax,%eax 56 xor %eax,%eax
57 ret 57 ret
58 CFI_ENDPROC 58 CFI_ENDPROC
@@ -60,12 +60,12 @@ ENDPROC(__get_user_2)
60 60
61ENTRY(__get_user_4) 61ENTRY(__get_user_4)
62 CFI_STARTPROC 62 CFI_STARTPROC
63 add $3,%rax 63 add $3,%_ASM_AX
64 jc bad_get_user 64 jc bad_get_user
65 GET_THREAD_INFO(%rdx) 65 GET_THREAD_INFO(%_ASM_DX)
66 cmp TI_addr_limit(%rdx),%rax 66 cmp TI_addr_limit(%_ASM_DX),%_ASM_AX
67 jae bad_get_user 67 jae bad_get_user
683: mov -3(%rax),%edx 683: mov -3(%_ASM_AX),%edx
69 xor %eax,%eax 69 xor %eax,%eax
70 ret 70 ret
71 CFI_ENDPROC 71 CFI_ENDPROC
@@ -73,12 +73,12 @@ ENDPROC(__get_user_4)
73 73
74ENTRY(__get_user_8) 74ENTRY(__get_user_8)
75 CFI_STARTPROC 75 CFI_STARTPROC
76 add $7,%rax 76 add $7,%_ASM_AX
77 jc bad_get_user 77 jc bad_get_user
78 GET_THREAD_INFO(%rdx) 78 GET_THREAD_INFO(%_ASM_DX)
79 cmp TI_addr_limit(%rdx),%rax 79 cmp TI_addr_limit(%_ASM_DX),%_ASM_AX
80 jae bad_get_user 80 jae bad_get_user
814: movq -7(%rax),%rdx 814: movq -7(%_ASM_AX),%_ASM_DX
82 xor %eax,%eax 82 xor %eax,%eax
83 ret 83 ret
84 CFI_ENDPROC 84 CFI_ENDPROC
@@ -87,7 +87,7 @@ ENDPROC(__get_user_8)
87bad_get_user: 87bad_get_user:
88 CFI_STARTPROC 88 CFI_STARTPROC
89 xor %edx,%edx 89 xor %edx,%edx
90 mov $(-EFAULT),%rax 90 mov $(-EFAULT),%_ASM_AX
91 ret 91 ret
92 CFI_ENDPROC 92 CFI_ENDPROC
93END(bad_get_user) 93END(bad_get_user)