aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/lib/putuser_64.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/lib/putuser_64.S')
-rw-r--r--arch/x86/lib/putuser_64.S94
1 files changed, 0 insertions, 94 deletions
diff --git a/arch/x86/lib/putuser_64.S b/arch/x86/lib/putuser_64.S
deleted file mode 100644
index d496cc8e7308..000000000000
--- a/arch/x86/lib/putuser_64.S
+++ /dev/null
@@ -1,94 +0,0 @@
1/*
2 * __put_user functions.
3 *
4 * (C) Copyright 1998 Linus Torvalds
5 * (C) Copyright 2005 Andi Kleen
6 *
7 * These functions have a non-standard call interface
8 * to make them more efficient, especially as they
9 * return an error value in addition to the "real"
10 * return value.
11 */
12
13/*
14 * __put_user_X
15 *
16 * Inputs: %rcx contains the address
17 * %rdx contains new value
18 *
19 * Outputs: %rax is error code (0 or -EFAULT)
20 *
21 * %rbx is destroyed.
22 *
23 * These functions should not modify any other registers,
24 * as they get called from within inline assembly.
25 */
26
27#include <linux/linkage.h>
28#include <asm/dwarf2.h>
29#include <asm/page.h>
30#include <asm/errno.h>
31#include <asm/asm-offsets.h>
32#include <asm/thread_info.h>
33#include <asm/asm.h>
34
35#define ENTER CFI_STARTPROC ; \
36 GET_THREAD_INFO(%_ASM_BX)
37#define EXIT ret ; \
38 CFI_ENDPROC
39
40 .text
41ENTRY(__put_user_1)
42 ENTER
43 cmp TI_addr_limit(%_ASM_BX),%_ASM_CX
44 jae bad_put_user
451: movb %al,(%_ASM_CX)
46 xor %eax,%eax
47 EXIT
48ENDPROC(__put_user_1)
49
50ENTRY(__put_user_2)
51 ENTER
52 mov TI_addr_limit(%_ASM_BX),%_ASM_BX
53 sub $1, %_ASM_BX
54 cmp %_ASM_BX ,%_ASM_CX
55 jae bad_put_user
562: movw %ax,(%_ASM_CX)
57 xor %eax,%eax
58 EXIT
59ENDPROC(__put_user_2)
60
61ENTRY(__put_user_4)
62 ENTER
63 mov TI_addr_limit(%_ASM_BX),%_ASM_BX
64 sub $3, %_ASM_BX
65 cmp %_ASM_BX, %_ASM_CX
66 jae bad_put_user
673: movl %eax,(%_ASM_CX)
68 xor %eax,%eax
69 EXIT
70ENDPROC(__put_user_4)
71
72ENTRY(__put_user_8)
73 ENTER
74 mov TI_addr_limit(%_ASM_BX),%_ASM_BX
75 sub $7, %_ASM_BX
76 cmp %_ASM_BX, %_ASM_CX
77 jae bad_put_user
784: movq %_ASM_AX,(%_ASM_CX)
79 xor %eax,%eax
80 EXIT
81ENDPROC(__put_user_8)
82
83bad_put_user:
84 CFI_STARTPROC
85 mov $(-EFAULT),%eax
86 EXIT
87END(bad_put_user)
88
89.section __ex_table,"a"
90 _ASM_PTR 1b,bad_put_user
91 _ASM_PTR 2b,bad_put_user
92 _ASM_PTR 3b,bad_put_user
93 _ASM_PTR 4b,bad_put_user
94.previous