diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/m32r/lib/putuser.S |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'arch/m32r/lib/putuser.S')
-rw-r--r-- | arch/m32r/lib/putuser.S | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/arch/m32r/lib/putuser.S b/arch/m32r/lib/putuser.S new file mode 100644 index 000000000000..218154cc3890 --- /dev/null +++ b/arch/m32r/lib/putuser.S | |||
@@ -0,0 +1,84 @@ | |||
1 | /* | ||
2 | * __put_user functions. | ||
3 | * | ||
4 | * (C) Copyright 1998 Linus Torvalds | ||
5 | * (C) Copyright 2001 Hirokazu Takata | ||
6 | * | ||
7 | * These functions have a non-standard call interface | ||
8 | * to make them more efficient. | ||
9 | */ | ||
10 | |||
11 | #include <linux/config.h> | ||
12 | |||
13 | /* | ||
14 | * __put_user_X | ||
15 | * | ||
16 | * Inputs: r0 contains the address | ||
17 | * r1 contains the value | ||
18 | * | ||
19 | * Outputs: r0 is error code (0 or -EFAULT) | ||
20 | * r1 is corrupted (will contain "current_task"). | ||
21 | * | ||
22 | * These functions should not modify any other registers, | ||
23 | * as they get called from within inline assembly. | ||
24 | */ | ||
25 | |||
26 | #ifdef CONFIG_ISA_DUAL_ISSUE | ||
27 | |||
28 | .text | ||
29 | .balign 4 | ||
30 | .globl __put_user_1 | ||
31 | __put_user_1: | ||
32 | 1: stb r1, @r0 || ldi r0, #0 | ||
33 | jmp r14 | ||
34 | |||
35 | .balign 4 | ||
36 | .globl __put_user_2 | ||
37 | __put_user_2: | ||
38 | 2: sth r1, @r0 || ldi r0, #0 | ||
39 | jmp r14 | ||
40 | |||
41 | .balign 4 | ||
42 | .globl __put_user_4 | ||
43 | __put_user_4: | ||
44 | 3: st r1, @r0 || ldi r0, #0 | ||
45 | jmp r14 | ||
46 | |||
47 | bad_put_user: | ||
48 | ldi r0, #-14 || jmp r14 | ||
49 | |||
50 | #else /* not CONFIG_ISA_DUAL_ISSUE */ | ||
51 | |||
52 | .text | ||
53 | .balign 4 | ||
54 | .globl __put_user_1 | ||
55 | __put_user_1: | ||
56 | 1: stb r1, @r0 | ||
57 | ldi r0, #0 | ||
58 | jmp r14 | ||
59 | |||
60 | .balign 4 | ||
61 | .globl __put_user_2 | ||
62 | __put_user_2: | ||
63 | 2: sth r1, @r0 | ||
64 | ldi r0, #0 | ||
65 | jmp r14 | ||
66 | |||
67 | .balign 4 | ||
68 | .globl __put_user_4 | ||
69 | __put_user_4: | ||
70 | 3: st r1, @r0 | ||
71 | ldi r0, #0 | ||
72 | jmp r14 | ||
73 | |||
74 | bad_put_user: | ||
75 | ldi r0, #-14 | ||
76 | jmp r14 | ||
77 | |||
78 | #endif /* not CONFIG_ISA_DUAL_ISSUE */ | ||
79 | |||
80 | .section __ex_table,"a" | ||
81 | .long 1b,bad_put_user | ||
82 | .long 2b,bad_put_user | ||
83 | .long 3b,bad_put_user | ||
84 | .previous | ||