1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18#include <linux/linkage.h>
19#include <asm/errno.h>
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 .global __copy_tofrom_user
36__copy_tofrom_user:
37 l.addi r1,r1,-12
38 l.sw 0(r1),r6
39 l.sw 4(r1),r4
40 l.sw 8(r1),r3
41
42 l.addi r11,r5,0
432: l.sfeq r11,r0
44 l.bf 1f
45 l.addi r11,r11,-1
468: l.lbz r6,0(r4)
479: l.sb 0(r3),r6
48 l.addi r3,r3,1
49 l.j 2b
50 l.addi r4,r4,1
511:
52 l.addi r11,r11,1
53
54 l.lwz r6,0(r1)
55 l.lwz r4,4(r1)
56 l.lwz r3,8(r1)
57 l.jr r9
58 l.addi r1,r1,12
59
60 .section .fixup, "ax"
6199:
62 l.j 1b
63 l.nop
64 .previous
65
66 .section __ex_table, "a"
67 .long 8b, 99b
68 .long 9b, 99b
69 .previous
70
71
72
73
74
75
76 .global __clear_user
77__clear_user:
78 l.addi r1,r1,-8
79 l.sw 0(r1),r4
80 l.sw 4(r1),r3
81
822: l.sfeq r4,r0
83 l.bf 1f
84 l.addi r4,r4,-1
859: l.sb 0(r3),r0
86 l.j 2b
87 l.addi r3,r3,1
88
891:
90 l.addi r11,r4,1
91
92 l.lwz r4,0(r1)
93 l.lwz r3,4(r1)
94 l.jr r9
95 l.addi r1,r1,8
96
97 .section .fixup, "ax"
9899:
99 l.j 1b
100 l.nop
101 .previous
102
103 .section __ex_table, "a"
104 .long 9b, 99b
105 .previous
106