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