]> git.ipfire.org Git - thirdparty/openssl.git/blob - crypto/bn/asm/bn86unix.cpp
Import of old SSLeay release: SSLeay 0.9.1b (unreleased)
[thirdparty/openssl.git] / crypto / bn / asm / bn86unix.cpp
1 /* Run the C pre-processor over this file with one of the following defined
2 * ELF - elf object files,
3 * OUT - a.out object files,
4 * BSDI - BSDI style a.out object files
5 * SOL - Solaris style elf
6 */
7
8 #define TYPE(a,b) .type a,b
9 #define SIZE(a,b) .size a,b
10
11 #if defined(OUT) || defined(BSDI)
12 #define bn_mul_add_words _bn_mul_add_words
13 #define bn_mul_words _bn_mul_words
14 #define bn_sqr_words _bn_sqr_words
15 #define bn_div_words _bn_div_words
16 #define bn_add_words _bn_add_words
17 #define bn_sub_words _bn_sub_words
18 #define bn_mul_comba8 _bn_mul_comba8
19 #define bn_mul_comba4 _bn_mul_comba4
20 #define bn_sqr_comba8 _bn_sqr_comba8
21 #define bn_sqr_comba4 _bn_sqr_comba4
22
23 #endif
24
25 #ifdef OUT
26 #define OK 1
27 #define ALIGN 4
28 #endif
29
30 #ifdef BSDI
31 #define OK 1
32 #define ALIGN 4
33 #undef SIZE
34 #undef TYPE
35 #define SIZE(a,b)
36 #define TYPE(a,b)
37 #endif
38
39 #if defined(ELF) || defined(SOL)
40 #define OK 1
41 #define ALIGN 16
42 #endif
43
44 #ifndef OK
45 You need to define one of
46 ELF - elf systems - linux-elf, NetBSD and DG-UX
47 OUT - a.out systems - linux-a.out and FreeBSD
48 SOL - solaris systems, which are elf with strange comment lines
49 BSDI - a.out with a very primative version of as.
50 #endif
51
52 /* Let the Assembler begin :-) */
53 /* Don't even think of reading this code */
54 /* It was automatically generated by bn-586.pl */
55 /* Which is a perl program used to generate the x86 assember for */
56 /* any of elf, a.out, BSDI,Win32, or Solaris */
57 /* eric <eay@cryptsoft.com> */
58
59 .file "bn-586.s"
60 .version "01.01"
61 gcc2_compiled.:
62 .text
63 .align ALIGN
64 .globl bn_mul_add_words
65 TYPE(bn_mul_add_words,@function)
66 bn_mul_add_words:
67 pushl %ebp
68 pushl %ebx
69 pushl %esi
70 pushl %edi
71
72
73 xorl %esi, %esi
74 movl 20(%esp), %edi
75 movl 28(%esp), %ecx
76 movl 24(%esp), %ebx
77 andl $4294967288, %ecx
78 movl 32(%esp), %ebp
79 pushl %ecx
80 jz .L000maw_finish
81 .L001maw_loop:
82 movl %ecx, (%esp)
83 /* Round 0 */
84 movl (%ebx), %eax
85 mull %ebp
86 addl %esi, %eax
87 movl (%edi), %esi
88 adcl $0, %edx
89 addl %esi, %eax
90 adcl $0, %edx
91 movl %eax, (%edi)
92 movl %edx, %esi
93 /* Round 4 */
94 movl 4(%ebx), %eax
95 mull %ebp
96 addl %esi, %eax
97 movl 4(%edi), %esi
98 adcl $0, %edx
99 addl %esi, %eax
100 adcl $0, %edx
101 movl %eax, 4(%edi)
102 movl %edx, %esi
103 /* Round 8 */
104 movl 8(%ebx), %eax
105 mull %ebp
106 addl %esi, %eax
107 movl 8(%edi), %esi
108 adcl $0, %edx
109 addl %esi, %eax
110 adcl $0, %edx
111 movl %eax, 8(%edi)
112 movl %edx, %esi
113 /* Round 12 */
114 movl 12(%ebx), %eax
115 mull %ebp
116 addl %esi, %eax
117 movl 12(%edi), %esi
118 adcl $0, %edx
119 addl %esi, %eax
120 adcl $0, %edx
121 movl %eax, 12(%edi)
122 movl %edx, %esi
123 /* Round 16 */
124 movl 16(%ebx), %eax
125 mull %ebp
126 addl %esi, %eax
127 movl 16(%edi), %esi
128 adcl $0, %edx
129 addl %esi, %eax
130 adcl $0, %edx
131 movl %eax, 16(%edi)
132 movl %edx, %esi
133 /* Round 20 */
134 movl 20(%ebx), %eax
135 mull %ebp
136 addl %esi, %eax
137 movl 20(%edi), %esi
138 adcl $0, %edx
139 addl %esi, %eax
140 adcl $0, %edx
141 movl %eax, 20(%edi)
142 movl %edx, %esi
143 /* Round 24 */
144 movl 24(%ebx), %eax
145 mull %ebp
146 addl %esi, %eax
147 movl 24(%edi), %esi
148 adcl $0, %edx
149 addl %esi, %eax
150 adcl $0, %edx
151 movl %eax, 24(%edi)
152 movl %edx, %esi
153 /* Round 28 */
154 movl 28(%ebx), %eax
155 mull %ebp
156 addl %esi, %eax
157 movl 28(%edi), %esi
158 adcl $0, %edx
159 addl %esi, %eax
160 adcl $0, %edx
161 movl %eax, 28(%edi)
162 movl %edx, %esi
163
164 movl (%esp), %ecx
165 addl $32, %ebx
166 addl $32, %edi
167 subl $8, %ecx
168 jnz .L001maw_loop
169 .L000maw_finish:
170 movl 32(%esp), %ecx
171 andl $7, %ecx
172 jnz .L002maw_finish2
173 jmp .L003maw_end
174 .align ALIGN
175 .L002maw_finish2:
176 /* Tail Round 0 */
177 movl (%ebx), %eax
178 mull %ebp
179 addl %esi, %eax
180 movl (%edi), %esi
181 adcl $0, %edx
182 addl %esi, %eax
183 adcl $0, %edx
184 decl %ecx
185 movl %eax, (%edi)
186 movl %edx, %esi
187 jz .L003maw_end
188 /* Tail Round 1 */
189 movl 4(%ebx), %eax
190 mull %ebp
191 addl %esi, %eax
192 movl 4(%edi), %esi
193 adcl $0, %edx
194 addl %esi, %eax
195 adcl $0, %edx
196 decl %ecx
197 movl %eax, 4(%edi)
198 movl %edx, %esi
199 jz .L003maw_end
200 /* Tail Round 2 */
201 movl 8(%ebx), %eax
202 mull %ebp
203 addl %esi, %eax
204 movl 8(%edi), %esi
205 adcl $0, %edx
206 addl %esi, %eax
207 adcl $0, %edx
208 decl %ecx
209 movl %eax, 8(%edi)
210 movl %edx, %esi
211 jz .L003maw_end
212 /* Tail Round 3 */
213 movl 12(%ebx), %eax
214 mull %ebp
215 addl %esi, %eax
216 movl 12(%edi), %esi
217 adcl $0, %edx
218 addl %esi, %eax
219 adcl $0, %edx
220 decl %ecx
221 movl %eax, 12(%edi)
222 movl %edx, %esi
223 jz .L003maw_end
224 /* Tail Round 4 */
225 movl 16(%ebx), %eax
226 mull %ebp
227 addl %esi, %eax
228 movl 16(%edi), %esi
229 adcl $0, %edx
230 addl %esi, %eax
231 adcl $0, %edx
232 decl %ecx
233 movl %eax, 16(%edi)
234 movl %edx, %esi
235 jz .L003maw_end
236 /* Tail Round 5 */
237 movl 20(%ebx), %eax
238 mull %ebp
239 addl %esi, %eax
240 movl 20(%edi), %esi
241 adcl $0, %edx
242 addl %esi, %eax
243 adcl $0, %edx
244 decl %ecx
245 movl %eax, 20(%edi)
246 movl %edx, %esi
247 jz .L003maw_end
248 /* Tail Round 6 */
249 movl 24(%ebx), %eax
250 mull %ebp
251 addl %esi, %eax
252 movl 24(%edi), %esi
253 adcl $0, %edx
254 addl %esi, %eax
255 adcl $0, %edx
256 movl %eax, 24(%edi)
257 movl %edx, %esi
258 .L003maw_end:
259 movl %esi, %eax
260 popl %ecx
261 popl %edi
262 popl %esi
263 popl %ebx
264 popl %ebp
265 ret
266 .bn_mul_add_words_end:
267 SIZE(bn_mul_add_words,.bn_mul_add_words_end-bn_mul_add_words)
268 .ident "bn_mul_add_words"
269 .text
270 .align ALIGN
271 .globl bn_mul_words
272 TYPE(bn_mul_words,@function)
273 bn_mul_words:
274 pushl %ebp
275 pushl %ebx
276 pushl %esi
277 pushl %edi
278
279
280 xorl %esi, %esi
281 movl 20(%esp), %edi
282 movl 24(%esp), %ebx
283 movl 28(%esp), %ebp
284 movl 32(%esp), %ecx
285 andl $4294967288, %ebp
286 jz .L004mw_finish
287 .L005mw_loop:
288 /* Round 0 */
289 movl (%ebx), %eax
290 mull %ecx
291 addl %esi, %eax
292 adcl $0, %edx
293 movl %eax, (%edi)
294 movl %edx, %esi
295 /* Round 4 */
296 movl 4(%ebx), %eax
297 mull %ecx
298 addl %esi, %eax
299 adcl $0, %edx
300 movl %eax, 4(%edi)
301 movl %edx, %esi
302 /* Round 8 */
303 movl 8(%ebx), %eax
304 mull %ecx
305 addl %esi, %eax
306 adcl $0, %edx
307 movl %eax, 8(%edi)
308 movl %edx, %esi
309 /* Round 12 */
310 movl 12(%ebx), %eax
311 mull %ecx
312 addl %esi, %eax
313 adcl $0, %edx
314 movl %eax, 12(%edi)
315 movl %edx, %esi
316 /* Round 16 */
317 movl 16(%ebx), %eax
318 mull %ecx
319 addl %esi, %eax
320 adcl $0, %edx
321 movl %eax, 16(%edi)
322 movl %edx, %esi
323 /* Round 20 */
324 movl 20(%ebx), %eax
325 mull %ecx
326 addl %esi, %eax
327 adcl $0, %edx
328 movl %eax, 20(%edi)
329 movl %edx, %esi
330 /* Round 24 */
331 movl 24(%ebx), %eax
332 mull %ecx
333 addl %esi, %eax
334 adcl $0, %edx
335 movl %eax, 24(%edi)
336 movl %edx, %esi
337 /* Round 28 */
338 movl 28(%ebx), %eax
339 mull %ecx
340 addl %esi, %eax
341 adcl $0, %edx
342 movl %eax, 28(%edi)
343 movl %edx, %esi
344
345 addl $32, %ebx
346 addl $32, %edi
347 subl $8, %ebp
348 jz .L004mw_finish
349 jmp .L005mw_loop
350 .L004mw_finish:
351 movl 28(%esp), %ebp
352 andl $7, %ebp
353 jnz .L006mw_finish2
354 jmp .L007mw_end
355 .align ALIGN
356 .L006mw_finish2:
357 /* Tail Round 0 */
358 movl (%ebx), %eax
359 mull %ecx
360 addl %esi, %eax
361 adcl $0, %edx
362 movl %eax, (%edi)
363 movl %edx, %esi
364 decl %ebp
365 jz .L007mw_end
366 /* Tail Round 1 */
367 movl 4(%ebx), %eax
368 mull %ecx
369 addl %esi, %eax
370 adcl $0, %edx
371 movl %eax, 4(%edi)
372 movl %edx, %esi
373 decl %ebp
374 jz .L007mw_end
375 /* Tail Round 2 */
376 movl 8(%ebx), %eax
377 mull %ecx
378 addl %esi, %eax
379 adcl $0, %edx
380 movl %eax, 8(%edi)
381 movl %edx, %esi
382 decl %ebp
383 jz .L007mw_end
384 /* Tail Round 3 */
385 movl 12(%ebx), %eax
386 mull %ecx
387 addl %esi, %eax
388 adcl $0, %edx
389 movl %eax, 12(%edi)
390 movl %edx, %esi
391 decl %ebp
392 jz .L007mw_end
393 /* Tail Round 4 */
394 movl 16(%ebx), %eax
395 mull %ecx
396 addl %esi, %eax
397 adcl $0, %edx
398 movl %eax, 16(%edi)
399 movl %edx, %esi
400 decl %ebp
401 jz .L007mw_end
402 /* Tail Round 5 */
403 movl 20(%ebx), %eax
404 mull %ecx
405 addl %esi, %eax
406 adcl $0, %edx
407 movl %eax, 20(%edi)
408 movl %edx, %esi
409 decl %ebp
410 jz .L007mw_end
411 /* Tail Round 6 */
412 movl 24(%ebx), %eax
413 mull %ecx
414 addl %esi, %eax
415 adcl $0, %edx
416 movl %eax, 24(%edi)
417 movl %edx, %esi
418 .L007mw_end:
419 movl %esi, %eax
420 popl %edi
421 popl %esi
422 popl %ebx
423 popl %ebp
424 ret
425 .bn_mul_words_end:
426 SIZE(bn_mul_words,.bn_mul_words_end-bn_mul_words)
427 .ident "bn_mul_words"
428 .text
429 .align ALIGN
430 .globl bn_sqr_words
431 TYPE(bn_sqr_words,@function)
432 bn_sqr_words:
433 pushl %ebp
434 pushl %ebx
435 pushl %esi
436 pushl %edi
437
438
439 movl 20(%esp), %esi
440 movl 24(%esp), %edi
441 movl 28(%esp), %ebx
442 andl $4294967288, %ebx
443 jz .L008sw_finish
444 .L009sw_loop:
445 /* Round 0 */
446 movl (%edi), %eax
447 mull %eax
448 movl %eax, (%esi)
449 movl %edx, 4(%esi)
450 /* Round 4 */
451 movl 4(%edi), %eax
452 mull %eax
453 movl %eax, 8(%esi)
454 movl %edx, 12(%esi)
455 /* Round 8 */
456 movl 8(%edi), %eax
457 mull %eax
458 movl %eax, 16(%esi)
459 movl %edx, 20(%esi)
460 /* Round 12 */
461 movl 12(%edi), %eax
462 mull %eax
463 movl %eax, 24(%esi)
464 movl %edx, 28(%esi)
465 /* Round 16 */
466 movl 16(%edi), %eax
467 mull %eax
468 movl %eax, 32(%esi)
469 movl %edx, 36(%esi)
470 /* Round 20 */
471 movl 20(%edi), %eax
472 mull %eax
473 movl %eax, 40(%esi)
474 movl %edx, 44(%esi)
475 /* Round 24 */
476 movl 24(%edi), %eax
477 mull %eax
478 movl %eax, 48(%esi)
479 movl %edx, 52(%esi)
480 /* Round 28 */
481 movl 28(%edi), %eax
482 mull %eax
483 movl %eax, 56(%esi)
484 movl %edx, 60(%esi)
485
486 addl $32, %edi
487 addl $64, %esi
488 subl $8, %ebx
489 jnz .L009sw_loop
490 .L008sw_finish:
491 movl 28(%esp), %ebx
492 andl $7, %ebx
493 jz .L010sw_end
494 /* Tail Round 0 */
495 movl (%edi), %eax
496 mull %eax
497 movl %eax, (%esi)
498 decl %ebx
499 movl %edx, 4(%esi)
500 jz .L010sw_end
501 /* Tail Round 1 */
502 movl 4(%edi), %eax
503 mull %eax
504 movl %eax, 8(%esi)
505 decl %ebx
506 movl %edx, 12(%esi)
507 jz .L010sw_end
508 /* Tail Round 2 */
509 movl 8(%edi), %eax
510 mull %eax
511 movl %eax, 16(%esi)
512 decl %ebx
513 movl %edx, 20(%esi)
514 jz .L010sw_end
515 /* Tail Round 3 */
516 movl 12(%edi), %eax
517 mull %eax
518 movl %eax, 24(%esi)
519 decl %ebx
520 movl %edx, 28(%esi)
521 jz .L010sw_end
522 /* Tail Round 4 */
523 movl 16(%edi), %eax
524 mull %eax
525 movl %eax, 32(%esi)
526 decl %ebx
527 movl %edx, 36(%esi)
528 jz .L010sw_end
529 /* Tail Round 5 */
530 movl 20(%edi), %eax
531 mull %eax
532 movl %eax, 40(%esi)
533 decl %ebx
534 movl %edx, 44(%esi)
535 jz .L010sw_end
536 /* Tail Round 6 */
537 movl 24(%edi), %eax
538 mull %eax
539 movl %eax, 48(%esi)
540 movl %edx, 52(%esi)
541 .L010sw_end:
542 popl %edi
543 popl %esi
544 popl %ebx
545 popl %ebp
546 ret
547 .bn_sqr_words_end:
548 SIZE(bn_sqr_words,.bn_sqr_words_end-bn_sqr_words)
549 .ident "bn_sqr_words"
550 .text
551 .align ALIGN
552 .globl bn_div_words
553 TYPE(bn_div_words,@function)
554 bn_div_words:
555 pushl %ebp
556 pushl %ebx
557 pushl %esi
558 pushl %edi
559
560 movl 20(%esp), %edx
561 movl 24(%esp), %eax
562 movl 28(%esp), %ebx
563 divl %ebx
564 popl %edi
565 popl %esi
566 popl %ebx
567 popl %ebp
568 ret
569 .bn_div_words_end:
570 SIZE(bn_div_words,.bn_div_words_end-bn_div_words)
571 .ident "bn_div_words"
572 .text
573 .align ALIGN
574 .globl bn_add_words
575 TYPE(bn_add_words,@function)
576 bn_add_words:
577 pushl %ebp
578 pushl %ebx
579 pushl %esi
580 pushl %edi
581
582
583 movl 20(%esp), %ebx
584 movl 24(%esp), %esi
585 movl 28(%esp), %edi
586 movl 32(%esp), %ebp
587 xorl %eax, %eax
588 andl $4294967288, %ebp
589 jz .L011aw_finish
590 .L012aw_loop:
591 /* Round 0 */
592 movl (%esi), %ecx
593 movl (%edi), %edx
594 addl %eax, %ecx
595 movl $0, %eax
596 adcl %eax, %eax
597 addl %edx, %ecx
598 adcl $0, %eax
599 movl %ecx, (%ebx)
600 /* Round 1 */
601 movl 4(%esi), %ecx
602 movl 4(%edi), %edx
603 addl %eax, %ecx
604 movl $0, %eax
605 adcl %eax, %eax
606 addl %edx, %ecx
607 adcl $0, %eax
608 movl %ecx, 4(%ebx)
609 /* Round 2 */
610 movl 8(%esi), %ecx
611 movl 8(%edi), %edx
612 addl %eax, %ecx
613 movl $0, %eax
614 adcl %eax, %eax
615 addl %edx, %ecx
616 adcl $0, %eax
617 movl %ecx, 8(%ebx)
618 /* Round 3 */
619 movl 12(%esi), %ecx
620 movl 12(%edi), %edx
621 addl %eax, %ecx
622 movl $0, %eax
623 adcl %eax, %eax
624 addl %edx, %ecx
625 adcl $0, %eax
626 movl %ecx, 12(%ebx)
627 /* Round 4 */
628 movl 16(%esi), %ecx
629 movl 16(%edi), %edx
630 addl %eax, %ecx
631 movl $0, %eax
632 adcl %eax, %eax
633 addl %edx, %ecx
634 adcl $0, %eax
635 movl %ecx, 16(%ebx)
636 /* Round 5 */
637 movl 20(%esi), %ecx
638 movl 20(%edi), %edx
639 addl %eax, %ecx
640 movl $0, %eax
641 adcl %eax, %eax
642 addl %edx, %ecx
643 adcl $0, %eax
644 movl %ecx, 20(%ebx)
645 /* Round 6 */
646 movl 24(%esi), %ecx
647 movl 24(%edi), %edx
648 addl %eax, %ecx
649 movl $0, %eax
650 adcl %eax, %eax
651 addl %edx, %ecx
652 adcl $0, %eax
653 movl %ecx, 24(%ebx)
654 /* Round 7 */
655 movl 28(%esi), %ecx
656 movl 28(%edi), %edx
657 addl %eax, %ecx
658 movl $0, %eax
659 adcl %eax, %eax
660 addl %edx, %ecx
661 adcl $0, %eax
662 movl %ecx, 28(%ebx)
663
664 addl $32, %esi
665 addl $32, %edi
666 addl $32, %ebx
667 subl $8, %ebp
668 jnz .L012aw_loop
669 .L011aw_finish:
670 movl 32(%esp), %ebp
671 andl $7, %ebp
672 jz .L013aw_end
673 /* Tail Round 0 */
674 movl (%esi), %ecx
675 movl (%edi), %edx
676 addl %eax, %ecx
677 movl $0, %eax
678 adcl %eax, %eax
679 addl %edx, %ecx
680 adcl $0, %eax
681 decl %ebp
682 movl %ecx, (%ebx)
683 jz .L013aw_end
684 /* Tail Round 1 */
685 movl 4(%esi), %ecx
686 movl 4(%edi), %edx
687 addl %eax, %ecx
688 movl $0, %eax
689 adcl %eax, %eax
690 addl %edx, %ecx
691 adcl $0, %eax
692 decl %ebp
693 movl %ecx, 4(%ebx)
694 jz .L013aw_end
695 /* Tail Round 2 */
696 movl 8(%esi), %ecx
697 movl 8(%edi), %edx
698 addl %eax, %ecx
699 movl $0, %eax
700 adcl %eax, %eax
701 addl %edx, %ecx
702 adcl $0, %eax
703 decl %ebp
704 movl %ecx, 8(%ebx)
705 jz .L013aw_end
706 /* Tail Round 3 */
707 movl 12(%esi), %ecx
708 movl 12(%edi), %edx
709 addl %eax, %ecx
710 movl $0, %eax
711 adcl %eax, %eax
712 addl %edx, %ecx
713 adcl $0, %eax
714 decl %ebp
715 movl %ecx, 12(%ebx)
716 jz .L013aw_end
717 /* Tail Round 4 */
718 movl 16(%esi), %ecx
719 movl 16(%edi), %edx
720 addl %eax, %ecx
721 movl $0, %eax
722 adcl %eax, %eax
723 addl %edx, %ecx
724 adcl $0, %eax
725 decl %ebp
726 movl %ecx, 16(%ebx)
727 jz .L013aw_end
728 /* Tail Round 5 */
729 movl 20(%esi), %ecx
730 movl 20(%edi), %edx
731 addl %eax, %ecx
732 movl $0, %eax
733 adcl %eax, %eax
734 addl %edx, %ecx
735 adcl $0, %eax
736 decl %ebp
737 movl %ecx, 20(%ebx)
738 jz .L013aw_end
739 /* Tail Round 6 */
740 movl 24(%esi), %ecx
741 movl 24(%edi), %edx
742 addl %eax, %ecx
743 movl $0, %eax
744 adcl %eax, %eax
745 addl %edx, %ecx
746 adcl $0, %eax
747 movl %ecx, 24(%ebx)
748 .L013aw_end:
749 popl %edi
750 popl %esi
751 popl %ebx
752 popl %ebp
753 ret
754 .bn_add_words_end:
755 SIZE(bn_add_words,.bn_add_words_end-bn_add_words)
756 .ident "bn_add_words"
757 .text
758 .align ALIGN
759 .globl bn_sub_words
760 TYPE(bn_sub_words,@function)
761 bn_sub_words:
762 pushl %ebp
763 pushl %ebx
764 pushl %esi
765 pushl %edi
766
767
768 movl 20(%esp), %ebx
769 movl 24(%esp), %esi
770 movl 28(%esp), %edi
771 movl 32(%esp), %ebp
772 xorl %eax, %eax
773 andl $4294967288, %ebp
774 jz .L014aw_finish
775 .L015aw_loop:
776 /* Round 0 */
777 movl (%esi), %ecx
778 movl (%edi), %edx
779 subl %eax, %ecx
780 movl $0, %eax
781 adcl %eax, %eax
782 subl %edx, %ecx
783 adcl $0, %eax
784 movl %ecx, (%ebx)
785 /* Round 1 */
786 movl 4(%esi), %ecx
787 movl 4(%edi), %edx
788 subl %eax, %ecx
789 movl $0, %eax
790 adcl %eax, %eax
791 subl %edx, %ecx
792 adcl $0, %eax
793 movl %ecx, 4(%ebx)
794 /* Round 2 */
795 movl 8(%esi), %ecx
796 movl 8(%edi), %edx
797 subl %eax, %ecx
798 movl $0, %eax
799 adcl %eax, %eax
800 subl %edx, %ecx
801 adcl $0, %eax
802 movl %ecx, 8(%ebx)
803 /* Round 3 */
804 movl 12(%esi), %ecx
805 movl 12(%edi), %edx
806 subl %eax, %ecx
807 movl $0, %eax
808 adcl %eax, %eax
809 subl %edx, %ecx
810 adcl $0, %eax
811 movl %ecx, 12(%ebx)
812 /* Round 4 */
813 movl 16(%esi), %ecx
814 movl 16(%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, 16(%ebx)
821 /* Round 5 */
822 movl 20(%esi), %ecx
823 movl 20(%edi), %edx
824 subl %eax, %ecx
825 movl $0, %eax
826 adcl %eax, %eax
827 subl %edx, %ecx
828 adcl $0, %eax
829 movl %ecx, 20(%ebx)
830 /* Round 6 */
831 movl 24(%esi), %ecx
832 movl 24(%edi), %edx
833 subl %eax, %ecx
834 movl $0, %eax
835 adcl %eax, %eax
836 subl %edx, %ecx
837 adcl $0, %eax
838 movl %ecx, 24(%ebx)
839 /* Round 7 */
840 movl 28(%esi), %ecx
841 movl 28(%edi), %edx
842 subl %eax, %ecx
843 movl $0, %eax
844 adcl %eax, %eax
845 subl %edx, %ecx
846 adcl $0, %eax
847 movl %ecx, 28(%ebx)
848
849 addl $32, %esi
850 addl $32, %edi
851 addl $32, %ebx
852 subl $8, %ebp
853 jnz .L015aw_loop
854 .L014aw_finish:
855 movl 32(%esp), %ebp
856 andl $7, %ebp
857 jz .L016aw_end
858 /* Tail Round 0 */
859 movl (%esi), %ecx
860 movl (%edi), %edx
861 subl %eax, %ecx
862 movl $0, %eax
863 adcl %eax, %eax
864 subl %edx, %ecx
865 adcl $0, %eax
866 decl %ebp
867 movl %ecx, (%ebx)
868 jz .L016aw_end
869 /* Tail Round 1 */
870 movl 4(%esi), %ecx
871 movl 4(%edi), %edx
872 subl %eax, %ecx
873 movl $0, %eax
874 adcl %eax, %eax
875 subl %edx, %ecx
876 adcl $0, %eax
877 decl %ebp
878 movl %ecx, 4(%ebx)
879 jz .L016aw_end
880 /* Tail Round 2 */
881 movl 8(%esi), %ecx
882 movl 8(%edi), %edx
883 subl %eax, %ecx
884 movl $0, %eax
885 adcl %eax, %eax
886 subl %edx, %ecx
887 adcl $0, %eax
888 decl %ebp
889 movl %ecx, 8(%ebx)
890 jz .L016aw_end
891 /* Tail Round 3 */
892 movl 12(%esi), %ecx
893 movl 12(%edi), %edx
894 subl %eax, %ecx
895 movl $0, %eax
896 adcl %eax, %eax
897 subl %edx, %ecx
898 adcl $0, %eax
899 decl %ebp
900 movl %ecx, 12(%ebx)
901 jz .L016aw_end
902 /* Tail Round 4 */
903 movl 16(%esi), %ecx
904 movl 16(%edi), %edx
905 subl %eax, %ecx
906 movl $0, %eax
907 adcl %eax, %eax
908 subl %edx, %ecx
909 adcl $0, %eax
910 decl %ebp
911 movl %ecx, 16(%ebx)
912 jz .L016aw_end
913 /* Tail Round 5 */
914 movl 20(%esi), %ecx
915 movl 20(%edi), %edx
916 subl %eax, %ecx
917 movl $0, %eax
918 adcl %eax, %eax
919 subl %edx, %ecx
920 adcl $0, %eax
921 decl %ebp
922 movl %ecx, 20(%ebx)
923 jz .L016aw_end
924 /* Tail Round 6 */
925 movl 24(%esi), %ecx
926 movl 24(%edi), %edx
927 subl %eax, %ecx
928 movl $0, %eax
929 adcl %eax, %eax
930 subl %edx, %ecx
931 adcl $0, %eax
932 movl %ecx, 24(%ebx)
933 .L016aw_end:
934 popl %edi
935 popl %esi
936 popl %ebx
937 popl %ebp
938 ret
939 .bn_sub_words_end:
940 SIZE(bn_sub_words,.bn_sub_words_end-bn_sub_words)
941 .ident "bn_sub_words"
942 .text
943 .align ALIGN
944 .globl bn_mul_comba8
945 TYPE(bn_mul_comba8,@function)
946 bn_mul_comba8:
947 pushl %esi
948 movl 12(%esp), %esi
949 pushl %edi
950 movl 20(%esp), %edi
951 pushl %ebp
952 pushl %ebx
953 xorl %ebx, %ebx
954 movl (%esi), %eax
955 xorl %ecx, %ecx
956 movl (%edi), %edx
957 /* ################## Calculate word 0 */
958 xorl %ebp, %ebp
959 /* mul a[0]*b[0] */
960 mull %edx
961 addl %eax, %ebx
962 movl 20(%esp), %eax
963 adcl %edx, %ecx
964 movl (%edi), %edx
965 adcl $0, %ebp
966 movl %ebx, (%eax)
967 movl 4(%esi), %eax
968 /* saved r[0] */
969 /* ################## Calculate word 1 */
970 xorl %ebx, %ebx
971 /* mul a[1]*b[0] */
972 mull %edx
973 addl %eax, %ecx
974 movl (%esi), %eax
975 adcl %edx, %ebp
976 movl 4(%edi), %edx
977 adcl $0, %ebx
978 /* mul a[0]*b[1] */
979 mull %edx
980 addl %eax, %ecx
981 movl 20(%esp), %eax
982 adcl %edx, %ebp
983 movl (%edi), %edx
984 adcl $0, %ebx
985 movl %ecx, 4(%eax)
986 movl 8(%esi), %eax
987 /* saved r[1] */
988 /* ################## Calculate word 2 */
989 xorl %ecx, %ecx
990 /* mul a[2]*b[0] */
991 mull %edx
992 addl %eax, %ebp
993 movl 4(%esi), %eax
994 adcl %edx, %ebx
995 movl 4(%edi), %edx
996 adcl $0, %ecx
997 /* mul a[1]*b[1] */
998 mull %edx
999 addl %eax, %ebp
1000 movl (%esi), %eax
1001 adcl %edx, %ebx
1002 movl 8(%edi), %edx
1003 adcl $0, %ecx
1004 /* mul a[0]*b[2] */
1005 mull %edx
1006 addl %eax, %ebp
1007 movl 20(%esp), %eax
1008 adcl %edx, %ebx
1009 movl (%edi), %edx
1010 adcl $0, %ecx
1011 movl %ebp, 8(%eax)
1012 movl 12(%esi), %eax
1013 /* saved r[2] */
1014 /* ################## Calculate word 3 */
1015 xorl %ebp, %ebp
1016 /* mul a[3]*b[0] */
1017 mull %edx
1018 addl %eax, %ebx
1019 movl 8(%esi), %eax
1020 adcl %edx, %ecx
1021 movl 4(%edi), %edx
1022 adcl $0, %ebp
1023 /* mul a[2]*b[1] */
1024 mull %edx
1025 addl %eax, %ebx
1026 movl 4(%esi), %eax
1027 adcl %edx, %ecx
1028 movl 8(%edi), %edx
1029 adcl $0, %ebp
1030 /* mul a[1]*b[2] */
1031 mull %edx
1032 addl %eax, %ebx
1033 movl (%esi), %eax
1034 adcl %edx, %ecx
1035 movl 12(%edi), %edx
1036 adcl $0, %ebp
1037 /* mul a[0]*b[3] */
1038 mull %edx
1039 addl %eax, %ebx
1040 movl 20(%esp), %eax
1041 adcl %edx, %ecx
1042 movl (%edi), %edx
1043 adcl $0, %ebp
1044 movl %ebx, 12(%eax)
1045 movl 16(%esi), %eax
1046 /* saved r[3] */
1047 /* ################## Calculate word 4 */
1048 xorl %ebx, %ebx
1049 /* mul a[4]*b[0] */
1050 mull %edx
1051 addl %eax, %ecx
1052 movl 12(%esi), %eax
1053 adcl %edx, %ebp
1054 movl 4(%edi), %edx
1055 adcl $0, %ebx
1056 /* mul a[3]*b[1] */
1057 mull %edx
1058 addl %eax, %ecx
1059 movl 8(%esi), %eax
1060 adcl %edx, %ebp
1061 movl 8(%edi), %edx
1062 adcl $0, %ebx
1063 /* mul a[2]*b[2] */
1064 mull %edx
1065 addl %eax, %ecx
1066 movl 4(%esi), %eax
1067 adcl %edx, %ebp
1068 movl 12(%edi), %edx
1069 adcl $0, %ebx
1070 /* mul a[1]*b[3] */
1071 mull %edx
1072 addl %eax, %ecx
1073 movl (%esi), %eax
1074 adcl %edx, %ebp
1075 movl 16(%edi), %edx
1076 adcl $0, %ebx
1077 /* mul a[0]*b[4] */
1078 mull %edx
1079 addl %eax, %ecx
1080 movl 20(%esp), %eax
1081 adcl %edx, %ebp
1082 movl (%edi), %edx
1083 adcl $0, %ebx
1084 movl %ecx, 16(%eax)
1085 movl 20(%esi), %eax
1086 /* saved r[4] */
1087 /* ################## Calculate word 5 */
1088 xorl %ecx, %ecx
1089 /* mul a[5]*b[0] */
1090 mull %edx
1091 addl %eax, %ebp
1092 movl 16(%esi), %eax
1093 adcl %edx, %ebx
1094 movl 4(%edi), %edx
1095 adcl $0, %ecx
1096 /* mul a[4]*b[1] */
1097 mull %edx
1098 addl %eax, %ebp
1099 movl 12(%esi), %eax
1100 adcl %edx, %ebx
1101 movl 8(%edi), %edx
1102 adcl $0, %ecx
1103 /* mul a[3]*b[2] */
1104 mull %edx
1105 addl %eax, %ebp
1106 movl 8(%esi), %eax
1107 adcl %edx, %ebx
1108 movl 12(%edi), %edx
1109 adcl $0, %ecx
1110 /* mul a[2]*b[3] */
1111 mull %edx
1112 addl %eax, %ebp
1113 movl 4(%esi), %eax
1114 adcl %edx, %ebx
1115 movl 16(%edi), %edx
1116 adcl $0, %ecx
1117 /* mul a[1]*b[4] */
1118 mull %edx
1119 addl %eax, %ebp
1120 movl (%esi), %eax
1121 adcl %edx, %ebx
1122 movl 20(%edi), %edx
1123 adcl $0, %ecx
1124 /* mul a[0]*b[5] */
1125 mull %edx
1126 addl %eax, %ebp
1127 movl 20(%esp), %eax
1128 adcl %edx, %ebx
1129 movl (%edi), %edx
1130 adcl $0, %ecx
1131 movl %ebp, 20(%eax)
1132 movl 24(%esi), %eax
1133 /* saved r[5] */
1134 /* ################## Calculate word 6 */
1135 xorl %ebp, %ebp
1136 /* mul a[6]*b[0] */
1137 mull %edx
1138 addl %eax, %ebx
1139 movl 20(%esi), %eax
1140 adcl %edx, %ecx
1141 movl 4(%edi), %edx
1142 adcl $0, %ebp
1143 /* mul a[5]*b[1] */
1144 mull %edx
1145 addl %eax, %ebx
1146 movl 16(%esi), %eax
1147 adcl %edx, %ecx
1148 movl 8(%edi), %edx
1149 adcl $0, %ebp
1150 /* mul a[4]*b[2] */
1151 mull %edx
1152 addl %eax, %ebx
1153 movl 12(%esi), %eax
1154 adcl %edx, %ecx
1155 movl 12(%edi), %edx
1156 adcl $0, %ebp
1157 /* mul a[3]*b[3] */
1158 mull %edx
1159 addl %eax, %ebx
1160 movl 8(%esi), %eax
1161 adcl %edx, %ecx
1162 movl 16(%edi), %edx
1163 adcl $0, %ebp
1164 /* mul a[2]*b[4] */
1165 mull %edx
1166 addl %eax, %ebx
1167 movl 4(%esi), %eax
1168 adcl %edx, %ecx
1169 movl 20(%edi), %edx
1170 adcl $0, %ebp
1171 /* mul a[1]*b[5] */
1172 mull %edx
1173 addl %eax, %ebx
1174 movl (%esi), %eax
1175 adcl %edx, %ecx
1176 movl 24(%edi), %edx
1177 adcl $0, %ebp
1178 /* mul a[0]*b[6] */
1179 mull %edx
1180 addl %eax, %ebx
1181 movl 20(%esp), %eax
1182 adcl %edx, %ecx
1183 movl (%edi), %edx
1184 adcl $0, %ebp
1185 movl %ebx, 24(%eax)
1186 movl 28(%esi), %eax
1187 /* saved r[6] */
1188 /* ################## Calculate word 7 */
1189 xorl %ebx, %ebx
1190 /* mul a[7]*b[0] */
1191 mull %edx
1192 addl %eax, %ecx
1193 movl 24(%esi), %eax
1194 adcl %edx, %ebp
1195 movl 4(%edi), %edx
1196 adcl $0, %ebx
1197 /* mul a[6]*b[1] */
1198 mull %edx
1199 addl %eax, %ecx
1200 movl 20(%esi), %eax
1201 adcl %edx, %ebp
1202 movl 8(%edi), %edx
1203 adcl $0, %ebx
1204 /* mul a[5]*b[2] */
1205 mull %edx
1206 addl %eax, %ecx
1207 movl 16(%esi), %eax
1208 adcl %edx, %ebp
1209 movl 12(%edi), %edx
1210 adcl $0, %ebx
1211 /* mul a[4]*b[3] */
1212 mull %edx
1213 addl %eax, %ecx
1214 movl 12(%esi), %eax
1215 adcl %edx, %ebp
1216 movl 16(%edi), %edx
1217 adcl $0, %ebx
1218 /* mul a[3]*b[4] */
1219 mull %edx
1220 addl %eax, %ecx
1221 movl 8(%esi), %eax
1222 adcl %edx, %ebp
1223 movl 20(%edi), %edx
1224 adcl $0, %ebx
1225 /* mul a[2]*b[5] */
1226 mull %edx
1227 addl %eax, %ecx
1228 movl 4(%esi), %eax
1229 adcl %edx, %ebp
1230 movl 24(%edi), %edx
1231 adcl $0, %ebx
1232 /* mul a[1]*b[6] */
1233 mull %edx
1234 addl %eax, %ecx
1235 movl (%esi), %eax
1236 adcl %edx, %ebp
1237 movl 28(%edi), %edx
1238 adcl $0, %ebx
1239 /* mul a[0]*b[7] */
1240 mull %edx
1241 addl %eax, %ecx
1242 movl 20(%esp), %eax
1243 adcl %edx, %ebp
1244 movl 4(%edi), %edx
1245 adcl $0, %ebx
1246 movl %ecx, 28(%eax)
1247 movl 28(%esi), %eax
1248 /* saved r[7] */
1249 /* ################## Calculate word 8 */
1250 xorl %ecx, %ecx
1251 /* mul a[7]*b[1] */
1252 mull %edx
1253 addl %eax, %ebp
1254 movl 24(%esi), %eax
1255 adcl %edx, %ebx
1256 movl 8(%edi), %edx
1257 adcl $0, %ecx
1258 /* mul a[6]*b[2] */
1259 mull %edx
1260 addl %eax, %ebp
1261 movl 20(%esi), %eax
1262 adcl %edx, %ebx
1263 movl 12(%edi), %edx
1264 adcl $0, %ecx
1265 /* mul a[5]*b[3] */
1266 mull %edx
1267 addl %eax, %ebp
1268 movl 16(%esi), %eax
1269 adcl %edx, %ebx
1270 movl 16(%edi), %edx
1271 adcl $0, %ecx
1272 /* mul a[4]*b[4] */
1273 mull %edx
1274 addl %eax, %ebp
1275 movl 12(%esi), %eax
1276 adcl %edx, %ebx
1277 movl 20(%edi), %edx
1278 adcl $0, %ecx
1279 /* mul a[3]*b[5] */
1280 mull %edx
1281 addl %eax, %ebp
1282 movl 8(%esi), %eax
1283 adcl %edx, %ebx
1284 movl 24(%edi), %edx
1285 adcl $0, %ecx
1286 /* mul a[2]*b[6] */
1287 mull %edx
1288 addl %eax, %ebp
1289 movl 4(%esi), %eax
1290 adcl %edx, %ebx
1291 movl 28(%edi), %edx
1292 adcl $0, %ecx
1293 /* mul a[1]*b[7] */
1294 mull %edx
1295 addl %eax, %ebp
1296 movl 20(%esp), %eax
1297 adcl %edx, %ebx
1298 movl 8(%edi), %edx
1299 adcl $0, %ecx
1300 movl %ebp, 32(%eax)
1301 movl 28(%esi), %eax
1302 /* saved r[8] */
1303 /* ################## Calculate word 9 */
1304 xorl %ebp, %ebp
1305 /* mul a[7]*b[2] */
1306 mull %edx
1307 addl %eax, %ebx
1308 movl 24(%esi), %eax
1309 adcl %edx, %ecx
1310 movl 12(%edi), %edx
1311 adcl $0, %ebp
1312 /* mul a[6]*b[3] */
1313 mull %edx
1314 addl %eax, %ebx
1315 movl 20(%esi), %eax
1316 adcl %edx, %ecx
1317 movl 16(%edi), %edx
1318 adcl $0, %ebp
1319 /* mul a[5]*b[4] */
1320 mull %edx
1321 addl %eax, %ebx
1322 movl 16(%esi), %eax
1323 adcl %edx, %ecx
1324 movl 20(%edi), %edx
1325 adcl $0, %ebp
1326 /* mul a[4]*b[5] */
1327 mull %edx
1328 addl %eax, %ebx
1329 movl 12(%esi), %eax
1330 adcl %edx, %ecx
1331 movl 24(%edi), %edx
1332 adcl $0, %ebp
1333 /* mul a[3]*b[6] */
1334 mull %edx
1335 addl %eax, %ebx
1336 movl 8(%esi), %eax
1337 adcl %edx, %ecx
1338 movl 28(%edi), %edx
1339 adcl $0, %ebp
1340 /* mul a[2]*b[7] */
1341 mull %edx
1342 addl %eax, %ebx
1343 movl 20(%esp), %eax
1344 adcl %edx, %ecx
1345 movl 12(%edi), %edx
1346 adcl $0, %ebp
1347 movl %ebx, 36(%eax)
1348 movl 28(%esi), %eax
1349 /* saved r[9] */
1350 /* ################## Calculate word 10 */
1351 xorl %ebx, %ebx
1352 /* mul a[7]*b[3] */
1353 mull %edx
1354 addl %eax, %ecx
1355 movl 24(%esi), %eax
1356 adcl %edx, %ebp
1357 movl 16(%edi), %edx
1358 adcl $0, %ebx
1359 /* mul a[6]*b[4] */
1360 mull %edx
1361 addl %eax, %ecx
1362 movl 20(%esi), %eax
1363 adcl %edx, %ebp
1364 movl 20(%edi), %edx
1365 adcl $0, %ebx
1366 /* mul a[5]*b[5] */
1367 mull %edx
1368 addl %eax, %ecx
1369 movl 16(%esi), %eax
1370 adcl %edx, %ebp
1371 movl 24(%edi), %edx
1372 adcl $0, %ebx
1373 /* mul a[4]*b[6] */
1374 mull %edx
1375 addl %eax, %ecx
1376 movl 12(%esi), %eax
1377 adcl %edx, %ebp
1378 movl 28(%edi), %edx
1379 adcl $0, %ebx
1380 /* mul a[3]*b[7] */
1381 mull %edx
1382 addl %eax, %ecx
1383 movl 20(%esp), %eax
1384 adcl %edx, %ebp
1385 movl 16(%edi), %edx
1386 adcl $0, %ebx
1387 movl %ecx, 40(%eax)
1388 movl 28(%esi), %eax
1389 /* saved r[10] */
1390 /* ################## Calculate word 11 */
1391 xorl %ecx, %ecx
1392 /* mul a[7]*b[4] */
1393 mull %edx
1394 addl %eax, %ebp
1395 movl 24(%esi), %eax
1396 adcl %edx, %ebx
1397 movl 20(%edi), %edx
1398 adcl $0, %ecx
1399 /* mul a[6]*b[5] */
1400 mull %edx
1401 addl %eax, %ebp
1402 movl 20(%esi), %eax
1403 adcl %edx, %ebx
1404 movl 24(%edi), %edx
1405 adcl $0, %ecx
1406 /* mul a[5]*b[6] */
1407 mull %edx
1408 addl %eax, %ebp
1409 movl 16(%esi), %eax
1410 adcl %edx, %ebx
1411 movl 28(%edi), %edx
1412 adcl $0, %ecx
1413 /* mul a[4]*b[7] */
1414 mull %edx
1415 addl %eax, %ebp
1416 movl 20(%esp), %eax
1417 adcl %edx, %ebx
1418 movl 20(%edi), %edx
1419 adcl $0, %ecx
1420 movl %ebp, 44(%eax)
1421 movl 28(%esi), %eax
1422 /* saved r[11] */
1423 /* ################## Calculate word 12 */
1424 xorl %ebp, %ebp
1425 /* mul a[7]*b[5] */
1426 mull %edx
1427 addl %eax, %ebx
1428 movl 24(%esi), %eax
1429 adcl %edx, %ecx
1430 movl 24(%edi), %edx
1431 adcl $0, %ebp
1432 /* mul a[6]*b[6] */
1433 mull %edx
1434 addl %eax, %ebx
1435 movl 20(%esi), %eax
1436 adcl %edx, %ecx
1437 movl 28(%edi), %edx
1438 adcl $0, %ebp
1439 /* mul a[5]*b[7] */
1440 mull %edx
1441 addl %eax, %ebx
1442 movl 20(%esp), %eax
1443 adcl %edx, %ecx
1444 movl 24(%edi), %edx
1445 adcl $0, %ebp
1446 movl %ebx, 48(%eax)
1447 movl 28(%esi), %eax
1448 /* saved r[12] */
1449 /* ################## Calculate word 13 */
1450 xorl %ebx, %ebx
1451 /* mul a[7]*b[6] */
1452 mull %edx
1453 addl %eax, %ecx
1454 movl 24(%esi), %eax
1455 adcl %edx, %ebp
1456 movl 28(%edi), %edx
1457 adcl $0, %ebx
1458 /* mul a[6]*b[7] */
1459 mull %edx
1460 addl %eax, %ecx
1461 movl 20(%esp), %eax
1462 adcl %edx, %ebp
1463 movl 28(%edi), %edx
1464 adcl $0, %ebx
1465 movl %ecx, 52(%eax)
1466 movl 28(%esi), %eax
1467 /* saved r[13] */
1468 /* ################## Calculate word 14 */
1469 xorl %ecx, %ecx
1470 /* mul a[7]*b[7] */
1471 mull %edx
1472 addl %eax, %ebp
1473 movl 20(%esp), %eax
1474 adcl %edx, %ebx
1475 adcl $0, %ecx
1476 movl %ebp, 56(%eax)
1477 /* saved r[14] */
1478 /* save r[15] */
1479 movl %ebx, 60(%eax)
1480 popl %ebx
1481 popl %ebp
1482 popl %edi
1483 popl %esi
1484 ret
1485 .bn_mul_comba8_end:
1486 SIZE(bn_mul_comba8,.bn_mul_comba8_end-bn_mul_comba8)
1487 .ident "desasm.pl"
1488 .text
1489 .align ALIGN
1490 .globl bn_mul_comba4
1491 TYPE(bn_mul_comba4,@function)
1492 bn_mul_comba4:
1493 pushl %esi
1494 movl 12(%esp), %esi
1495 pushl %edi
1496 movl 20(%esp), %edi
1497 pushl %ebp
1498 pushl %ebx
1499 xorl %ebx, %ebx
1500 movl (%esi), %eax
1501 xorl %ecx, %ecx
1502 movl (%edi), %edx
1503 /* ################## Calculate word 0 */
1504 xorl %ebp, %ebp
1505 /* mul a[0]*b[0] */
1506 mull %edx
1507 addl %eax, %ebx
1508 movl 20(%esp), %eax
1509 adcl %edx, %ecx
1510 movl (%edi), %edx
1511 adcl $0, %ebp
1512 movl %ebx, (%eax)
1513 movl 4(%esi), %eax
1514 /* saved r[0] */
1515 /* ################## Calculate word 1 */
1516 xorl %ebx, %ebx
1517 /* mul a[1]*b[0] */
1518 mull %edx
1519 addl %eax, %ecx
1520 movl (%esi), %eax
1521 adcl %edx, %ebp
1522 movl 4(%edi), %edx
1523 adcl $0, %ebx
1524 /* mul a[0]*b[1] */
1525 mull %edx
1526 addl %eax, %ecx
1527 movl 20(%esp), %eax
1528 adcl %edx, %ebp
1529 movl (%edi), %edx
1530 adcl $0, %ebx
1531 movl %ecx, 4(%eax)
1532 movl 8(%esi), %eax
1533 /* saved r[1] */
1534 /* ################## Calculate word 2 */
1535 xorl %ecx, %ecx
1536 /* mul a[2]*b[0] */
1537 mull %edx
1538 addl %eax, %ebp
1539 movl 4(%esi), %eax
1540 adcl %edx, %ebx
1541 movl 4(%edi), %edx
1542 adcl $0, %ecx
1543 /* mul a[1]*b[1] */
1544 mull %edx
1545 addl %eax, %ebp
1546 movl (%esi), %eax
1547 adcl %edx, %ebx
1548 movl 8(%edi), %edx
1549 adcl $0, %ecx
1550 /* mul a[0]*b[2] */
1551 mull %edx
1552 addl %eax, %ebp
1553 movl 20(%esp), %eax
1554 adcl %edx, %ebx
1555 movl (%edi), %edx
1556 adcl $0, %ecx
1557 movl %ebp, 8(%eax)
1558 movl 12(%esi), %eax
1559 /* saved r[2] */
1560 /* ################## Calculate word 3 */
1561 xorl %ebp, %ebp
1562 /* mul a[3]*b[0] */
1563 mull %edx
1564 addl %eax, %ebx
1565 movl 8(%esi), %eax
1566 adcl %edx, %ecx
1567 movl 4(%edi), %edx
1568 adcl $0, %ebp
1569 /* mul a[2]*b[1] */
1570 mull %edx
1571 addl %eax, %ebx
1572 movl 4(%esi), %eax
1573 adcl %edx, %ecx
1574 movl 8(%edi), %edx
1575 adcl $0, %ebp
1576 /* mul a[1]*b[2] */
1577 mull %edx
1578 addl %eax, %ebx
1579 movl (%esi), %eax
1580 adcl %edx, %ecx
1581 movl 12(%edi), %edx
1582 adcl $0, %ebp
1583 /* mul a[0]*b[3] */
1584 mull %edx
1585 addl %eax, %ebx
1586 movl 20(%esp), %eax
1587 adcl %edx, %ecx
1588 movl 4(%edi), %edx
1589 adcl $0, %ebp
1590 movl %ebx, 12(%eax)
1591 movl 12(%esi), %eax
1592 /* saved r[3] */
1593 /* ################## Calculate word 4 */
1594 xorl %ebx, %ebx
1595 /* mul a[3]*b[1] */
1596 mull %edx
1597 addl %eax, %ecx
1598 movl 8(%esi), %eax
1599 adcl %edx, %ebp
1600 movl 8(%edi), %edx
1601 adcl $0, %ebx
1602 /* mul a[2]*b[2] */
1603 mull %edx
1604 addl %eax, %ecx
1605 movl 4(%esi), %eax
1606 adcl %edx, %ebp
1607 movl 12(%edi), %edx
1608 adcl $0, %ebx
1609 /* mul a[1]*b[3] */
1610 mull %edx
1611 addl %eax, %ecx
1612 movl 20(%esp), %eax
1613 adcl %edx, %ebp
1614 movl 8(%edi), %edx
1615 adcl $0, %ebx
1616 movl %ecx, 16(%eax)
1617 movl 12(%esi), %eax
1618 /* saved r[4] */
1619 /* ################## Calculate word 5 */
1620 xorl %ecx, %ecx
1621 /* mul a[3]*b[2] */
1622 mull %edx
1623 addl %eax, %ebp
1624 movl 8(%esi), %eax
1625 adcl %edx, %ebx
1626 movl 12(%edi), %edx
1627 adcl $0, %ecx
1628 /* mul a[2]*b[3] */
1629 mull %edx
1630 addl %eax, %ebp
1631 movl 20(%esp), %eax
1632 adcl %edx, %ebx
1633 movl 12(%edi), %edx
1634 adcl $0, %ecx
1635 movl %ebp, 20(%eax)
1636 movl 12(%esi), %eax
1637 /* saved r[5] */
1638 /* ################## Calculate word 6 */
1639 xorl %ebp, %ebp
1640 /* mul a[3]*b[3] */
1641 mull %edx
1642 addl %eax, %ebx
1643 movl 20(%esp), %eax
1644 adcl %edx, %ecx
1645 adcl $0, %ebp
1646 movl %ebx, 24(%eax)
1647 /* saved r[6] */
1648 /* save r[7] */
1649 movl %ecx, 28(%eax)
1650 popl %ebx
1651 popl %ebp
1652 popl %edi
1653 popl %esi
1654 ret
1655 .bn_mul_comba4_end:
1656 SIZE(bn_mul_comba4,.bn_mul_comba4_end-bn_mul_comba4)
1657 .ident "desasm.pl"
1658 .text
1659 .align ALIGN
1660 .globl bn_sqr_comba8
1661 TYPE(bn_sqr_comba8,@function)
1662 bn_sqr_comba8:
1663 pushl %esi
1664 pushl %edi
1665 pushl %ebp
1666 pushl %ebx
1667 movl 20(%esp), %edi
1668 movl 24(%esp), %esi
1669 xorl %ebx, %ebx
1670 xorl %ecx, %ecx
1671 movl (%esi), %eax
1672 /* ############### Calculate word 0 */
1673 xorl %ebp, %ebp
1674 /* sqr a[0]*a[0] */
1675 mull %eax
1676 addl %eax, %ebx
1677 adcl %edx, %ecx
1678 movl (%esi), %edx
1679 adcl $0, %ebp
1680 movl %ebx, (%edi)
1681 movl 4(%esi), %eax
1682 /* saved r[0] */
1683 /* ############### Calculate word 1 */
1684 xorl %ebx, %ebx
1685 /* sqr a[1]*a[0] */
1686 mull %edx
1687 addl %eax, %eax
1688 adcl %edx, %edx
1689 adcl $0, %ebx
1690 addl %eax, %ecx
1691 adcl %edx, %ebp
1692 movl 8(%esi), %eax
1693 adcl $0, %ebx
1694 movl %ecx, 4(%edi)
1695 movl (%esi), %edx
1696 /* saved r[1] */
1697 /* ############### Calculate word 2 */
1698 xorl %ecx, %ecx
1699 /* sqr a[2]*a[0] */
1700 mull %edx
1701 addl %eax, %eax
1702 adcl %edx, %edx
1703 adcl $0, %ecx
1704 addl %eax, %ebp
1705 adcl %edx, %ebx
1706 movl 4(%esi), %eax
1707 adcl $0, %ecx
1708 /* sqr a[1]*a[1] */
1709 mull %eax
1710 addl %eax, %ebp
1711 adcl %edx, %ebx
1712 movl (%esi), %edx
1713 adcl $0, %ecx
1714 movl %ebp, 8(%edi)
1715 movl 12(%esi), %eax
1716 /* saved r[2] */
1717 /* ############### Calculate word 3 */
1718 xorl %ebp, %ebp
1719 /* sqr a[3]*a[0] */
1720 mull %edx
1721 addl %eax, %eax
1722 adcl %edx, %edx
1723 adcl $0, %ebp
1724 addl %eax, %ebx
1725 adcl %edx, %ecx
1726 movl 8(%esi), %eax
1727 adcl $0, %ebp
1728 movl 4(%esi), %edx
1729 /* sqr a[2]*a[1] */
1730 mull %edx
1731 addl %eax, %eax
1732 adcl %edx, %edx
1733 adcl $0, %ebp
1734 addl %eax, %ebx
1735 adcl %edx, %ecx
1736 movl 16(%esi), %eax
1737 adcl $0, %ebp
1738 movl %ebx, 12(%edi)
1739 movl (%esi), %edx
1740 /* saved r[3] */
1741 /* ############### Calculate word 4 */
1742 xorl %ebx, %ebx
1743 /* sqr a[4]*a[0] */
1744 mull %edx
1745 addl %eax, %eax
1746 adcl %edx, %edx
1747 adcl $0, %ebx
1748 addl %eax, %ecx
1749 adcl %edx, %ebp
1750 movl 12(%esi), %eax
1751 adcl $0, %ebx
1752 movl 4(%esi), %edx
1753 /* sqr a[3]*a[1] */
1754 mull %edx
1755 addl %eax, %eax
1756 adcl %edx, %edx
1757 adcl $0, %ebx
1758 addl %eax, %ecx
1759 adcl %edx, %ebp
1760 movl 8(%esi), %eax
1761 adcl $0, %ebx
1762 /* sqr a[2]*a[2] */
1763 mull %eax
1764 addl %eax, %ecx
1765 adcl %edx, %ebp
1766 movl (%esi), %edx
1767 adcl $0, %ebx
1768 movl %ecx, 16(%edi)
1769 movl 20(%esi), %eax
1770 /* saved r[4] */
1771 /* ############### Calculate word 5 */
1772 xorl %ecx, %ecx
1773 /* sqr a[5]*a[0] */
1774 mull %edx
1775 addl %eax, %eax
1776 adcl %edx, %edx
1777 adcl $0, %ecx
1778 addl %eax, %ebp
1779 adcl %edx, %ebx
1780 movl 16(%esi), %eax
1781 adcl $0, %ecx
1782 movl 4(%esi), %edx
1783 /* sqr a[4]*a[1] */
1784 mull %edx
1785 addl %eax, %eax
1786 adcl %edx, %edx
1787 adcl $0, %ecx
1788 addl %eax, %ebp
1789 adcl %edx, %ebx
1790 movl 12(%esi), %eax
1791 adcl $0, %ecx
1792 movl 8(%esi), %edx
1793 /* sqr a[3]*a[2] */
1794 mull %edx
1795 addl %eax, %eax
1796 adcl %edx, %edx
1797 adcl $0, %ecx
1798 addl %eax, %ebp
1799 adcl %edx, %ebx
1800 movl 24(%esi), %eax
1801 adcl $0, %ecx
1802 movl %ebp, 20(%edi)
1803 movl (%esi), %edx
1804 /* saved r[5] */
1805 /* ############### Calculate word 6 */
1806 xorl %ebp, %ebp
1807 /* sqr a[6]*a[0] */
1808 mull %edx
1809 addl %eax, %eax
1810 adcl %edx, %edx
1811 adcl $0, %ebp
1812 addl %eax, %ebx
1813 adcl %edx, %ecx
1814 movl 20(%esi), %eax
1815 adcl $0, %ebp
1816 movl 4(%esi), %edx
1817 /* sqr a[5]*a[1] */
1818 mull %edx
1819 addl %eax, %eax
1820 adcl %edx, %edx
1821 adcl $0, %ebp
1822 addl %eax, %ebx
1823 adcl %edx, %ecx
1824 movl 16(%esi), %eax
1825 adcl $0, %ebp
1826 movl 8(%esi), %edx
1827 /* sqr a[4]*a[2] */
1828 mull %edx
1829 addl %eax, %eax
1830 adcl %edx, %edx
1831 adcl $0, %ebp
1832 addl %eax, %ebx
1833 adcl %edx, %ecx
1834 movl 12(%esi), %eax
1835 adcl $0, %ebp
1836 /* sqr a[3]*a[3] */
1837 mull %eax
1838 addl %eax, %ebx
1839 adcl %edx, %ecx
1840 movl (%esi), %edx
1841 adcl $0, %ebp
1842 movl %ebx, 24(%edi)
1843 movl 28(%esi), %eax
1844 /* saved r[6] */
1845 /* ############### Calculate word 7 */
1846 xorl %ebx, %ebx
1847 /* sqr a[7]*a[0] */
1848 mull %edx
1849 addl %eax, %eax
1850 adcl %edx, %edx
1851 adcl $0, %ebx
1852 addl %eax, %ecx
1853 adcl %edx, %ebp
1854 movl 24(%esi), %eax
1855 adcl $0, %ebx
1856 movl 4(%esi), %edx
1857 /* sqr a[6]*a[1] */
1858 mull %edx
1859 addl %eax, %eax
1860 adcl %edx, %edx
1861 adcl $0, %ebx
1862 addl %eax, %ecx
1863 adcl %edx, %ebp
1864 movl 20(%esi), %eax
1865 adcl $0, %ebx
1866 movl 8(%esi), %edx
1867 /* sqr a[5]*a[2] */
1868 mull %edx
1869 addl %eax, %eax
1870 adcl %edx, %edx
1871 adcl $0, %ebx
1872 addl %eax, %ecx
1873 adcl %edx, %ebp
1874 movl 16(%esi), %eax
1875 adcl $0, %ebx
1876 movl 12(%esi), %edx
1877 /* sqr a[4]*a[3] */
1878 mull %edx
1879 addl %eax, %eax
1880 adcl %edx, %edx
1881 adcl $0, %ebx
1882 addl %eax, %ecx
1883 adcl %edx, %ebp
1884 movl 28(%esi), %eax
1885 adcl $0, %ebx
1886 movl %ecx, 28(%edi)
1887 movl 4(%esi), %edx
1888 /* saved r[7] */
1889 /* ############### Calculate word 8 */
1890 xorl %ecx, %ecx
1891 /* sqr a[7]*a[1] */
1892 mull %edx
1893 addl %eax, %eax
1894 adcl %edx, %edx
1895 adcl $0, %ecx
1896 addl %eax, %ebp
1897 adcl %edx, %ebx
1898 movl 24(%esi), %eax
1899 adcl $0, %ecx
1900 movl 8(%esi), %edx
1901 /* sqr a[6]*a[2] */
1902 mull %edx
1903 addl %eax, %eax
1904 adcl %edx, %edx
1905 adcl $0, %ecx
1906 addl %eax, %ebp
1907 adcl %edx, %ebx
1908 movl 20(%esi), %eax
1909 adcl $0, %ecx
1910 movl 12(%esi), %edx
1911 /* sqr a[5]*a[3] */
1912 mull %edx
1913 addl %eax, %eax
1914 adcl %edx, %edx
1915 adcl $0, %ecx
1916 addl %eax, %ebp
1917 adcl %edx, %ebx
1918 movl 16(%esi), %eax
1919 adcl $0, %ecx
1920 /* sqr a[4]*a[4] */
1921 mull %eax
1922 addl %eax, %ebp
1923 adcl %edx, %ebx
1924 movl 8(%esi), %edx
1925 adcl $0, %ecx
1926 movl %ebp, 32(%edi)
1927 movl 28(%esi), %eax
1928 /* saved r[8] */
1929 /* ############### Calculate word 9 */
1930 xorl %ebp, %ebp
1931 /* sqr a[7]*a[2] */
1932 mull %edx
1933 addl %eax, %eax
1934 adcl %edx, %edx
1935 adcl $0, %ebp
1936 addl %eax, %ebx
1937 adcl %edx, %ecx
1938 movl 24(%esi), %eax
1939 adcl $0, %ebp
1940 movl 12(%esi), %edx
1941 /* sqr a[6]*a[3] */
1942 mull %edx
1943 addl %eax, %eax
1944 adcl %edx, %edx
1945 adcl $0, %ebp
1946 addl %eax, %ebx
1947 adcl %edx, %ecx
1948 movl 20(%esi), %eax
1949 adcl $0, %ebp
1950 movl 16(%esi), %edx
1951 /* sqr a[5]*a[4] */
1952 mull %edx
1953 addl %eax, %eax
1954 adcl %edx, %edx
1955 adcl $0, %ebp
1956 addl %eax, %ebx
1957 adcl %edx, %ecx
1958 movl 28(%esi), %eax
1959 adcl $0, %ebp
1960 movl %ebx, 36(%edi)
1961 movl 12(%esi), %edx
1962 /* saved r[9] */
1963 /* ############### Calculate word 10 */
1964 xorl %ebx, %ebx
1965 /* sqr a[7]*a[3] */
1966 mull %edx
1967 addl %eax, %eax
1968 adcl %edx, %edx
1969 adcl $0, %ebx
1970 addl %eax, %ecx
1971 adcl %edx, %ebp
1972 movl 24(%esi), %eax
1973 adcl $0, %ebx
1974 movl 16(%esi), %edx
1975 /* sqr a[6]*a[4] */
1976 mull %edx
1977 addl %eax, %eax
1978 adcl %edx, %edx
1979 adcl $0, %ebx
1980 addl %eax, %ecx
1981 adcl %edx, %ebp
1982 movl 20(%esi), %eax
1983 adcl $0, %ebx
1984 /* sqr a[5]*a[5] */
1985 mull %eax
1986 addl %eax, %ecx
1987 adcl %edx, %ebp
1988 movl 16(%esi), %edx
1989 adcl $0, %ebx
1990 movl %ecx, 40(%edi)
1991 movl 28(%esi), %eax
1992 /* saved r[10] */
1993 /* ############### Calculate word 11 */
1994 xorl %ecx, %ecx
1995 /* sqr a[7]*a[4] */
1996 mull %edx
1997 addl %eax, %eax
1998 adcl %edx, %edx
1999 adcl $0, %ecx
2000 addl %eax, %ebp
2001 adcl %edx, %ebx
2002 movl 24(%esi), %eax
2003 adcl $0, %ecx
2004 movl 20(%esi), %edx
2005 /* sqr a[6]*a[5] */
2006 mull %edx
2007 addl %eax, %eax
2008 adcl %edx, %edx
2009 adcl $0, %ecx
2010 addl %eax, %ebp
2011 adcl %edx, %ebx
2012 movl 28(%esi), %eax
2013 adcl $0, %ecx
2014 movl %ebp, 44(%edi)
2015 movl 20(%esi), %edx
2016 /* saved r[11] */
2017 /* ############### Calculate word 12 */
2018 xorl %ebp, %ebp
2019 /* sqr a[7]*a[5] */
2020 mull %edx
2021 addl %eax, %eax
2022 adcl %edx, %edx
2023 adcl $0, %ebp
2024 addl %eax, %ebx
2025 adcl %edx, %ecx
2026 movl 24(%esi), %eax
2027 adcl $0, %ebp
2028 /* sqr a[6]*a[6] */
2029 mull %eax
2030 addl %eax, %ebx
2031 adcl %edx, %ecx
2032 movl 24(%esi), %edx
2033 adcl $0, %ebp
2034 movl %ebx, 48(%edi)
2035 movl 28(%esi), %eax
2036 /* saved r[12] */
2037 /* ############### Calculate word 13 */
2038 xorl %ebx, %ebx
2039 /* sqr a[7]*a[6] */
2040 mull %edx
2041 addl %eax, %eax
2042 adcl %edx, %edx
2043 adcl $0, %ebx
2044 addl %eax, %ecx
2045 adcl %edx, %ebp
2046 movl 28(%esi), %eax
2047 adcl $0, %ebx
2048 movl %ecx, 52(%edi)
2049 /* saved r[13] */
2050 /* ############### Calculate word 14 */
2051 xorl %ecx, %ecx
2052 /* sqr a[7]*a[7] */
2053 mull %eax
2054 addl %eax, %ebp
2055 adcl %edx, %ebx
2056 adcl $0, %ecx
2057 movl %ebp, 56(%edi)
2058 /* saved r[14] */
2059 movl %ebx, 60(%edi)
2060 popl %ebx
2061 popl %ebp
2062 popl %edi
2063 popl %esi
2064 ret
2065 .bn_sqr_comba8_end:
2066 SIZE(bn_sqr_comba8,.bn_sqr_comba8_end-bn_sqr_comba8)
2067 .ident "desasm.pl"
2068 .text
2069 .align ALIGN
2070 .globl bn_sqr_comba4
2071 TYPE(bn_sqr_comba4,@function)
2072 bn_sqr_comba4:
2073 pushl %esi
2074 pushl %edi
2075 pushl %ebp
2076 pushl %ebx
2077 movl 20(%esp), %edi
2078 movl 24(%esp), %esi
2079 xorl %ebx, %ebx
2080 xorl %ecx, %ecx
2081 movl (%esi), %eax
2082 /* ############### Calculate word 0 */
2083 xorl %ebp, %ebp
2084 /* sqr a[0]*a[0] */
2085 mull %eax
2086 addl %eax, %ebx
2087 adcl %edx, %ecx
2088 movl (%esi), %edx
2089 adcl $0, %ebp
2090 movl %ebx, (%edi)
2091 movl 4(%esi), %eax
2092 /* saved r[0] */
2093 /* ############### Calculate word 1 */
2094 xorl %ebx, %ebx
2095 /* sqr a[1]*a[0] */
2096 mull %edx
2097 addl %eax, %eax
2098 adcl %edx, %edx
2099 adcl $0, %ebx
2100 addl %eax, %ecx
2101 adcl %edx, %ebp
2102 movl 8(%esi), %eax
2103 adcl $0, %ebx
2104 movl %ecx, 4(%edi)
2105 movl (%esi), %edx
2106 /* saved r[1] */
2107 /* ############### Calculate word 2 */
2108 xorl %ecx, %ecx
2109 /* sqr a[2]*a[0] */
2110 mull %edx
2111 addl %eax, %eax
2112 adcl %edx, %edx
2113 adcl $0, %ecx
2114 addl %eax, %ebp
2115 adcl %edx, %ebx
2116 movl 4(%esi), %eax
2117 adcl $0, %ecx
2118 /* sqr a[1]*a[1] */
2119 mull %eax
2120 addl %eax, %ebp
2121 adcl %edx, %ebx
2122 movl (%esi), %edx
2123 adcl $0, %ecx
2124 movl %ebp, 8(%edi)
2125 movl 12(%esi), %eax
2126 /* saved r[2] */
2127 /* ############### Calculate word 3 */
2128 xorl %ebp, %ebp
2129 /* sqr a[3]*a[0] */
2130 mull %edx
2131 addl %eax, %eax
2132 adcl %edx, %edx
2133 adcl $0, %ebp
2134 addl %eax, %ebx
2135 adcl %edx, %ecx
2136 movl 8(%esi), %eax
2137 adcl $0, %ebp
2138 movl 4(%esi), %edx
2139 /* sqr a[2]*a[1] */
2140 mull %edx
2141 addl %eax, %eax
2142 adcl %edx, %edx
2143 adcl $0, %ebp
2144 addl %eax, %ebx
2145 adcl %edx, %ecx
2146 movl 12(%esi), %eax
2147 adcl $0, %ebp
2148 movl %ebx, 12(%edi)
2149 movl 4(%esi), %edx
2150 /* saved r[3] */
2151 /* ############### Calculate word 4 */
2152 xorl %ebx, %ebx
2153 /* sqr a[3]*a[1] */
2154 mull %edx
2155 addl %eax, %eax
2156 adcl %edx, %edx
2157 adcl $0, %ebx
2158 addl %eax, %ecx
2159 adcl %edx, %ebp
2160 movl 8(%esi), %eax
2161 adcl $0, %ebx
2162 /* sqr a[2]*a[2] */
2163 mull %eax
2164 addl %eax, %ecx
2165 adcl %edx, %ebp
2166 movl 8(%esi), %edx
2167 adcl $0, %ebx
2168 movl %ecx, 16(%edi)
2169 movl 12(%esi), %eax
2170 /* saved r[4] */
2171 /* ############### Calculate word 5 */
2172 xorl %ecx, %ecx
2173 /* sqr a[3]*a[2] */
2174 mull %edx
2175 addl %eax, %eax
2176 adcl %edx, %edx
2177 adcl $0, %ecx
2178 addl %eax, %ebp
2179 adcl %edx, %ebx
2180 movl 12(%esi), %eax
2181 adcl $0, %ecx
2182 movl %ebp, 20(%edi)
2183 /* saved r[5] */
2184 /* ############### Calculate word 6 */
2185 xorl %ebp, %ebp
2186 /* sqr a[3]*a[3] */
2187 mull %eax
2188 addl %eax, %ebx
2189 adcl %edx, %ecx
2190 adcl $0, %ebp
2191 movl %ebx, 24(%edi)
2192 /* saved r[6] */
2193 movl %ecx, 28(%edi)
2194 popl %ebx
2195 popl %ebp
2196 popl %edi
2197 popl %esi
2198 ret
2199 .bn_sqr_comba4_end:
2200 SIZE(bn_sqr_comba4,.bn_sqr_comba4_end-bn_sqr_comba4)
2201 .ident "desasm.pl"