OLD | NEW |
| (Empty) |
1 .file "crypto/bn/asm/bn-586.s" | |
2 .text | |
3 .globl _bn_mul_add_words | |
4 .align 4 | |
5 _bn_mul_add_words: | |
6 L_bn_mul_add_words_begin: | |
7 pushl %ebp | |
8 pushl %ebx | |
9 pushl %esi | |
10 pushl %edi | |
11 | |
12 xorl %esi,%esi | |
13 movl 20(%esp),%edi | |
14 movl 28(%esp),%ecx | |
15 movl 24(%esp),%ebx | |
16 andl $4294967288,%ecx | |
17 movl 32(%esp),%ebp | |
18 pushl %ecx | |
19 jz L000maw_finish | |
20 .align 4,0x90 | |
21 L001maw_loop: | |
22 # Round 0 | |
23 movl (%ebx),%eax | |
24 mull %ebp | |
25 addl %esi,%eax | |
26 adcl $0,%edx | |
27 addl (%edi),%eax | |
28 adcl $0,%edx | |
29 movl %eax,(%edi) | |
30 movl %edx,%esi | |
31 # Round 4 | |
32 movl 4(%ebx),%eax | |
33 mull %ebp | |
34 addl %esi,%eax | |
35 adcl $0,%edx | |
36 addl 4(%edi),%eax | |
37 adcl $0,%edx | |
38 movl %eax,4(%edi) | |
39 movl %edx,%esi | |
40 # Round 8 | |
41 movl 8(%ebx),%eax | |
42 mull %ebp | |
43 addl %esi,%eax | |
44 adcl $0,%edx | |
45 addl 8(%edi),%eax | |
46 adcl $0,%edx | |
47 movl %eax,8(%edi) | |
48 movl %edx,%esi | |
49 # Round 12 | |
50 movl 12(%ebx),%eax | |
51 mull %ebp | |
52 addl %esi,%eax | |
53 adcl $0,%edx | |
54 addl 12(%edi),%eax | |
55 adcl $0,%edx | |
56 movl %eax,12(%edi) | |
57 movl %edx,%esi | |
58 # Round 16 | |
59 movl 16(%ebx),%eax | |
60 mull %ebp | |
61 addl %esi,%eax | |
62 adcl $0,%edx | |
63 addl 16(%edi),%eax | |
64 adcl $0,%edx | |
65 movl %eax,16(%edi) | |
66 movl %edx,%esi | |
67 # Round 20 | |
68 movl 20(%ebx),%eax | |
69 mull %ebp | |
70 addl %esi,%eax | |
71 adcl $0,%edx | |
72 addl 20(%edi),%eax | |
73 adcl $0,%edx | |
74 movl %eax,20(%edi) | |
75 movl %edx,%esi | |
76 # Round 24 | |
77 movl 24(%ebx),%eax | |
78 mull %ebp | |
79 addl %esi,%eax | |
80 adcl $0,%edx | |
81 addl 24(%edi),%eax | |
82 adcl $0,%edx | |
83 movl %eax,24(%edi) | |
84 movl %edx,%esi | |
85 # Round 28 | |
86 movl 28(%ebx),%eax | |
87 mull %ebp | |
88 addl %esi,%eax | |
89 adcl $0,%edx | |
90 addl 28(%edi),%eax | |
91 adcl $0,%edx | |
92 movl %eax,28(%edi) | |
93 movl %edx,%esi | |
94 | |
95 subl $8,%ecx | |
96 leal 32(%ebx),%ebx | |
97 leal 32(%edi),%edi | |
98 jnz L001maw_loop | |
99 L000maw_finish: | |
100 movl 32(%esp),%ecx | |
101 andl $7,%ecx | |
102 jnz L002maw_finish2 | |
103 jmp L003maw_end | |
104 L002maw_finish2: | |
105 # Tail Round 0 | |
106 movl (%ebx),%eax | |
107 mull %ebp | |
108 addl %esi,%eax | |
109 adcl $0,%edx | |
110 addl (%edi),%eax | |
111 adcl $0,%edx | |
112 decl %ecx | |
113 movl %eax,(%edi) | |
114 movl %edx,%esi | |
115 jz L003maw_end | |
116 # Tail Round 1 | |
117 movl 4(%ebx),%eax | |
118 mull %ebp | |
119 addl %esi,%eax | |
120 adcl $0,%edx | |
121 addl 4(%edi),%eax | |
122 adcl $0,%edx | |
123 decl %ecx | |
124 movl %eax,4(%edi) | |
125 movl %edx,%esi | |
126 jz L003maw_end | |
127 # Tail Round 2 | |
128 movl 8(%ebx),%eax | |
129 mull %ebp | |
130 addl %esi,%eax | |
131 adcl $0,%edx | |
132 addl 8(%edi),%eax | |
133 adcl $0,%edx | |
134 decl %ecx | |
135 movl %eax,8(%edi) | |
136 movl %edx,%esi | |
137 jz L003maw_end | |
138 # Tail Round 3 | |
139 movl 12(%ebx),%eax | |
140 mull %ebp | |
141 addl %esi,%eax | |
142 adcl $0,%edx | |
143 addl 12(%edi),%eax | |
144 adcl $0,%edx | |
145 decl %ecx | |
146 movl %eax,12(%edi) | |
147 movl %edx,%esi | |
148 jz L003maw_end | |
149 # Tail Round 4 | |
150 movl 16(%ebx),%eax | |
151 mull %ebp | |
152 addl %esi,%eax | |
153 adcl $0,%edx | |
154 addl 16(%edi),%eax | |
155 adcl $0,%edx | |
156 decl %ecx | |
157 movl %eax,16(%edi) | |
158 movl %edx,%esi | |
159 jz L003maw_end | |
160 # Tail Round 5 | |
161 movl 20(%ebx),%eax | |
162 mull %ebp | |
163 addl %esi,%eax | |
164 adcl $0,%edx | |
165 addl 20(%edi),%eax | |
166 adcl $0,%edx | |
167 decl %ecx | |
168 movl %eax,20(%edi) | |
169 movl %edx,%esi | |
170 jz L003maw_end | |
171 # Tail Round 6 | |
172 movl 24(%ebx),%eax | |
173 mull %ebp | |
174 addl %esi,%eax | |
175 adcl $0,%edx | |
176 addl 24(%edi),%eax | |
177 adcl $0,%edx | |
178 movl %eax,24(%edi) | |
179 movl %edx,%esi | |
180 L003maw_end: | |
181 movl %esi,%eax | |
182 popl %ecx | |
183 popl %edi | |
184 popl %esi | |
185 popl %ebx | |
186 popl %ebp | |
187 ret | |
188 .globl _bn_mul_words | |
189 .align 4 | |
190 _bn_mul_words: | |
191 L_bn_mul_words_begin: | |
192 pushl %ebp | |
193 pushl %ebx | |
194 pushl %esi | |
195 pushl %edi | |
196 | |
197 xorl %esi,%esi | |
198 movl 20(%esp),%edi | |
199 movl 24(%esp),%ebx | |
200 movl 28(%esp),%ebp | |
201 movl 32(%esp),%ecx | |
202 andl $4294967288,%ebp | |
203 jz L004mw_finish | |
204 L005mw_loop: | |
205 # Round 0 | |
206 movl (%ebx),%eax | |
207 mull %ecx | |
208 addl %esi,%eax | |
209 adcl $0,%edx | |
210 movl %eax,(%edi) | |
211 movl %edx,%esi | |
212 # Round 4 | |
213 movl 4(%ebx),%eax | |
214 mull %ecx | |
215 addl %esi,%eax | |
216 adcl $0,%edx | |
217 movl %eax,4(%edi) | |
218 movl %edx,%esi | |
219 # Round 8 | |
220 movl 8(%ebx),%eax | |
221 mull %ecx | |
222 addl %esi,%eax | |
223 adcl $0,%edx | |
224 movl %eax,8(%edi) | |
225 movl %edx,%esi | |
226 # Round 12 | |
227 movl 12(%ebx),%eax | |
228 mull %ecx | |
229 addl %esi,%eax | |
230 adcl $0,%edx | |
231 movl %eax,12(%edi) | |
232 movl %edx,%esi | |
233 # Round 16 | |
234 movl 16(%ebx),%eax | |
235 mull %ecx | |
236 addl %esi,%eax | |
237 adcl $0,%edx | |
238 movl %eax,16(%edi) | |
239 movl %edx,%esi | |
240 # Round 20 | |
241 movl 20(%ebx),%eax | |
242 mull %ecx | |
243 addl %esi,%eax | |
244 adcl $0,%edx | |
245 movl %eax,20(%edi) | |
246 movl %edx,%esi | |
247 # Round 24 | |
248 movl 24(%ebx),%eax | |
249 mull %ecx | |
250 addl %esi,%eax | |
251 adcl $0,%edx | |
252 movl %eax,24(%edi) | |
253 movl %edx,%esi | |
254 # Round 28 | |
255 movl 28(%ebx),%eax | |
256 mull %ecx | |
257 addl %esi,%eax | |
258 adcl $0,%edx | |
259 movl %eax,28(%edi) | |
260 movl %edx,%esi | |
261 | |
262 addl $32,%ebx | |
263 addl $32,%edi | |
264 subl $8,%ebp | |
265 jz L004mw_finish | |
266 jmp L005mw_loop | |
267 L004mw_finish: | |
268 movl 28(%esp),%ebp | |
269 andl $7,%ebp | |
270 jnz L006mw_finish2 | |
271 jmp L007mw_end | |
272 L006mw_finish2: | |
273 # Tail Round 0 | |
274 movl (%ebx),%eax | |
275 mull %ecx | |
276 addl %esi,%eax | |
277 adcl $0,%edx | |
278 movl %eax,(%edi) | |
279 movl %edx,%esi | |
280 decl %ebp | |
281 jz L007mw_end | |
282 # Tail Round 1 | |
283 movl 4(%ebx),%eax | |
284 mull %ecx | |
285 addl %esi,%eax | |
286 adcl $0,%edx | |
287 movl %eax,4(%edi) | |
288 movl %edx,%esi | |
289 decl %ebp | |
290 jz L007mw_end | |
291 # Tail Round 2 | |
292 movl 8(%ebx),%eax | |
293 mull %ecx | |
294 addl %esi,%eax | |
295 adcl $0,%edx | |
296 movl %eax,8(%edi) | |
297 movl %edx,%esi | |
298 decl %ebp | |
299 jz L007mw_end | |
300 # Tail Round 3 | |
301 movl 12(%ebx),%eax | |
302 mull %ecx | |
303 addl %esi,%eax | |
304 adcl $0,%edx | |
305 movl %eax,12(%edi) | |
306 movl %edx,%esi | |
307 decl %ebp | |
308 jz L007mw_end | |
309 # Tail Round 4 | |
310 movl 16(%ebx),%eax | |
311 mull %ecx | |
312 addl %esi,%eax | |
313 adcl $0,%edx | |
314 movl %eax,16(%edi) | |
315 movl %edx,%esi | |
316 decl %ebp | |
317 jz L007mw_end | |
318 # Tail Round 5 | |
319 movl 20(%ebx),%eax | |
320 mull %ecx | |
321 addl %esi,%eax | |
322 adcl $0,%edx | |
323 movl %eax,20(%edi) | |
324 movl %edx,%esi | |
325 decl %ebp | |
326 jz L007mw_end | |
327 # Tail Round 6 | |
328 movl 24(%ebx),%eax | |
329 mull %ecx | |
330 addl %esi,%eax | |
331 adcl $0,%edx | |
332 movl %eax,24(%edi) | |
333 movl %edx,%esi | |
334 L007mw_end: | |
335 movl %esi,%eax | |
336 popl %edi | |
337 popl %esi | |
338 popl %ebx | |
339 popl %ebp | |
340 ret | |
341 .globl _bn_sqr_words | |
342 .align 4 | |
343 _bn_sqr_words: | |
344 L_bn_sqr_words_begin: | |
345 pushl %ebp | |
346 pushl %ebx | |
347 pushl %esi | |
348 pushl %edi | |
349 | |
350 movl 20(%esp),%esi | |
351 movl 24(%esp),%edi | |
352 movl 28(%esp),%ebx | |
353 andl $4294967288,%ebx | |
354 jz L008sw_finish | |
355 L009sw_loop: | |
356 # Round 0 | |
357 movl (%edi),%eax | |
358 mull %eax | |
359 movl %eax,(%esi) | |
360 movl %edx,4(%esi) | |
361 # Round 4 | |
362 movl 4(%edi),%eax | |
363 mull %eax | |
364 movl %eax,8(%esi) | |
365 movl %edx,12(%esi) | |
366 # Round 8 | |
367 movl 8(%edi),%eax | |
368 mull %eax | |
369 movl %eax,16(%esi) | |
370 movl %edx,20(%esi) | |
371 # Round 12 | |
372 movl 12(%edi),%eax | |
373 mull %eax | |
374 movl %eax,24(%esi) | |
375 movl %edx,28(%esi) | |
376 # Round 16 | |
377 movl 16(%edi),%eax | |
378 mull %eax | |
379 movl %eax,32(%esi) | |
380 movl %edx,36(%esi) | |
381 # Round 20 | |
382 movl 20(%edi),%eax | |
383 mull %eax | |
384 movl %eax,40(%esi) | |
385 movl %edx,44(%esi) | |
386 # Round 24 | |
387 movl 24(%edi),%eax | |
388 mull %eax | |
389 movl %eax,48(%esi) | |
390 movl %edx,52(%esi) | |
391 # Round 28 | |
392 movl 28(%edi),%eax | |
393 mull %eax | |
394 movl %eax,56(%esi) | |
395 movl %edx,60(%esi) | |
396 | |
397 addl $32,%edi | |
398 addl $64,%esi | |
399 subl $8,%ebx | |
400 jnz L009sw_loop | |
401 L008sw_finish: | |
402 movl 28(%esp),%ebx | |
403 andl $7,%ebx | |
404 jz L010sw_end | |
405 # Tail Round 0 | |
406 movl (%edi),%eax | |
407 mull %eax | |
408 movl %eax,(%esi) | |
409 decl %ebx | |
410 movl %edx,4(%esi) | |
411 jz L010sw_end | |
412 # Tail Round 1 | |
413 movl 4(%edi),%eax | |
414 mull %eax | |
415 movl %eax,8(%esi) | |
416 decl %ebx | |
417 movl %edx,12(%esi) | |
418 jz L010sw_end | |
419 # Tail Round 2 | |
420 movl 8(%edi),%eax | |
421 mull %eax | |
422 movl %eax,16(%esi) | |
423 decl %ebx | |
424 movl %edx,20(%esi) | |
425 jz L010sw_end | |
426 # Tail Round 3 | |
427 movl 12(%edi),%eax | |
428 mull %eax | |
429 movl %eax,24(%esi) | |
430 decl %ebx | |
431 movl %edx,28(%esi) | |
432 jz L010sw_end | |
433 # Tail Round 4 | |
434 movl 16(%edi),%eax | |
435 mull %eax | |
436 movl %eax,32(%esi) | |
437 decl %ebx | |
438 movl %edx,36(%esi) | |
439 jz L010sw_end | |
440 # Tail Round 5 | |
441 movl 20(%edi),%eax | |
442 mull %eax | |
443 movl %eax,40(%esi) | |
444 decl %ebx | |
445 movl %edx,44(%esi) | |
446 jz L010sw_end | |
447 # Tail Round 6 | |
448 movl 24(%edi),%eax | |
449 mull %eax | |
450 movl %eax,48(%esi) | |
451 movl %edx,52(%esi) | |
452 L010sw_end: | |
453 popl %edi | |
454 popl %esi | |
455 popl %ebx | |
456 popl %ebp | |
457 ret | |
458 .globl _bn_div_words | |
459 .align 4 | |
460 _bn_div_words: | |
461 L_bn_div_words_begin: | |
462 movl 4(%esp),%edx | |
463 movl 8(%esp),%eax | |
464 movl 12(%esp),%ecx | |
465 divl %ecx | |
466 ret | |
467 .globl _bn_add_words | |
468 .align 4 | |
469 _bn_add_words: | |
470 L_bn_add_words_begin: | |
471 pushl %ebp | |
472 pushl %ebx | |
473 pushl %esi | |
474 pushl %edi | |
475 | |
476 movl 20(%esp),%ebx | |
477 movl 24(%esp),%esi | |
478 movl 28(%esp),%edi | |
479 movl 32(%esp),%ebp | |
480 xorl %eax,%eax | |
481 andl $4294967288,%ebp | |
482 jz L011aw_finish | |
483 L012aw_loop: | |
484 # Round 0 | |
485 movl (%esi),%ecx | |
486 movl (%edi),%edx | |
487 addl %eax,%ecx | |
488 movl $0,%eax | |
489 adcl %eax,%eax | |
490 addl %edx,%ecx | |
491 adcl $0,%eax | |
492 movl %ecx,(%ebx) | |
493 # Round 1 | |
494 movl 4(%esi),%ecx | |
495 movl 4(%edi),%edx | |
496 addl %eax,%ecx | |
497 movl $0,%eax | |
498 adcl %eax,%eax | |
499 addl %edx,%ecx | |
500 adcl $0,%eax | |
501 movl %ecx,4(%ebx) | |
502 # Round 2 | |
503 movl 8(%esi),%ecx | |
504 movl 8(%edi),%edx | |
505 addl %eax,%ecx | |
506 movl $0,%eax | |
507 adcl %eax,%eax | |
508 addl %edx,%ecx | |
509 adcl $0,%eax | |
510 movl %ecx,8(%ebx) | |
511 # Round 3 | |
512 movl 12(%esi),%ecx | |
513 movl 12(%edi),%edx | |
514 addl %eax,%ecx | |
515 movl $0,%eax | |
516 adcl %eax,%eax | |
517 addl %edx,%ecx | |
518 adcl $0,%eax | |
519 movl %ecx,12(%ebx) | |
520 # Round 4 | |
521 movl 16(%esi),%ecx | |
522 movl 16(%edi),%edx | |
523 addl %eax,%ecx | |
524 movl $0,%eax | |
525 adcl %eax,%eax | |
526 addl %edx,%ecx | |
527 adcl $0,%eax | |
528 movl %ecx,16(%ebx) | |
529 # Round 5 | |
530 movl 20(%esi),%ecx | |
531 movl 20(%edi),%edx | |
532 addl %eax,%ecx | |
533 movl $0,%eax | |
534 adcl %eax,%eax | |
535 addl %edx,%ecx | |
536 adcl $0,%eax | |
537 movl %ecx,20(%ebx) | |
538 # Round 6 | |
539 movl 24(%esi),%ecx | |
540 movl 24(%edi),%edx | |
541 addl %eax,%ecx | |
542 movl $0,%eax | |
543 adcl %eax,%eax | |
544 addl %edx,%ecx | |
545 adcl $0,%eax | |
546 movl %ecx,24(%ebx) | |
547 # Round 7 | |
548 movl 28(%esi),%ecx | |
549 movl 28(%edi),%edx | |
550 addl %eax,%ecx | |
551 movl $0,%eax | |
552 adcl %eax,%eax | |
553 addl %edx,%ecx | |
554 adcl $0,%eax | |
555 movl %ecx,28(%ebx) | |
556 | |
557 addl $32,%esi | |
558 addl $32,%edi | |
559 addl $32,%ebx | |
560 subl $8,%ebp | |
561 jnz L012aw_loop | |
562 L011aw_finish: | |
563 movl 32(%esp),%ebp | |
564 andl $7,%ebp | |
565 jz L013aw_end | |
566 # Tail Round 0 | |
567 movl (%esi),%ecx | |
568 movl (%edi),%edx | |
569 addl %eax,%ecx | |
570 movl $0,%eax | |
571 adcl %eax,%eax | |
572 addl %edx,%ecx | |
573 adcl $0,%eax | |
574 decl %ebp | |
575 movl %ecx,(%ebx) | |
576 jz L013aw_end | |
577 # Tail Round 1 | |
578 movl 4(%esi),%ecx | |
579 movl 4(%edi),%edx | |
580 addl %eax,%ecx | |
581 movl $0,%eax | |
582 adcl %eax,%eax | |
583 addl %edx,%ecx | |
584 adcl $0,%eax | |
585 decl %ebp | |
586 movl %ecx,4(%ebx) | |
587 jz L013aw_end | |
588 # Tail Round 2 | |
589 movl 8(%esi),%ecx | |
590 movl 8(%edi),%edx | |
591 addl %eax,%ecx | |
592 movl $0,%eax | |
593 adcl %eax,%eax | |
594 addl %edx,%ecx | |
595 adcl $0,%eax | |
596 decl %ebp | |
597 movl %ecx,8(%ebx) | |
598 jz L013aw_end | |
599 # Tail Round 3 | |
600 movl 12(%esi),%ecx | |
601 movl 12(%edi),%edx | |
602 addl %eax,%ecx | |
603 movl $0,%eax | |
604 adcl %eax,%eax | |
605 addl %edx,%ecx | |
606 adcl $0,%eax | |
607 decl %ebp | |
608 movl %ecx,12(%ebx) | |
609 jz L013aw_end | |
610 # Tail Round 4 | |
611 movl 16(%esi),%ecx | |
612 movl 16(%edi),%edx | |
613 addl %eax,%ecx | |
614 movl $0,%eax | |
615 adcl %eax,%eax | |
616 addl %edx,%ecx | |
617 adcl $0,%eax | |
618 decl %ebp | |
619 movl %ecx,16(%ebx) | |
620 jz L013aw_end | |
621 # Tail Round 5 | |
622 movl 20(%esi),%ecx | |
623 movl 20(%edi),%edx | |
624 addl %eax,%ecx | |
625 movl $0,%eax | |
626 adcl %eax,%eax | |
627 addl %edx,%ecx | |
628 adcl $0,%eax | |
629 decl %ebp | |
630 movl %ecx,20(%ebx) | |
631 jz L013aw_end | |
632 # Tail Round 6 | |
633 movl 24(%esi),%ecx | |
634 movl 24(%edi),%edx | |
635 addl %eax,%ecx | |
636 movl $0,%eax | |
637 adcl %eax,%eax | |
638 addl %edx,%ecx | |
639 adcl $0,%eax | |
640 movl %ecx,24(%ebx) | |
641 L013aw_end: | |
642 popl %edi | |
643 popl %esi | |
644 popl %ebx | |
645 popl %ebp | |
646 ret | |
647 .globl _bn_sub_words | |
648 .align 4 | |
649 _bn_sub_words: | |
650 L_bn_sub_words_begin: | |
651 pushl %ebp | |
652 pushl %ebx | |
653 pushl %esi | |
654 pushl %edi | |
655 | |
656 movl 20(%esp),%ebx | |
657 movl 24(%esp),%esi | |
658 movl 28(%esp),%edi | |
659 movl 32(%esp),%ebp | |
660 xorl %eax,%eax | |
661 andl $4294967288,%ebp | |
662 jz L014aw_finish | |
663 L015aw_loop: | |
664 # Round 0 | |
665 movl (%esi),%ecx | |
666 movl (%edi),%edx | |
667 subl %eax,%ecx | |
668 movl $0,%eax | |
669 adcl %eax,%eax | |
670 subl %edx,%ecx | |
671 adcl $0,%eax | |
672 movl %ecx,(%ebx) | |
673 # Round 1 | |
674 movl 4(%esi),%ecx | |
675 movl 4(%edi),%edx | |
676 subl %eax,%ecx | |
677 movl $0,%eax | |
678 adcl %eax,%eax | |
679 subl %edx,%ecx | |
680 adcl $0,%eax | |
681 movl %ecx,4(%ebx) | |
682 # Round 2 | |
683 movl 8(%esi),%ecx | |
684 movl 8(%edi),%edx | |
685 subl %eax,%ecx | |
686 movl $0,%eax | |
687 adcl %eax,%eax | |
688 subl %edx,%ecx | |
689 adcl $0,%eax | |
690 movl %ecx,8(%ebx) | |
691 # Round 3 | |
692 movl 12(%esi),%ecx | |
693 movl 12(%edi),%edx | |
694 subl %eax,%ecx | |
695 movl $0,%eax | |
696 adcl %eax,%eax | |
697 subl %edx,%ecx | |
698 adcl $0,%eax | |
699 movl %ecx,12(%ebx) | |
700 # Round 4 | |
701 movl 16(%esi),%ecx | |
702 movl 16(%edi),%edx | |
703 subl %eax,%ecx | |
704 movl $0,%eax | |
705 adcl %eax,%eax | |
706 subl %edx,%ecx | |
707 adcl $0,%eax | |
708 movl %ecx,16(%ebx) | |
709 # Round 5 | |
710 movl 20(%esi),%ecx | |
711 movl 20(%edi),%edx | |
712 subl %eax,%ecx | |
713 movl $0,%eax | |
714 adcl %eax,%eax | |
715 subl %edx,%ecx | |
716 adcl $0,%eax | |
717 movl %ecx,20(%ebx) | |
718 # Round 6 | |
719 movl 24(%esi),%ecx | |
720 movl 24(%edi),%edx | |
721 subl %eax,%ecx | |
722 movl $0,%eax | |
723 adcl %eax,%eax | |
724 subl %edx,%ecx | |
725 adcl $0,%eax | |
726 movl %ecx,24(%ebx) | |
727 # Round 7 | |
728 movl 28(%esi),%ecx | |
729 movl 28(%edi),%edx | |
730 subl %eax,%ecx | |
731 movl $0,%eax | |
732 adcl %eax,%eax | |
733 subl %edx,%ecx | |
734 adcl $0,%eax | |
735 movl %ecx,28(%ebx) | |
736 | |
737 addl $32,%esi | |
738 addl $32,%edi | |
739 addl $32,%ebx | |
740 subl $8,%ebp | |
741 jnz L015aw_loop | |
742 L014aw_finish: | |
743 movl 32(%esp),%ebp | |
744 andl $7,%ebp | |
745 jz L016aw_end | |
746 # Tail Round 0 | |
747 movl (%esi),%ecx | |
748 movl (%edi),%edx | |
749 subl %eax,%ecx | |
750 movl $0,%eax | |
751 adcl %eax,%eax | |
752 subl %edx,%ecx | |
753 adcl $0,%eax | |
754 decl %ebp | |
755 movl %ecx,(%ebx) | |
756 jz L016aw_end | |
757 # Tail Round 1 | |
758 movl 4(%esi),%ecx | |
759 movl 4(%edi),%edx | |
760 subl %eax,%ecx | |
761 movl $0,%eax | |
762 adcl %eax,%eax | |
763 subl %edx,%ecx | |
764 adcl $0,%eax | |
765 decl %ebp | |
766 movl %ecx,4(%ebx) | |
767 jz L016aw_end | |
768 # Tail Round 2 | |
769 movl 8(%esi),%ecx | |
770 movl 8(%edi),%edx | |
771 subl %eax,%ecx | |
772 movl $0,%eax | |
773 adcl %eax,%eax | |
774 subl %edx,%ecx | |
775 adcl $0,%eax | |
776 decl %ebp | |
777 movl %ecx,8(%ebx) | |
778 jz L016aw_end | |
779 # Tail Round 3 | |
780 movl 12(%esi),%ecx | |
781 movl 12(%edi),%edx | |
782 subl %eax,%ecx | |
783 movl $0,%eax | |
784 adcl %eax,%eax | |
785 subl %edx,%ecx | |
786 adcl $0,%eax | |
787 decl %ebp | |
788 movl %ecx,12(%ebx) | |
789 jz L016aw_end | |
790 # Tail Round 4 | |
791 movl 16(%esi),%ecx | |
792 movl 16(%edi),%edx | |
793 subl %eax,%ecx | |
794 movl $0,%eax | |
795 adcl %eax,%eax | |
796 subl %edx,%ecx | |
797 adcl $0,%eax | |
798 decl %ebp | |
799 movl %ecx,16(%ebx) | |
800 jz L016aw_end | |
801 # Tail Round 5 | |
802 movl 20(%esi),%ecx | |
803 movl 20(%edi),%edx | |
804 subl %eax,%ecx | |
805 movl $0,%eax | |
806 adcl %eax,%eax | |
807 subl %edx,%ecx | |
808 adcl $0,%eax | |
809 decl %ebp | |
810 movl %ecx,20(%ebx) | |
811 jz L016aw_end | |
812 # Tail Round 6 | |
813 movl 24(%esi),%ecx | |
814 movl 24(%edi),%edx | |
815 subl %eax,%ecx | |
816 movl $0,%eax | |
817 adcl %eax,%eax | |
818 subl %edx,%ecx | |
819 adcl $0,%eax | |
820 movl %ecx,24(%ebx) | |
821 L016aw_end: | |
822 popl %edi | |
823 popl %esi | |
824 popl %ebx | |
825 popl %ebp | |
826 ret | |
827 .globl _bn_sub_part_words | |
828 .align 4 | |
829 _bn_sub_part_words: | |
830 L_bn_sub_part_words_begin: | |
831 pushl %ebp | |
832 pushl %ebx | |
833 pushl %esi | |
834 pushl %edi | |
835 | |
836 movl 20(%esp),%ebx | |
837 movl 24(%esp),%esi | |
838 movl 28(%esp),%edi | |
839 movl 32(%esp),%ebp | |
840 xorl %eax,%eax | |
841 andl $4294967288,%ebp | |
842 jz L017aw_finish | |
843 L018aw_loop: | |
844 # Round 0 | |
845 movl (%esi),%ecx | |
846 movl (%edi),%edx | |
847 subl %eax,%ecx | |
848 movl $0,%eax | |
849 adcl %eax,%eax | |
850 subl %edx,%ecx | |
851 adcl $0,%eax | |
852 movl %ecx,(%ebx) | |
853 # Round 1 | |
854 movl 4(%esi),%ecx | |
855 movl 4(%edi),%edx | |
856 subl %eax,%ecx | |
857 movl $0,%eax | |
858 adcl %eax,%eax | |
859 subl %edx,%ecx | |
860 adcl $0,%eax | |
861 movl %ecx,4(%ebx) | |
862 # Round 2 | |
863 movl 8(%esi),%ecx | |
864 movl 8(%edi),%edx | |
865 subl %eax,%ecx | |
866 movl $0,%eax | |
867 adcl %eax,%eax | |
868 subl %edx,%ecx | |
869 adcl $0,%eax | |
870 movl %ecx,8(%ebx) | |
871 # Round 3 | |
872 movl 12(%esi),%ecx | |
873 movl 12(%edi),%edx | |
874 subl %eax,%ecx | |
875 movl $0,%eax | |
876 adcl %eax,%eax | |
877 subl %edx,%ecx | |
878 adcl $0,%eax | |
879 movl %ecx,12(%ebx) | |
880 # Round 4 | |
881 movl 16(%esi),%ecx | |
882 movl 16(%edi),%edx | |
883 subl %eax,%ecx | |
884 movl $0,%eax | |
885 adcl %eax,%eax | |
886 subl %edx,%ecx | |
887 adcl $0,%eax | |
888 movl %ecx,16(%ebx) | |
889 # Round 5 | |
890 movl 20(%esi),%ecx | |
891 movl 20(%edi),%edx | |
892 subl %eax,%ecx | |
893 movl $0,%eax | |
894 adcl %eax,%eax | |
895 subl %edx,%ecx | |
896 adcl $0,%eax | |
897 movl %ecx,20(%ebx) | |
898 # Round 6 | |
899 movl 24(%esi),%ecx | |
900 movl 24(%edi),%edx | |
901 subl %eax,%ecx | |
902 movl $0,%eax | |
903 adcl %eax,%eax | |
904 subl %edx,%ecx | |
905 adcl $0,%eax | |
906 movl %ecx,24(%ebx) | |
907 # Round 7 | |
908 movl 28(%esi),%ecx | |
909 movl 28(%edi),%edx | |
910 subl %eax,%ecx | |
911 movl $0,%eax | |
912 adcl %eax,%eax | |
913 subl %edx,%ecx | |
914 adcl $0,%eax | |
915 movl %ecx,28(%ebx) | |
916 | |
917 addl $32,%esi | |
918 addl $32,%edi | |
919 addl $32,%ebx | |
920 subl $8,%ebp | |
921 jnz L018aw_loop | |
922 L017aw_finish: | |
923 movl 32(%esp),%ebp | |
924 andl $7,%ebp | |
925 jz L019aw_end | |
926 # Tail Round 0 | |
927 movl (%esi),%ecx | |
928 movl (%edi),%edx | |
929 subl %eax,%ecx | |
930 movl $0,%eax | |
931 adcl %eax,%eax | |
932 subl %edx,%ecx | |
933 adcl $0,%eax | |
934 movl %ecx,(%ebx) | |
935 addl $4,%esi | |
936 addl $4,%edi | |
937 addl $4,%ebx | |
938 decl %ebp | |
939 jz L019aw_end | |
940 # Tail Round 1 | |
941 movl (%esi),%ecx | |
942 movl (%edi),%edx | |
943 subl %eax,%ecx | |
944 movl $0,%eax | |
945 adcl %eax,%eax | |
946 subl %edx,%ecx | |
947 adcl $0,%eax | |
948 movl %ecx,(%ebx) | |
949 addl $4,%esi | |
950 addl $4,%edi | |
951 addl $4,%ebx | |
952 decl %ebp | |
953 jz L019aw_end | |
954 # Tail Round 2 | |
955 movl (%esi),%ecx | |
956 movl (%edi),%edx | |
957 subl %eax,%ecx | |
958 movl $0,%eax | |
959 adcl %eax,%eax | |
960 subl %edx,%ecx | |
961 adcl $0,%eax | |
962 movl %ecx,(%ebx) | |
963 addl $4,%esi | |
964 addl $4,%edi | |
965 addl $4,%ebx | |
966 decl %ebp | |
967 jz L019aw_end | |
968 # Tail Round 3 | |
969 movl (%esi),%ecx | |
970 movl (%edi),%edx | |
971 subl %eax,%ecx | |
972 movl $0,%eax | |
973 adcl %eax,%eax | |
974 subl %edx,%ecx | |
975 adcl $0,%eax | |
976 movl %ecx,(%ebx) | |
977 addl $4,%esi | |
978 addl $4,%edi | |
979 addl $4,%ebx | |
980 decl %ebp | |
981 jz L019aw_end | |
982 # Tail Round 4 | |
983 movl (%esi),%ecx | |
984 movl (%edi),%edx | |
985 subl %eax,%ecx | |
986 movl $0,%eax | |
987 adcl %eax,%eax | |
988 subl %edx,%ecx | |
989 adcl $0,%eax | |
990 movl %ecx,(%ebx) | |
991 addl $4,%esi | |
992 addl $4,%edi | |
993 addl $4,%ebx | |
994 decl %ebp | |
995 jz L019aw_end | |
996 # Tail Round 5 | |
997 movl (%esi),%ecx | |
998 movl (%edi),%edx | |
999 subl %eax,%ecx | |
1000 movl $0,%eax | |
1001 adcl %eax,%eax | |
1002 subl %edx,%ecx | |
1003 adcl $0,%eax | |
1004 movl %ecx,(%ebx) | |
1005 addl $4,%esi | |
1006 addl $4,%edi | |
1007 addl $4,%ebx | |
1008 decl %ebp | |
1009 jz L019aw_end | |
1010 # Tail Round 6 | |
1011 movl (%esi),%ecx | |
1012 movl (%edi),%edx | |
1013 subl %eax,%ecx | |
1014 movl $0,%eax | |
1015 adcl %eax,%eax | |
1016 subl %edx,%ecx | |
1017 adcl $0,%eax | |
1018 movl %ecx,(%ebx) | |
1019 addl $4,%esi | |
1020 addl $4,%edi | |
1021 addl $4,%ebx | |
1022 L019aw_end: | |
1023 cmpl $0,36(%esp) | |
1024 je L020pw_end | |
1025 movl 36(%esp),%ebp | |
1026 cmpl $0,%ebp | |
1027 je L020pw_end | |
1028 jge L021pw_pos | |
1029 # pw_neg | |
1030 movl $0,%edx | |
1031 subl %ebp,%edx | |
1032 movl %edx,%ebp | |
1033 andl $4294967288,%ebp | |
1034 jz L022pw_neg_finish | |
1035 L023pw_neg_loop: | |
1036 # dl<0 Round 0 | |
1037 movl $0,%ecx | |
1038 movl (%edi),%edx | |
1039 subl %eax,%ecx | |
1040 movl $0,%eax | |
1041 adcl %eax,%eax | |
1042 subl %edx,%ecx | |
1043 adcl $0,%eax | |
1044 movl %ecx,(%ebx) | |
1045 # dl<0 Round 1 | |
1046 movl $0,%ecx | |
1047 movl 4(%edi),%edx | |
1048 subl %eax,%ecx | |
1049 movl $0,%eax | |
1050 adcl %eax,%eax | |
1051 subl %edx,%ecx | |
1052 adcl $0,%eax | |
1053 movl %ecx,4(%ebx) | |
1054 # dl<0 Round 2 | |
1055 movl $0,%ecx | |
1056 movl 8(%edi),%edx | |
1057 subl %eax,%ecx | |
1058 movl $0,%eax | |
1059 adcl %eax,%eax | |
1060 subl %edx,%ecx | |
1061 adcl $0,%eax | |
1062 movl %ecx,8(%ebx) | |
1063 # dl<0 Round 3 | |
1064 movl $0,%ecx | |
1065 movl 12(%edi),%edx | |
1066 subl %eax,%ecx | |
1067 movl $0,%eax | |
1068 adcl %eax,%eax | |
1069 subl %edx,%ecx | |
1070 adcl $0,%eax | |
1071 movl %ecx,12(%ebx) | |
1072 # dl<0 Round 4 | |
1073 movl $0,%ecx | |
1074 movl 16(%edi),%edx | |
1075 subl %eax,%ecx | |
1076 movl $0,%eax | |
1077 adcl %eax,%eax | |
1078 subl %edx,%ecx | |
1079 adcl $0,%eax | |
1080 movl %ecx,16(%ebx) | |
1081 # dl<0 Round 5 | |
1082 movl $0,%ecx | |
1083 movl 20(%edi),%edx | |
1084 subl %eax,%ecx | |
1085 movl $0,%eax | |
1086 adcl %eax,%eax | |
1087 subl %edx,%ecx | |
1088 adcl $0,%eax | |
1089 movl %ecx,20(%ebx) | |
1090 # dl<0 Round 6 | |
1091 movl $0,%ecx | |
1092 movl 24(%edi),%edx | |
1093 subl %eax,%ecx | |
1094 movl $0,%eax | |
1095 adcl %eax,%eax | |
1096 subl %edx,%ecx | |
1097 adcl $0,%eax | |
1098 movl %ecx,24(%ebx) | |
1099 # dl<0 Round 7 | |
1100 movl $0,%ecx | |
1101 movl 28(%edi),%edx | |
1102 subl %eax,%ecx | |
1103 movl $0,%eax | |
1104 adcl %eax,%eax | |
1105 subl %edx,%ecx | |
1106 adcl $0,%eax | |
1107 movl %ecx,28(%ebx) | |
1108 | |
1109 addl $32,%edi | |
1110 addl $32,%ebx | |
1111 subl $8,%ebp | |
1112 jnz L023pw_neg_loop | |
1113 L022pw_neg_finish: | |
1114 movl 36(%esp),%edx | |
1115 movl $0,%ebp | |
1116 subl %edx,%ebp | |
1117 andl $7,%ebp | |
1118 jz L020pw_end | |
1119 # dl<0 Tail Round 0 | |
1120 movl $0,%ecx | |
1121 movl (%edi),%edx | |
1122 subl %eax,%ecx | |
1123 movl $0,%eax | |
1124 adcl %eax,%eax | |
1125 subl %edx,%ecx | |
1126 adcl $0,%eax | |
1127 decl %ebp | |
1128 movl %ecx,(%ebx) | |
1129 jz L020pw_end | |
1130 # dl<0 Tail Round 1 | |
1131 movl $0,%ecx | |
1132 movl 4(%edi),%edx | |
1133 subl %eax,%ecx | |
1134 movl $0,%eax | |
1135 adcl %eax,%eax | |
1136 subl %edx,%ecx | |
1137 adcl $0,%eax | |
1138 decl %ebp | |
1139 movl %ecx,4(%ebx) | |
1140 jz L020pw_end | |
1141 # dl<0 Tail Round 2 | |
1142 movl $0,%ecx | |
1143 movl 8(%edi),%edx | |
1144 subl %eax,%ecx | |
1145 movl $0,%eax | |
1146 adcl %eax,%eax | |
1147 subl %edx,%ecx | |
1148 adcl $0,%eax | |
1149 decl %ebp | |
1150 movl %ecx,8(%ebx) | |
1151 jz L020pw_end | |
1152 # dl<0 Tail Round 3 | |
1153 movl $0,%ecx | |
1154 movl 12(%edi),%edx | |
1155 subl %eax,%ecx | |
1156 movl $0,%eax | |
1157 adcl %eax,%eax | |
1158 subl %edx,%ecx | |
1159 adcl $0,%eax | |
1160 decl %ebp | |
1161 movl %ecx,12(%ebx) | |
1162 jz L020pw_end | |
1163 # dl<0 Tail Round 4 | |
1164 movl $0,%ecx | |
1165 movl 16(%edi),%edx | |
1166 subl %eax,%ecx | |
1167 movl $0,%eax | |
1168 adcl %eax,%eax | |
1169 subl %edx,%ecx | |
1170 adcl $0,%eax | |
1171 decl %ebp | |
1172 movl %ecx,16(%ebx) | |
1173 jz L020pw_end | |
1174 # dl<0 Tail Round 5 | |
1175 movl $0,%ecx | |
1176 movl 20(%edi),%edx | |
1177 subl %eax,%ecx | |
1178 movl $0,%eax | |
1179 adcl %eax,%eax | |
1180 subl %edx,%ecx | |
1181 adcl $0,%eax | |
1182 decl %ebp | |
1183 movl %ecx,20(%ebx) | |
1184 jz L020pw_end | |
1185 # dl<0 Tail Round 6 | |
1186 movl $0,%ecx | |
1187 movl 24(%edi),%edx | |
1188 subl %eax,%ecx | |
1189 movl $0,%eax | |
1190 adcl %eax,%eax | |
1191 subl %edx,%ecx | |
1192 adcl $0,%eax | |
1193 movl %ecx,24(%ebx) | |
1194 jmp L020pw_end | |
1195 L021pw_pos: | |
1196 andl $4294967288,%ebp | |
1197 jz L024pw_pos_finish | |
1198 L025pw_pos_loop: | |
1199 # dl>0 Round 0 | |
1200 movl (%esi),%ecx | |
1201 subl %eax,%ecx | |
1202 movl %ecx,(%ebx) | |
1203 jnc L026pw_nc0 | |
1204 # dl>0 Round 1 | |
1205 movl 4(%esi),%ecx | |
1206 subl %eax,%ecx | |
1207 movl %ecx,4(%ebx) | |
1208 jnc L027pw_nc1 | |
1209 # dl>0 Round 2 | |
1210 movl 8(%esi),%ecx | |
1211 subl %eax,%ecx | |
1212 movl %ecx,8(%ebx) | |
1213 jnc L028pw_nc2 | |
1214 # dl>0 Round 3 | |
1215 movl 12(%esi),%ecx | |
1216 subl %eax,%ecx | |
1217 movl %ecx,12(%ebx) | |
1218 jnc L029pw_nc3 | |
1219 # dl>0 Round 4 | |
1220 movl 16(%esi),%ecx | |
1221 subl %eax,%ecx | |
1222 movl %ecx,16(%ebx) | |
1223 jnc L030pw_nc4 | |
1224 # dl>0 Round 5 | |
1225 movl 20(%esi),%ecx | |
1226 subl %eax,%ecx | |
1227 movl %ecx,20(%ebx) | |
1228 jnc L031pw_nc5 | |
1229 # dl>0 Round 6 | |
1230 movl 24(%esi),%ecx | |
1231 subl %eax,%ecx | |
1232 movl %ecx,24(%ebx) | |
1233 jnc L032pw_nc6 | |
1234 # dl>0 Round 7 | |
1235 movl 28(%esi),%ecx | |
1236 subl %eax,%ecx | |
1237 movl %ecx,28(%ebx) | |
1238 jnc L033pw_nc7 | |
1239 | |
1240 addl $32,%esi | |
1241 addl $32,%ebx | |
1242 subl $8,%ebp | |
1243 jnz L025pw_pos_loop | |
1244 L024pw_pos_finish: | |
1245 movl 36(%esp),%ebp | |
1246 andl $7,%ebp | |
1247 jz L020pw_end | |
1248 # dl>0 Tail Round 0 | |
1249 movl (%esi),%ecx | |
1250 subl %eax,%ecx | |
1251 movl %ecx,(%ebx) | |
1252 jnc L034pw_tail_nc0 | |
1253 decl %ebp | |
1254 jz L020pw_end | |
1255 # dl>0 Tail Round 1 | |
1256 movl 4(%esi),%ecx | |
1257 subl %eax,%ecx | |
1258 movl %ecx,4(%ebx) | |
1259 jnc L035pw_tail_nc1 | |
1260 decl %ebp | |
1261 jz L020pw_end | |
1262 # dl>0 Tail Round 2 | |
1263 movl 8(%esi),%ecx | |
1264 subl %eax,%ecx | |
1265 movl %ecx,8(%ebx) | |
1266 jnc L036pw_tail_nc2 | |
1267 decl %ebp | |
1268 jz L020pw_end | |
1269 # dl>0 Tail Round 3 | |
1270 movl 12(%esi),%ecx | |
1271 subl %eax,%ecx | |
1272 movl %ecx,12(%ebx) | |
1273 jnc L037pw_tail_nc3 | |
1274 decl %ebp | |
1275 jz L020pw_end | |
1276 # dl>0 Tail Round 4 | |
1277 movl 16(%esi),%ecx | |
1278 subl %eax,%ecx | |
1279 movl %ecx,16(%ebx) | |
1280 jnc L038pw_tail_nc4 | |
1281 decl %ebp | |
1282 jz L020pw_end | |
1283 # dl>0 Tail Round 5 | |
1284 movl 20(%esi),%ecx | |
1285 subl %eax,%ecx | |
1286 movl %ecx,20(%ebx) | |
1287 jnc L039pw_tail_nc5 | |
1288 decl %ebp | |
1289 jz L020pw_end | |
1290 # dl>0 Tail Round 6 | |
1291 movl 24(%esi),%ecx | |
1292 subl %eax,%ecx | |
1293 movl %ecx,24(%ebx) | |
1294 jnc L040pw_tail_nc6 | |
1295 movl $1,%eax | |
1296 jmp L020pw_end | |
1297 L041pw_nc_loop: | |
1298 movl (%esi),%ecx | |
1299 movl %ecx,(%ebx) | |
1300 L026pw_nc0: | |
1301 movl 4(%esi),%ecx | |
1302 movl %ecx,4(%ebx) | |
1303 L027pw_nc1: | |
1304 movl 8(%esi),%ecx | |
1305 movl %ecx,8(%ebx) | |
1306 L028pw_nc2: | |
1307 movl 12(%esi),%ecx | |
1308 movl %ecx,12(%ebx) | |
1309 L029pw_nc3: | |
1310 movl 16(%esi),%ecx | |
1311 movl %ecx,16(%ebx) | |
1312 L030pw_nc4: | |
1313 movl 20(%esi),%ecx | |
1314 movl %ecx,20(%ebx) | |
1315 L031pw_nc5: | |
1316 movl 24(%esi),%ecx | |
1317 movl %ecx,24(%ebx) | |
1318 L032pw_nc6: | |
1319 movl 28(%esi),%ecx | |
1320 movl %ecx,28(%ebx) | |
1321 L033pw_nc7: | |
1322 | |
1323 addl $32,%esi | |
1324 addl $32,%ebx | |
1325 subl $8,%ebp | |
1326 jnz L041pw_nc_loop | |
1327 movl 36(%esp),%ebp | |
1328 andl $7,%ebp | |
1329 jz L042pw_nc_end | |
1330 movl (%esi),%ecx | |
1331 movl %ecx,(%ebx) | |
1332 L034pw_tail_nc0: | |
1333 decl %ebp | |
1334 jz L042pw_nc_end | |
1335 movl 4(%esi),%ecx | |
1336 movl %ecx,4(%ebx) | |
1337 L035pw_tail_nc1: | |
1338 decl %ebp | |
1339 jz L042pw_nc_end | |
1340 movl 8(%esi),%ecx | |
1341 movl %ecx,8(%ebx) | |
1342 L036pw_tail_nc2: | |
1343 decl %ebp | |
1344 jz L042pw_nc_end | |
1345 movl 12(%esi),%ecx | |
1346 movl %ecx,12(%ebx) | |
1347 L037pw_tail_nc3: | |
1348 decl %ebp | |
1349 jz L042pw_nc_end | |
1350 movl 16(%esi),%ecx | |
1351 movl %ecx,16(%ebx) | |
1352 L038pw_tail_nc4: | |
1353 decl %ebp | |
1354 jz L042pw_nc_end | |
1355 movl 20(%esi),%ecx | |
1356 movl %ecx,20(%ebx) | |
1357 L039pw_tail_nc5: | |
1358 decl %ebp | |
1359 jz L042pw_nc_end | |
1360 movl 24(%esi),%ecx | |
1361 movl %ecx,24(%ebx) | |
1362 L040pw_tail_nc6: | |
1363 L042pw_nc_end: | |
1364 movl $0,%eax | |
1365 L020pw_end: | |
1366 popl %edi | |
1367 popl %esi | |
1368 popl %ebx | |
1369 popl %ebp | |
1370 ret | |
OLD | NEW |