Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(553)

Side by Side Diff: third_party/boringssl/mac-x86/crypto/bn/bn-586.S

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

Powered by Google App Engine
This is Rietveld 408576698