VirtualBox

source: vbox/trunk/src/libs/openssl-1.1.1f/crypto/genasm-nasm/bn-586.S@ 83531

Last change on this file since 83531 was 83531, checked in by vboxsync, 5 years ago

setting svn:sync-process=export for openssl-1.1.1f, all files except tests

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette