aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/lib/getuser_32.S
diff options
context:
space:
mode:
authorGlauber Costa <gcosta@redhat.com>2008-06-24 10:37:57 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-09 03:14:04 -0400
commit40faf463e62de0b29722910eded7dd26cd8b684b (patch)
treeab7a576aec523d750944c53f6c7f340b4a1a3a3a /arch/x86/lib/getuser_32.S
parentef8c1a2d0e990d0f4f15e1d45eeb262755e3d4c3 (diff)
x86: introduce __ASM_REG macro.
There are situations in which the architecture wants to use the register that represents its word-size, whatever it is. For those, introduce __ASM_REG in asm.h, along with the first users _ASM_AX and _ASM_DX. They have users waiting for it, namely the getuser functions. 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/getuser_32.S')
-rw-r--r--arch/x86/lib/getuser_32.S25
1 files changed, 13 insertions, 12 deletions
diff --git a/arch/x86/lib/getuser_32.S b/arch/x86/lib/getuser_32.S
index 8200fde55f57..2cc3ceee8f91 100644
--- a/arch/x86/lib/getuser_32.S
+++ b/arch/x86/lib/getuser_32.S
@@ -11,6 +11,7 @@
11#include <linux/linkage.h> 11#include <linux/linkage.h>
12#include <asm/dwarf2.h> 12#include <asm/dwarf2.h>
13#include <asm/thread_info.h> 13#include <asm/thread_info.h>
14#include <asm/asm.h>
14 15
15 16
16/* 17/*
@@ -28,10 +29,10 @@
28.text 29.text
29ENTRY(__get_user_1) 30ENTRY(__get_user_1)
30 CFI_STARTPROC 31 CFI_STARTPROC
31 GET_THREAD_INFO(%edx) 32 GET_THREAD_INFO(%_ASM_DX)
32 cmp TI_addr_limit(%edx),%eax 33 cmp TI_addr_limit(%_ASM_DX),%_ASM_AX
33 jae bad_get_user 34 jae bad_get_user
341: movzb (%eax),%edx 351: movzb (%_ASM_AX),%edx
35 xor %eax,%eax 36 xor %eax,%eax
36 ret 37 ret
37 CFI_ENDPROC 38 CFI_ENDPROC
@@ -39,12 +40,12 @@ ENDPROC(__get_user_1)
39 40
40ENTRY(__get_user_2) 41ENTRY(__get_user_2)
41 CFI_STARTPROC 42 CFI_STARTPROC
42 add $1,%eax 43 add $1,%_ASM_AX
43 jc bad_get_user 44 jc bad_get_user
44 GET_THREAD_INFO(%edx) 45 GET_THREAD_INFO(%_ASM_DX)
45 cmp TI_addr_limit(%edx),%eax 46 cmp TI_addr_limit(%_ASM_DX),%_ASM_AX
46 jae bad_get_user 47 jae bad_get_user
472: movzwl -1(%eax),%edx 482: movzwl -1(%_ASM_AX),%edx
48 xor %eax,%eax 49 xor %eax,%eax
49 ret 50 ret
50 CFI_ENDPROC 51 CFI_ENDPROC
@@ -52,12 +53,12 @@ ENDPROC(__get_user_2)
52 53
53ENTRY(__get_user_4) 54ENTRY(__get_user_4)
54 CFI_STARTPROC 55 CFI_STARTPROC
55 add $3,%eax 56 add $3,%_ASM_AX
56 jc bad_get_user 57 jc bad_get_user
57 GET_THREAD_INFO(%edx) 58 GET_THREAD_INFO(%_ASM_DX)
58 cmp TI_addr_limit(%edx),%eax 59 cmp TI_addr_limit(%_ASM_DX),%_ASM_AX
59 jae bad_get_user 60 jae bad_get_user
603: mov -3(%eax),%edx 613: mov -3(%_ASM_AX),%edx
61 xor %eax,%eax 62 xor %eax,%eax
62 ret 63 ret
63 CFI_ENDPROC 64 CFI_ENDPROC
@@ -66,7 +67,7 @@ ENDPROC(__get_user_4)
66bad_get_user: 67bad_get_user:
67 CFI_STARTPROC 68 CFI_STARTPROC
68 xor %edx,%edx 69 xor %edx,%edx
69 mov $-14,%eax 70 mov $-14,%_ASM_AX
70 ret 71 ret
71 CFI_ENDPROC 72 CFI_ENDPROC
72END(bad_get_user) 73END(bad_get_user)