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

1 // SPDX-License-Identifier: GPL-2.0-or-later
12 * Andreas Schwab, <schwab@issan.informatik.uni-dortmund.de>
19 * length-counter instead of the length counter
20 * (%1). Thanks to Roman Hodek for pointing this out.
22 * data-registers to hold input values and one tries to
43 * is aligned on either a 2-byte or 4-byte boundary. in csum_partial()
45 __asm__("movel %2,%3\n\t" in csum_partial()
46 "btst #1,%3\n\t" /* Check alignment */ in csum_partial()
47 "jeq 2f\n\t" in csum_partial()
48 "subql #2,%1\n\t" /* buff%4==2: treat first word */ in csum_partial()
49 "jgt 1f\n\t" in csum_partial()
50 "addql #2,%1\n\t" /* len was == 2, treat only rest */ in csum_partial()
51 "jra 4f\n" in csum_partial()
52 "1:\t" in csum_partial()
53 "addw %2@+,%0\n\t" /* add first word to sum */ in csum_partial()
54 "clrl %3\n\t" in csum_partial()
55 "addxl %3,%0\n" /* add X bit */ in csum_partial()
58 "movel %1,%3\n\t" /* save len in tmp1 */ in csum_partial()
59 "lsrl #5,%1\n\t" /* len/32 */ in csum_partial()
60 "jeq 2f\n\t" /* not enough... */ in csum_partial()
61 "subql #1,%1\n" in csum_partial()
62 "1:\t" in csum_partial()
63 "movel %2@+,%4\n\t" in csum_partial()
64 "addxl %4,%0\n\t" in csum_partial()
65 "movel %2@+,%4\n\t" in csum_partial()
66 "addxl %4,%0\n\t" in csum_partial()
67 "movel %2@+,%4\n\t" in csum_partial()
68 "addxl %4,%0\n\t" in csum_partial()
69 "movel %2@+,%4\n\t" in csum_partial()
70 "addxl %4,%0\n\t" in csum_partial()
71 "movel %2@+,%4\n\t" in csum_partial()
72 "addxl %4,%0\n\t" in csum_partial()
73 "movel %2@+,%4\n\t" in csum_partial()
74 "addxl %4,%0\n\t" in csum_partial()
75 "movel %2@+,%4\n\t" in csum_partial()
76 "addxl %4,%0\n\t" in csum_partial()
77 "movel %2@+,%4\n\t" in csum_partial()
78 "addxl %4,%0\n\t" in csum_partial()
79 "dbra %1,1b\n\t" in csum_partial()
80 "clrl %4\n\t" in csum_partial()
81 "addxl %4,%0\n\t" /* add X bit */ in csum_partial()
82 "clrw %1\n\t" in csum_partial()
83 "subql #1,%1\n\t" in csum_partial()
84 "jcc 1b\n" in csum_partial()
86 "movel %3,%1\n\t" /* restore len from tmp1 */ in csum_partial()
87 "andw #0x1c,%3\n\t" /* number of rest longs */ in csum_partial()
88 "jeq 4f\n\t" in csum_partial()
89 "lsrw #2,%3\n\t" in csum_partial()
90 "subqw #1,%3\n" in csum_partial()
93 "movel %2@+,%4\n\t" in csum_partial()
94 "addxl %4,%0\n\t" in csum_partial()
95 "dbra %3,3b\n\t" in csum_partial()
96 "clrl %4\n\t" in csum_partial()
97 "addxl %4,%0\n" /* add X bit */ in csum_partial()
100 "andw #3,%1\n\t" in csum_partial()
101 "jeq 7f\n\t" in csum_partial()
102 "clrl %4\n\t" /* clear tmp2 for rest bytes */ in csum_partial()
103 "subqw #2,%1\n\t" in csum_partial()
104 "jlt 5f\n\t" in csum_partial()
105 "movew %2@+,%4\n\t" /* have rest >= 2: get word */ in csum_partial()
106 "swap %4\n\t" /* into bits 16..31 */ in csum_partial()
107 "tstw %1\n\t" /* another byte? */ in csum_partial()
108 "jeq 6f\n" in csum_partial()
110 "moveb %2@,%4\n\t" /* have odd rest: get byte */ in csum_partial()
111 "lslw #8,%4\n\t" /* into bits 8..15; 16..31 untouched */ in csum_partial()
113 "addl %4,%0\n\t" /* now add rest long to sum */ in csum_partial()
114 "clrl %4\n\t" in csum_partial()
115 "addxl %4,%0\n" /* add X bit */ in csum_partial()
119 : "0" (sum), "1" (len), "2" (buff) in csum_partial()
142 __asm__("movel %2,%4\n\t" in csum_and_copy_from_user()
143 "btst #1,%4\n\t" /* Check alignment */ in csum_and_copy_from_user()
144 "jeq 2f\n\t" in csum_and_copy_from_user()
145 "subql #2,%1\n\t" /* buff%4==2: treat first word */ in csum_and_copy_from_user()
146 "jgt 1f\n\t" in csum_and_copy_from_user()
147 "addql #2,%1\n\t" /* len was == 2, treat only rest */ in csum_and_copy_from_user()
148 "jra 4f\n" in csum_and_copy_from_user()
149 "1:\n" in csum_and_copy_from_user()
151 "movesw %2@+,%4\n\t" /* add first word to sum */ in csum_and_copy_from_user()
152 "addw %4,%0\n\t" in csum_and_copy_from_user()
153 "movew %4,%3@+\n\t" in csum_and_copy_from_user()
154 "clrl %4\n\t" in csum_and_copy_from_user()
155 "addxl %4,%0\n" /* add X bit */ in csum_and_copy_from_user()
158 "movel %1,%4\n\t" /* save len in tmp1 */ in csum_and_copy_from_user()
159 "lsrl #5,%1\n\t" /* len/32 */ in csum_and_copy_from_user()
160 "jeq 2f\n\t" /* not enough... */ in csum_and_copy_from_user()
161 "subql #1,%1\n" in csum_and_copy_from_user()
162 "1:\n" in csum_and_copy_from_user()
164 "movesl %2@+,%5\n\t" in csum_and_copy_from_user()
165 "addxl %5,%0\n\t" in csum_and_copy_from_user()
166 "movel %5,%3@+\n\t" in csum_and_copy_from_user()
168 "movesl %2@+,%5\n\t" in csum_and_copy_from_user()
169 "addxl %5,%0\n\t" in csum_and_copy_from_user()
170 "movel %5,%3@+\n\t" in csum_and_copy_from_user()
172 "movesl %2@+,%5\n\t" in csum_and_copy_from_user()
173 "addxl %5,%0\n\t" in csum_and_copy_from_user()
174 "movel %5,%3@+\n\t" in csum_and_copy_from_user()
176 "movesl %2@+,%5\n\t" in csum_and_copy_from_user()
177 "addxl %5,%0\n\t" in csum_and_copy_from_user()
178 "movel %5,%3@+\n\t" in csum_and_copy_from_user()
180 "movesl %2@+,%5\n\t" in csum_and_copy_from_user()
181 "addxl %5,%0\n\t" in csum_and_copy_from_user()
182 "movel %5,%3@+\n\t" in csum_and_copy_from_user()
184 "movesl %2@+,%5\n\t" in csum_and_copy_from_user()
185 "addxl %5,%0\n\t" in csum_and_copy_from_user()
186 "movel %5,%3@+\n\t" in csum_and_copy_from_user()
188 "movesl %2@+,%5\n\t" in csum_and_copy_from_user()
189 "addxl %5,%0\n\t" in csum_and_copy_from_user()
190 "movel %5,%3@+\n\t" in csum_and_copy_from_user()
192 "movesl %2@+,%5\n\t" in csum_and_copy_from_user()
193 "addxl %5,%0\n\t" in csum_and_copy_from_user()
194 "movel %5,%3@+\n\t" in csum_and_copy_from_user()
195 "dbra %1,1b\n\t" in csum_and_copy_from_user()
196 "clrl %5\n\t" in csum_and_copy_from_user()
197 "addxl %5,%0\n\t" /* add X bit */ in csum_and_copy_from_user()
198 "clrw %1\n\t" in csum_and_copy_from_user()
199 "subql #1,%1\n\t" in csum_and_copy_from_user()
200 "jcc 1b\n" in csum_and_copy_from_user()
202 "movel %4,%1\n\t" /* restore len from tmp1 */ in csum_and_copy_from_user()
203 "andw #0x1c,%4\n\t" /* number of rest longs */ in csum_and_copy_from_user()
204 "jeq 4f\n\t" in csum_and_copy_from_user()
205 "lsrw #2,%4\n\t" in csum_and_copy_from_user()
206 "subqw #1,%4\n" in csum_and_copy_from_user()
207 "3:\n" in csum_and_copy_from_user()
210 "movesl %2@+,%5\n\t" in csum_and_copy_from_user()
211 "addxl %5,%0\n\t" in csum_and_copy_from_user()
212 "movel %5,%3@+\n\t" in csum_and_copy_from_user()
213 "dbra %4,3b\n\t" in csum_and_copy_from_user()
214 "clrl %5\n\t" in csum_and_copy_from_user()
215 "addxl %5,%0\n" /* add X bit */ in csum_and_copy_from_user()
218 "andw #3,%1\n\t" in csum_and_copy_from_user()
219 "jeq 7f\n\t" in csum_and_copy_from_user()
220 "clrl %5\n\t" /* clear tmp2 for rest bytes */ in csum_and_copy_from_user()
221 "subqw #2,%1\n\t" in csum_and_copy_from_user()
222 "jlt 5f\n\t" in csum_and_copy_from_user()
224 "movesw %2@+,%5\n\t" /* have rest >= 2: get word */ in csum_and_copy_from_user()
225 "movew %5,%3@+\n\t" in csum_and_copy_from_user()
226 "swap %5\n\t" /* into bits 16..31 */ in csum_and_copy_from_user()
227 "tstw %1\n\t" /* another byte? */ in csum_and_copy_from_user()
228 "jeq 6f\n" in csum_and_copy_from_user()
229 "5:\n" in csum_and_copy_from_user()
231 "movesb %2@,%5\n\t" /* have odd rest: get byte */ in csum_and_copy_from_user()
232 "moveb %5,%3@+\n\t" in csum_and_copy_from_user()
233 "lslw #8,%5\n\t" /* into bits 8..15; 16..31 untouched */ in csum_and_copy_from_user()
235 "addl %5,%0\n\t" /* now add rest long to sum */ in csum_and_copy_from_user()
236 "clrl %5\n\t" in csum_and_copy_from_user()
237 "addxl %5,%0\n\t" /* add X bit */ in csum_and_copy_from_user()
239 ".section .fixup,\"ax\"\n" in csum_and_copy_from_user()
240 ".even\n" in csum_and_copy_from_user()
243 "clrl %0\n" in csum_and_copy_from_user()
244 "jra 7b\n" in csum_and_copy_from_user()
245 ".previous\n" in csum_and_copy_from_user()
246 ".section __ex_table,\"a\"\n" in csum_and_copy_from_user()
247 ".long 10b,90b\n" in csum_and_copy_from_user()
248 ".long 11b,90b\n" in csum_and_copy_from_user()
249 ".long 12b,90b\n" in csum_and_copy_from_user()
250 ".long 13b,90b\n" in csum_and_copy_from_user()
251 ".long 14b,90b\n" in csum_and_copy_from_user()
252 ".long 15b,90b\n" in csum_and_copy_from_user()
253 ".long 16b,90b\n" in csum_and_copy_from_user()
254 ".long 17b,90b\n" in csum_and_copy_from_user()
255 ".long 18b,90b\n" in csum_and_copy_from_user()
256 ".long 19b,90b\n" in csum_and_copy_from_user()
257 ".long 20b,90b\n" in csum_and_copy_from_user()
258 ".long 21b,90b\n" in csum_and_copy_from_user()
262 : "0" (sum), "1" (len), "2" (src), "3" (dst) in csum_and_copy_from_user()
278 __asm__("movel %2,%4\n\t" in csum_partial_copy_nocheck()
279 "btst #1,%4\n\t" /* Check alignment */ in csum_partial_copy_nocheck()
280 "jeq 2f\n\t" in csum_partial_copy_nocheck()
281 "subql #2,%1\n\t" /* buff%4==2: treat first word */ in csum_partial_copy_nocheck()
282 "jgt 1f\n\t" in csum_partial_copy_nocheck()
283 "addql #2,%1\n\t" /* len was == 2, treat only rest */ in csum_partial_copy_nocheck()
284 "jra 4f\n" in csum_partial_copy_nocheck()
285 "1:\t" in csum_partial_copy_nocheck()
286 "movew %2@+,%4\n\t" /* add first word to sum */ in csum_partial_copy_nocheck()
287 "addw %4,%0\n\t" in csum_partial_copy_nocheck()
288 "movew %4,%3@+\n\t" in csum_partial_copy_nocheck()
289 "clrl %4\n\t" in csum_partial_copy_nocheck()
290 "addxl %4,%0\n" /* add X bit */ in csum_partial_copy_nocheck()
293 "movel %1,%4\n\t" /* save len in tmp1 */ in csum_partial_copy_nocheck()
294 "lsrl #5,%1\n\t" /* len/32 */ in csum_partial_copy_nocheck()
295 "jeq 2f\n\t" /* not enough... */ in csum_partial_copy_nocheck()
296 "subql #1,%1\n" in csum_partial_copy_nocheck()
297 "1:\t" in csum_partial_copy_nocheck()
298 "movel %2@+,%5\n\t" in csum_partial_copy_nocheck()
299 "addxl %5,%0\n\t" in csum_partial_copy_nocheck()
300 "movel %5,%3@+\n\t" in csum_partial_copy_nocheck()
301 "movel %2@+,%5\n\t" in csum_partial_copy_nocheck()
302 "addxl %5,%0\n\t" in csum_partial_copy_nocheck()
303 "movel %5,%3@+\n\t" in csum_partial_copy_nocheck()
304 "movel %2@+,%5\n\t" in csum_partial_copy_nocheck()
305 "addxl %5,%0\n\t" in csum_partial_copy_nocheck()
306 "movel %5,%3@+\n\t" in csum_partial_copy_nocheck()
307 "movel %2@+,%5\n\t" in csum_partial_copy_nocheck()
308 "addxl %5,%0\n\t" in csum_partial_copy_nocheck()
309 "movel %5,%3@+\n\t" in csum_partial_copy_nocheck()
310 "movel %2@+,%5\n\t" in csum_partial_copy_nocheck()
311 "addxl %5,%0\n\t" in csum_partial_copy_nocheck()
312 "movel %5,%3@+\n\t" in csum_partial_copy_nocheck()
313 "movel %2@+,%5\n\t" in csum_partial_copy_nocheck()
314 "addxl %5,%0\n\t" in csum_partial_copy_nocheck()
315 "movel %5,%3@+\n\t" in csum_partial_copy_nocheck()
316 "movel %2@+,%5\n\t" in csum_partial_copy_nocheck()
317 "addxl %5,%0\n\t" in csum_partial_copy_nocheck()
318 "movel %5,%3@+\n\t" in csum_partial_copy_nocheck()
319 "movel %2@+,%5\n\t" in csum_partial_copy_nocheck()
320 "addxl %5,%0\n\t" in csum_partial_copy_nocheck()
321 "movel %5,%3@+\n\t" in csum_partial_copy_nocheck()
322 "dbra %1,1b\n\t" in csum_partial_copy_nocheck()
323 "clrl %5\n\t" in csum_partial_copy_nocheck()
324 "addxl %5,%0\n\t" /* add X bit */ in csum_partial_copy_nocheck()
325 "clrw %1\n\t" in csum_partial_copy_nocheck()
326 "subql #1,%1\n\t" in csum_partial_copy_nocheck()
327 "jcc 1b\n" in csum_partial_copy_nocheck()
329 "movel %4,%1\n\t" /* restore len from tmp1 */ in csum_partial_copy_nocheck()
330 "andw #0x1c,%4\n\t" /* number of rest longs */ in csum_partial_copy_nocheck()
331 "jeq 4f\n\t" in csum_partial_copy_nocheck()
332 "lsrw #2,%4\n\t" in csum_partial_copy_nocheck()
333 "subqw #1,%4\n" in csum_partial_copy_nocheck()
336 "movel %2@+,%5\n\t" in csum_partial_copy_nocheck()
337 "addxl %5,%0\n\t" in csum_partial_copy_nocheck()
338 "movel %5,%3@+\n\t" in csum_partial_copy_nocheck()
339 "dbra %4,3b\n\t" in csum_partial_copy_nocheck()
340 "clrl %5\n\t" in csum_partial_copy_nocheck()
341 "addxl %5,%0\n" /* add X bit */ in csum_partial_copy_nocheck()
344 "andw #3,%1\n\t" in csum_partial_copy_nocheck()
345 "jeq 7f\n\t" in csum_partial_copy_nocheck()
346 "clrl %5\n\t" /* clear tmp2 for rest bytes */ in csum_partial_copy_nocheck()
347 "subqw #2,%1\n\t" in csum_partial_copy_nocheck()
348 "jlt 5f\n\t" in csum_partial_copy_nocheck()
349 "movew %2@+,%5\n\t" /* have rest >= 2: get word */ in csum_partial_copy_nocheck()
350 "movew %5,%3@+\n\t" in csum_partial_copy_nocheck()
351 "swap %5\n\t" /* into bits 16..31 */ in csum_partial_copy_nocheck()
352 "tstw %1\n\t" /* another byte? */ in csum_partial_copy_nocheck()
353 "jeq 6f\n" in csum_partial_copy_nocheck()
355 "moveb %2@,%5\n\t" /* have odd rest: get byte */ in csum_partial_copy_nocheck()
356 "moveb %5,%3@+\n\t" in csum_partial_copy_nocheck()
357 "lslw #8,%5\n" /* into bits 8..15; 16..31 untouched */ in csum_partial_copy_nocheck()
359 "addl %5,%0\n\t" /* now add rest long to sum */ in csum_partial_copy_nocheck()
360 "clrl %5\n\t" in csum_partial_copy_nocheck()
361 "addxl %5,%0\n" /* add X bit */ in csum_partial_copy_nocheck()
365 : "0" (sum), "1" (len), "2" (src), "3" (dst) in csum_partial_copy_nocheck()