Lines Matching +full:3 +full:- +full:n
1 /* SPDX-License-Identifier: GPL-2.0 */
42 asm volatile ("\n" \
43 "1: "inst"."#bwl" %2,%1\n" \
44 "2:\n" \
45 " .section .fixup,\"ax\"\n" \
46 " .even\n" \
47 "10: moveq.l %3,%0\n" \
48 " jra 2b\n" \
49 " .previous\n" \
50 "\n" \
51 " .section __ex_table,\"a\"\n" \
52 " .align 4\n" \
53 " .long 1b,10b\n" \
54 " .long 2b,10b\n" \
63 asm volatile ("\n" \
64 "1: "inst".l %2,(%1)+\n" \
65 "2: "inst".l %R2,(%1)\n" \
66 "3:\n" \
67 " .section .fixup,\"ax\"\n" \
68 " .even\n" \
69 "10: movel %3,%0\n" \
70 " jra 3b\n" \
71 " .previous\n" \
72 "\n" \
73 " .section __ex_table,\"a\"\n" \
74 " .align 4\n" \
75 " .long 1b,10b\n" \
76 " .long 2b,10b\n" \
77 " .long 3b,10b\n" \
80 : "r" (x), "i" (-EFAULT) \
85 * These are the main single-value transfer routines. They automatically
96 __put_user_asm(MOVES, __pu_err, __pu_val, ptr, b, d, -EFAULT); \
99 __put_user_asm(MOVES, __pu_err, __pu_val, ptr, w, r, -EFAULT); \
102 __put_user_asm(MOVES, __pu_err, __pu_val, ptr, l, r, -EFAULT); \
117 asm volatile ("\n" \
118 "1: "inst"."#bwl" %2,%1\n" \
119 "2:\n" \
120 " .section .fixup,\"ax\"\n" \
121 " .even\n" \
122 "10: move.l %3,%0\n" \
123 " sub.l %1,%1\n" \
124 " jra 2b\n" \
125 " .previous\n" \
126 "\n" \
127 " .section __ex_table,\"a\"\n" \
128 " .align 4\n" \
129 " .long 1b,10b\n" \
144 asm volatile ("\n" \
145 "1: "inst".l (%2)+,%1\n" \
146 "2: "inst".l (%2),%R1\n" \
147 "3:\n" \
148 " .section .fixup,\"ax\"\n" \
149 " .even\n" \
150 "10: move.l %3,%0\n" \
151 " sub.l %1,%1\n" \
152 " sub.l %R1,%R1\n" \
153 " jra 3b\n" \
154 " .previous\n" \
155 "\n" \
156 " .section __ex_table,\"a\"\n" \
157 " .align 4\n" \
158 " .long 1b,10b\n" \
159 " .long 2b,10b\n" \
163 : "i" (-EFAULT) \
174 __get_user_asm(MOVES, __gu_err, x, ptr, u8, b, d, -EFAULT); \
177 __get_user_asm(MOVES, __gu_err, x, ptr, u16, w, r, -EFAULT); \
180 __get_user_asm(MOVES, __gu_err, x, ptr, u32, l, r, -EFAULT); \
192 unsigned long __generic_copy_from_user(void *to, const void __user *from, unsigned long n);
193 unsigned long __generic_copy_to_user(void __user *to, const void *from, unsigned long n);
201 asm volatile ("\n" \
202 "1: "MOVES"."#s1" (%2)+,%3\n" \
203 " move."#s1" %3,(%1)+\n" \
204 " .ifnc \""#s2"\",\"\"\n" \
205 "2: "MOVES"."#s2" (%2)+,%3\n" \
206 " move."#s2" %3,(%1)+\n" \
207 " .ifnc \""#s3"\",\"\"\n" \
208 "3: "MOVES"."#s3" (%2)+,%3\n" \
209 " move."#s3" %3,(%1)+\n" \
210 " .endif\n" \
211 " .endif\n" \
212 "4:\n" \
213 " .section __ex_table,\"a\"\n" \
214 " .align 4\n" \
215 " .long 1b,10f\n" \
216 " .ifnc \""#s2"\",\"\"\n" \
217 " .long 2b,20f\n" \
218 " .ifnc \""#s3"\",\"\"\n" \
219 " .long 3b,30f\n" \
220 " .endif\n" \
221 " .endif\n" \
222 " .previous\n" \
223 "\n" \
224 " .section .fixup,\"ax\"\n" \
225 " .even\n" \
226 "10: addq.l #"#n1",%0\n" \
227 " .ifnc \""#s2"\",\"\"\n" \
228 "20: addq.l #"#n2",%0\n" \
229 " .ifnc \""#s3"\",\"\"\n" \
230 "30: addq.l #"#n3",%0\n" \
231 " .endif\n" \
232 " .endif\n" \
233 " jra 4b\n" \
234 " .previous\n" \
245 __constant_copy_from_user(void *to, const void __user *from, unsigned long n) in __constant_copy_from_user() argument
249 switch (n) { in __constant_copy_from_user()
256 case 3: in __constant_copy_from_user()
284 /* we limit the inlined version to 3 moves */ in __constant_copy_from_user()
285 return __generic_copy_from_user(to, from, n); in __constant_copy_from_user()
291 #define __constant_copy_to_user_asm(res, to, from, tmp, n, s1, s2, s3) \ argument
292 asm volatile ("\n" \
293 " move."#s1" (%2)+,%3\n" \
294 "11: "MOVES"."#s1" %3,(%1)+\n" \
295 "12: move."#s2" (%2)+,%3\n" \
296 "21: "MOVES"."#s2" %3,(%1)+\n" \
297 "22:\n" \
298 " .ifnc \""#s3"\",\"\"\n" \
299 " move."#s3" (%2)+,%3\n" \
300 "31: "MOVES"."#s3" %3,(%1)+\n" \
301 "32:\n" \
302 " .endif\n" \
303 "4:\n" \
304 "\n" \
305 " .section __ex_table,\"a\"\n" \
306 " .align 4\n" \
307 " .long 11b,5f\n" \
308 " .long 12b,5f\n" \
309 " .long 21b,5f\n" \
310 " .long 22b,5f\n" \
311 " .ifnc \""#s3"\",\"\"\n" \
312 " .long 31b,5f\n" \
313 " .long 32b,5f\n" \
314 " .endif\n" \
315 " .previous\n" \
316 "\n" \
317 " .section .fixup,\"ax\"\n" \
318 " .even\n" \
319 "5: moveq.l #"#n",%0\n" \
320 " jra 4b\n" \
321 " .previous\n" \
326 __constant_copy_to_user(void __user *to, const void *from, unsigned long n) in __constant_copy_to_user() argument
330 switch (n) { in __constant_copy_to_user()
339 case 3: in __constant_copy_to_user()
340 __constant_copy_to_user_asm(res, to, from, tmp, 3, w, b,); in __constant_copy_to_user()
368 /* limit the inlined version to 3 moves */ in __constant_copy_to_user()
369 return __generic_copy_to_user(to, from, n); in __constant_copy_to_user()
376 raw_copy_from_user(void *to, const void __user *from, unsigned long n) in raw_copy_from_user() argument
378 if (__builtin_constant_p(n)) in raw_copy_from_user()
379 return __constant_copy_from_user(to, from, n); in raw_copy_from_user()
380 return __generic_copy_from_user(to, from, n); in raw_copy_from_user()
384 raw_copy_to_user(void __user *to, const void *from, unsigned long n) in raw_copy_to_user() argument
386 if (__builtin_constant_p(n)) in raw_copy_to_user()
387 return __constant_copy_to_user(to, from, n); in raw_copy_to_user()
388 return __generic_copy_to_user(to, from, n); in raw_copy_to_user()
404 u8, b, d, -EFAULT); \
408 u16, w, r, -EFAULT); \
412 u32, l, r, -EFAULT); \
433 b, d, -EFAULT); \
437 w, r, -EFAULT); \
441 l, r, -EFAULT); \
454 extern __must_check long strnlen_user(const char __user *str, long n);
456 unsigned long __clear_user(void __user *to, unsigned long n);
461 #include <asm-generic/uaccess.h>