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