aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/lib/putuser_32.S
diff options
context:
space:
mode:
authorGlauber Costa <gcosta@redhat.com>2008-06-24 16:40:14 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-09 03:14:13 -0400
commit5cbbc3b1eb37bdc72eefd2de03b39f5e784400c2 (patch)
treeb4e340963f7a4e2d55ff00a14b3d4bca912c85ab /arch/x86/lib/putuser_32.S
parent2528de431ddb200653d1dc6ca90074bad9520f09 (diff)
x86: merge putuser asm functions.
putuser_32.S and putuser_64.S are merged into putuser.S. 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>
Diffstat (limited to 'arch/x86/lib/putuser_32.S')
-rw-r--r--arch/x86/lib/putuser_32.S90
1 files changed, 0 insertions, 90 deletions
diff --git a/arch/x86/lib/putuser_32.S b/arch/x86/lib/putuser_32.S
deleted file mode 100644
index e7eda34feb34..000000000000
--- a/arch/x86/lib/putuser_32.S
+++ /dev/null
@@ -1,90 +0,0 @@
1/*
2 * __put_user functions.
3 *
4 * (C) Copyright 2005 Linus Torvalds
5 *
6 * These functions have a non-standard call interface
7 * to make them more efficient, especially as they
8 * return an error value in addition to the "real"
9 * return value.
10 */
11#include <linux/linkage.h>
12#include <asm/dwarf2.h>
13#include <asm/thread_info.h>
14#include <asm/asm.h>
15
16
17/*
18 * __put_user_X
19 *
20 * Inputs: %eax[:%edx] contains the data
21 * %ecx contains the address
22 *
23 * Outputs: %eax is error code (0 or -EFAULT)
24 *
25 * These functions should not modify any other registers,
26 * as they get called from within inline assembly.
27 */
28
29#define ENTER CFI_STARTPROC ; \
30 GET_THREAD_INFO(%_ASM_BX)
31#define EXIT ret ; \
32 CFI_ENDPROC
33
34.text
35ENTRY(__put_user_1)
36 ENTER
37 cmp TI_addr_limit(%_ASM_BX),%_ASM_CX
38 jae bad_put_user
391: movb %al,(%_ASM_CX)
40 xor %eax,%eax
41 EXIT
42ENDPROC(__put_user_1)
43
44ENTRY(__put_user_2)
45 ENTER
46 mov TI_addr_limit(%_ASM_BX),%_ASM_BX
47 sub $1,%_ASM_BX
48 cmp %_ASM_BX,%_ASM_CX
49 jae bad_put_user
502: movw %ax,(%_ASM_CX)
51 xor %eax,%eax
52 EXIT
53ENDPROC(__put_user_2)
54
55ENTRY(__put_user_4)
56 ENTER
57 mov TI_addr_limit(%_ASM_BX),%_ASM_BX
58 sub $3,%_ASM_BX
59 cmp %_ASM_BX,%_ASM_CX
60 jae bad_put_user
613: movl %eax,(%_ASM_CX)
62 xor %eax,%eax
63 EXIT
64ENDPROC(__put_user_4)
65
66ENTRY(__put_user_8)
67 ENTER
68 mov TI_addr_limit(%_ASM_BX),%_ASM_BX
69 sub $7,%_ASM_BX
70 cmp %_ASM_BX,%_ASM_CX
71 jae bad_put_user
724: movl %_ASM_AX,(%_ASM_CX)
735: movl %edx,4(%_ASM_CX)
74 xor %eax,%eax
75 EXIT
76ENDPROC(__put_user_8)
77
78bad_put_user:
79 CFI_STARTPROC
80 movl $-14,%eax
81 EXIT
82END(bad_put_user)
83
84.section __ex_table,"a"
85 _ASM_PTR 1b,bad_put_user
86 _ASM_PTR 2b,bad_put_user
87 _ASM_PTR 3b,bad_put_user
88 _ASM_PTR 4b,bad_put_user
89 _ASM_PTR 5b,bad_put_user
90.previous