Lines Matching +full:n +full:- +full:1

1 // SPDX-License-Identifier: GPL-2.0
2 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
8 unsigned long n) in raw_copy_from_user() argument
13 "0: cmpnei %1, 0 \n" in raw_copy_from_user()
14 " bf 7f \n" in raw_copy_from_user()
15 " mov %3, %1 \n" in raw_copy_from_user()
16 " or %3, %2 \n" in raw_copy_from_user()
17 " andi %3, 3 \n" in raw_copy_from_user()
18 " cmpnei %3, 0 \n" in raw_copy_from_user()
19 " bf 1f \n" in raw_copy_from_user()
20 " br 5f \n" in raw_copy_from_user()
21 "1: cmplti %0, 16 \n" in raw_copy_from_user()
22 " bt 3f \n" in raw_copy_from_user()
23 "2: ldw %3, (%2, 0) \n" in raw_copy_from_user()
24 "10: ldw %4, (%2, 4) \n" in raw_copy_from_user()
25 " stw %3, (%1, 0) \n" in raw_copy_from_user()
26 " stw %4, (%1, 4) \n" in raw_copy_from_user()
27 "11: ldw %3, (%2, 8) \n" in raw_copy_from_user()
28 "12: ldw %4, (%2, 12) \n" in raw_copy_from_user()
29 " stw %3, (%1, 8) \n" in raw_copy_from_user()
30 " stw %4, (%1, 12) \n" in raw_copy_from_user()
31 " addi %2, 16 \n" in raw_copy_from_user()
32 " addi %1, 16 \n" in raw_copy_from_user()
33 " subi %0, 16 \n" in raw_copy_from_user()
34 " br 1b \n" in raw_copy_from_user()
35 "3: cmplti %0, 4 \n" in raw_copy_from_user()
36 " bt 5f \n" in raw_copy_from_user()
37 "4: ldw %3, (%2, 0) \n" in raw_copy_from_user()
38 " stw %3, (%1, 0) \n" in raw_copy_from_user()
39 " addi %2, 4 \n" in raw_copy_from_user()
40 " addi %1, 4 \n" in raw_copy_from_user()
41 " subi %0, 4 \n" in raw_copy_from_user()
42 " br 3b \n" in raw_copy_from_user()
43 "5: cmpnei %0, 0 \n" in raw_copy_from_user()
44 " bf 7f \n" in raw_copy_from_user()
45 "6: ldb %3, (%2, 0) \n" in raw_copy_from_user()
46 " stb %3, (%1, 0) \n" in raw_copy_from_user()
47 " addi %2, 1 \n" in raw_copy_from_user()
48 " addi %1, 1 \n" in raw_copy_from_user()
49 " subi %0, 1 \n" in raw_copy_from_user()
50 " br 5b \n" in raw_copy_from_user()
51 "8: stw %3, (%1, 0) \n" in raw_copy_from_user()
52 " subi %0, 4 \n" in raw_copy_from_user()
53 " bf 7f \n" in raw_copy_from_user()
54 "9: subi %0, 8 \n" in raw_copy_from_user()
55 " bf 7f \n" in raw_copy_from_user()
56 "13: stw %3, (%1, 8) \n" in raw_copy_from_user()
57 " subi %0, 12 \n" in raw_copy_from_user()
58 " bf 7f \n" in raw_copy_from_user()
59 ".section __ex_table, \"a\" \n" in raw_copy_from_user()
60 ".align 2 \n" in raw_copy_from_user()
61 ".long 2b, 7f \n" in raw_copy_from_user()
62 ".long 4b, 7f \n" in raw_copy_from_user()
63 ".long 6b, 7f \n" in raw_copy_from_user()
64 ".long 10b, 8b \n" in raw_copy_from_user()
65 ".long 11b, 9b \n" in raw_copy_from_user()
66 ".long 12b,13b \n" in raw_copy_from_user()
67 ".previous \n" in raw_copy_from_user()
68 "7: \n" in raw_copy_from_user()
69 : "=r"(n), "=r"(to), "=r"(from), "=r"(nsave), in raw_copy_from_user()
71 : "0"(n), "1"(to), "2"(from) in raw_copy_from_user()
74 return n; in raw_copy_from_user()
79 unsigned long n) in raw_copy_to_user() argument
84 "0: cmpnei %1, 0 \n" in raw_copy_to_user()
85 " bf 8f \n" in raw_copy_to_user()
86 " mov %3, %1 \n" in raw_copy_to_user()
87 " or %3, %2 \n" in raw_copy_to_user()
88 " andi %3, 3 \n" in raw_copy_to_user()
89 " cmpnei %3, 0 \n" in raw_copy_to_user()
90 " bf 1f \n" in raw_copy_to_user()
91 " br 5f \n" in raw_copy_to_user()
92 "1: cmplti %0, 16 \n" /* 4W */ in raw_copy_to_user()
93 " bt 3f \n" in raw_copy_to_user()
94 " ldw %3, (%2, 0) \n" in raw_copy_to_user()
95 " ldw %4, (%2, 4) \n" in raw_copy_to_user()
96 " ldw %5, (%2, 8) \n" in raw_copy_to_user()
97 " ldw %6, (%2, 12) \n" in raw_copy_to_user()
98 "2: stw %3, (%1, 0) \n" in raw_copy_to_user()
99 "9: stw %4, (%1, 4) \n" in raw_copy_to_user()
100 "10: stw %5, (%1, 8) \n" in raw_copy_to_user()
101 "11: stw %6, (%1, 12) \n" in raw_copy_to_user()
102 " addi %2, 16 \n" in raw_copy_to_user()
103 " addi %1, 16 \n" in raw_copy_to_user()
104 " subi %0, 16 \n" in raw_copy_to_user()
105 " br 1b \n" in raw_copy_to_user()
106 "3: cmplti %0, 4 \n" /* 1W */ in raw_copy_to_user()
107 " bt 5f \n" in raw_copy_to_user()
108 " ldw %3, (%2, 0) \n" in raw_copy_to_user()
109 "4: stw %3, (%1, 0) \n" in raw_copy_to_user()
110 " addi %2, 4 \n" in raw_copy_to_user()
111 " addi %1, 4 \n" in raw_copy_to_user()
112 " subi %0, 4 \n" in raw_copy_to_user()
113 " br 3b \n" in raw_copy_to_user()
114 "5: cmpnei %0, 0 \n" /* 1B */ in raw_copy_to_user()
115 " bf 13f \n" in raw_copy_to_user()
116 " ldb %3, (%2, 0) \n" in raw_copy_to_user()
117 "6: stb %3, (%1, 0) \n" in raw_copy_to_user()
118 " addi %2, 1 \n" in raw_copy_to_user()
119 " addi %1, 1 \n" in raw_copy_to_user()
120 " subi %0, 1 \n" in raw_copy_to_user()
121 " br 5b \n" in raw_copy_to_user()
122 "7: subi %0, 4 \n" in raw_copy_to_user()
123 "8: subi %0, 4 \n" in raw_copy_to_user()
124 "12: subi %0, 4 \n" in raw_copy_to_user()
125 " br 13f \n" in raw_copy_to_user()
126 ".section __ex_table, \"a\" \n" in raw_copy_to_user()
127 ".align 2 \n" in raw_copy_to_user()
128 ".long 2b, 13f \n" in raw_copy_to_user()
129 ".long 4b, 13f \n" in raw_copy_to_user()
130 ".long 6b, 13f \n" in raw_copy_to_user()
131 ".long 9b, 12b \n" in raw_copy_to_user()
132 ".long 10b, 8b \n" in raw_copy_to_user()
133 ".long 11b, 7b \n" in raw_copy_to_user()
134 ".previous \n" in raw_copy_to_user()
135 "13: \n" in raw_copy_to_user()
136 : "=r"(n), "=r"(to), "=r"(from), "=r"(w0), in raw_copy_to_user()
138 : "0"(n), "1"(to), "2"(from) in raw_copy_to_user()
141 return n; in raw_copy_to_user()
146 * __clear_user: - Zero a block of memory in user space, with less checking.
148 * @n: Number of bytes to zero.
157 __clear_user(void __user *to, unsigned long n) in __clear_user() argument
162 "0: cmpnei %1, 0 \n" in __clear_user()
163 " bf 7f \n" in __clear_user()
164 " mov %3, %1 \n" in __clear_user()
165 " andi %3, 3 \n" in __clear_user()
166 " cmpnei %3, 0 \n" in __clear_user()
167 " bf 1f \n" in __clear_user()
168 " br 5f \n" in __clear_user()
169 "1: cmplti %0, 32 \n" /* 4W */ in __clear_user()
170 " bt 3f \n" in __clear_user()
171 "8: stw %2, (%1, 0) \n" in __clear_user()
172 "10: stw %2, (%1, 4) \n" in __clear_user()
173 "11: stw %2, (%1, 8) \n" in __clear_user()
174 "12: stw %2, (%1, 12) \n" in __clear_user()
175 "13: stw %2, (%1, 16) \n" in __clear_user()
176 "14: stw %2, (%1, 20) \n" in __clear_user()
177 "15: stw %2, (%1, 24) \n" in __clear_user()
178 "16: stw %2, (%1, 28) \n" in __clear_user()
179 " addi %1, 32 \n" in __clear_user()
180 " subi %0, 32 \n" in __clear_user()
181 " br 1b \n" in __clear_user()
182 "3: cmplti %0, 4 \n" /* 1W */ in __clear_user()
183 " bt 5f \n" in __clear_user()
184 "4: stw %2, (%1, 0) \n" in __clear_user()
185 " addi %1, 4 \n" in __clear_user()
186 " subi %0, 4 \n" in __clear_user()
187 " br 3b \n" in __clear_user()
188 "5: cmpnei %0, 0 \n" /* 1B */ in __clear_user()
189 "9: bf 7f \n" in __clear_user()
190 "6: stb %2, (%1, 0) \n" in __clear_user()
191 " addi %1, 1 \n" in __clear_user()
192 " subi %0, 1 \n" in __clear_user()
193 " br 5b \n" in __clear_user()
194 ".section __ex_table,\"a\" \n" in __clear_user()
195 ".align 2 \n" in __clear_user()
196 ".long 8b, 9b \n" in __clear_user()
197 ".long 10b, 9b \n" in __clear_user()
198 ".long 11b, 9b \n" in __clear_user()
199 ".long 12b, 9b \n" in __clear_user()
200 ".long 13b, 9b \n" in __clear_user()
201 ".long 14b, 9b \n" in __clear_user()
202 ".long 15b, 9b \n" in __clear_user()
203 ".long 16b, 9b \n" in __clear_user()
204 ".long 4b, 9b \n" in __clear_user()
205 ".long 6b, 9b \n" in __clear_user()
206 ".previous \n" in __clear_user()
207 "7: \n" in __clear_user()
208 : "=r"(n), "=r" (data), "=r"(value), "=r"(tmp) in __clear_user()
209 : "0"(n), "1"(to), "2"(0) in __clear_user()
212 return n; in __clear_user()