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

Side by Side Diff: third_party/boringssl/mac-x86_64/crypto/aes/aesni-x86_64.S

Issue 2219933002: Land BoringSSL roll on master (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
1 #if defined(__x86_64__) 1 #if defined(__x86_64__)
2 .text 2 .text
3 3
4 .globl _aesni_encrypt 4 .globl _aesni_encrypt
5 .private_extern _aesni_encrypt 5 .private_extern _aesni_encrypt
6 6
7 .p2align 4 7 .p2align 4
8 _aesni_encrypt: 8 _aesni_encrypt:
9 movups (%rdi),%xmm2 9 movups (%rdi),%xmm2
10 movl 240(%rdx),%eax 10 movl 240(%rdx),%eax
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 andq $-16,%rdx 500 andq $-16,%rdx
501 jz L$ecb_ret 501 jz L$ecb_ret
502 502
503 movl 240(%rcx),%eax 503 movl 240(%rcx),%eax
504 movups (%rcx),%xmm0 504 movups (%rcx),%xmm0
505 movq %rcx,%r11 505 movq %rcx,%r11
506 movl %eax,%r10d 506 movl %eax,%r10d
507 testl %r8d,%r8d 507 testl %r8d,%r8d
508 jz L$ecb_decrypt 508 jz L$ecb_decrypt
509 509
510 » cmpq» $128,%rdx 510 » cmpq» $0x80,%rdx
511 jb L$ecb_enc_tail 511 jb L$ecb_enc_tail
512 512
513 movdqu (%rdi),%xmm2 513 movdqu (%rdi),%xmm2
514 movdqu 16(%rdi),%xmm3 514 movdqu 16(%rdi),%xmm3
515 movdqu 32(%rdi),%xmm4 515 movdqu 32(%rdi),%xmm4
516 movdqu 48(%rdi),%xmm5 516 movdqu 48(%rdi),%xmm5
517 movdqu 64(%rdi),%xmm6 517 movdqu 64(%rdi),%xmm6
518 movdqu 80(%rdi),%xmm7 518 movdqu 80(%rdi),%xmm7
519 movdqu 96(%rdi),%xmm8 519 movdqu 96(%rdi),%xmm8
520 movdqu 112(%rdi),%xmm9 520 movdqu 112(%rdi),%xmm9
521 leaq 128(%rdi),%rdi 521 leaq 128(%rdi),%rdi
522 » subq» $128,%rdx 522 » subq» $0x80,%rdx
523 jmp L$ecb_enc_loop8_enter 523 jmp L$ecb_enc_loop8_enter
524 .p2align 4 524 .p2align 4
525 L$ecb_enc_loop8: 525 L$ecb_enc_loop8:
526 movups %xmm2,(%rsi) 526 movups %xmm2,(%rsi)
527 movq %r11,%rcx 527 movq %r11,%rcx
528 movdqu (%rdi),%xmm2 528 movdqu (%rdi),%xmm2
529 movl %r10d,%eax 529 movl %r10d,%eax
530 movups %xmm3,16(%rsi) 530 movups %xmm3,16(%rsi)
531 movdqu 16(%rdi),%xmm3 531 movdqu 16(%rdi),%xmm3
532 movups %xmm4,32(%rsi) 532 movups %xmm4,32(%rsi)
533 movdqu 32(%rdi),%xmm4 533 movdqu 32(%rdi),%xmm4
534 movups %xmm5,48(%rsi) 534 movups %xmm5,48(%rsi)
535 movdqu 48(%rdi),%xmm5 535 movdqu 48(%rdi),%xmm5
536 movups %xmm6,64(%rsi) 536 movups %xmm6,64(%rsi)
537 movdqu 64(%rdi),%xmm6 537 movdqu 64(%rdi),%xmm6
538 movups %xmm7,80(%rsi) 538 movups %xmm7,80(%rsi)
539 movdqu 80(%rdi),%xmm7 539 movdqu 80(%rdi),%xmm7
540 movups %xmm8,96(%rsi) 540 movups %xmm8,96(%rsi)
541 movdqu 96(%rdi),%xmm8 541 movdqu 96(%rdi),%xmm8
542 movups %xmm9,112(%rsi) 542 movups %xmm9,112(%rsi)
543 leaq 128(%rsi),%rsi 543 leaq 128(%rsi),%rsi
544 movdqu 112(%rdi),%xmm9 544 movdqu 112(%rdi),%xmm9
545 leaq 128(%rdi),%rdi 545 leaq 128(%rdi),%rdi
546 L$ecb_enc_loop8_enter: 546 L$ecb_enc_loop8_enter:
547 547
548 call _aesni_encrypt8 548 call _aesni_encrypt8
549 549
550 » subq» $128,%rdx 550 » subq» $0x80,%rdx
551 jnc L$ecb_enc_loop8 551 jnc L$ecb_enc_loop8
552 552
553 movups %xmm2,(%rsi) 553 movups %xmm2,(%rsi)
554 movq %r11,%rcx 554 movq %r11,%rcx
555 movups %xmm3,16(%rsi) 555 movups %xmm3,16(%rsi)
556 movl %r10d,%eax 556 movl %r10d,%eax
557 movups %xmm4,32(%rsi) 557 movups %xmm4,32(%rsi)
558 movups %xmm5,48(%rsi) 558 movups %xmm5,48(%rsi)
559 movups %xmm6,64(%rsi) 559 movups %xmm6,64(%rsi)
560 movups %xmm7,80(%rsi) 560 movups %xmm7,80(%rsi)
561 movups %xmm8,96(%rsi) 561 movups %xmm8,96(%rsi)
562 movups %xmm9,112(%rsi) 562 movups %xmm9,112(%rsi)
563 leaq 128(%rsi),%rsi 563 leaq 128(%rsi),%rsi
564 » addq» $128,%rdx 564 » addq» $0x80,%rdx
565 jz L$ecb_ret 565 jz L$ecb_ret
566 566
567 L$ecb_enc_tail: 567 L$ecb_enc_tail:
568 movups (%rdi),%xmm2 568 movups (%rdi),%xmm2
569 » cmpq» $32,%rdx 569 » cmpq» $0x20,%rdx
570 jb L$ecb_enc_one 570 jb L$ecb_enc_one
571 movups 16(%rdi),%xmm3 571 movups 16(%rdi),%xmm3
572 je L$ecb_enc_two 572 je L$ecb_enc_two
573 movups 32(%rdi),%xmm4 573 movups 32(%rdi),%xmm4
574 » cmpq» $64,%rdx 574 » cmpq» $0x40,%rdx
575 jb L$ecb_enc_three 575 jb L$ecb_enc_three
576 movups 48(%rdi),%xmm5 576 movups 48(%rdi),%xmm5
577 je L$ecb_enc_four 577 je L$ecb_enc_four
578 movups 64(%rdi),%xmm6 578 movups 64(%rdi),%xmm6
579 » cmpq» $96,%rdx 579 » cmpq» $0x60,%rdx
580 jb L$ecb_enc_five 580 jb L$ecb_enc_five
581 movups 80(%rdi),%xmm7 581 movups 80(%rdi),%xmm7
582 je L$ecb_enc_six 582 je L$ecb_enc_six
583 movdqu 96(%rdi),%xmm8 583 movdqu 96(%rdi),%xmm8
584 xorps %xmm9,%xmm9 584 xorps %xmm9,%xmm9
585 call _aesni_encrypt8 585 call _aesni_encrypt8
586 movups %xmm2,(%rsi) 586 movups %xmm2,(%rsi)
587 movups %xmm3,16(%rsi) 587 movups %xmm3,16(%rsi)
588 movups %xmm4,32(%rsi) 588 movups %xmm4,32(%rsi)
589 movups %xmm5,48(%rsi) 589 movups %xmm5,48(%rsi)
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 movups %xmm2,(%rsi) 643 movups %xmm2,(%rsi)
644 movups %xmm3,16(%rsi) 644 movups %xmm3,16(%rsi)
645 movups %xmm4,32(%rsi) 645 movups %xmm4,32(%rsi)
646 movups %xmm5,48(%rsi) 646 movups %xmm5,48(%rsi)
647 movups %xmm6,64(%rsi) 647 movups %xmm6,64(%rsi)
648 movups %xmm7,80(%rsi) 648 movups %xmm7,80(%rsi)
649 jmp L$ecb_ret 649 jmp L$ecb_ret
650 650
651 .p2align 4 651 .p2align 4
652 L$ecb_decrypt: 652 L$ecb_decrypt:
653 » cmpq» $128,%rdx 653 » cmpq» $0x80,%rdx
654 jb L$ecb_dec_tail 654 jb L$ecb_dec_tail
655 655
656 movdqu (%rdi),%xmm2 656 movdqu (%rdi),%xmm2
657 movdqu 16(%rdi),%xmm3 657 movdqu 16(%rdi),%xmm3
658 movdqu 32(%rdi),%xmm4 658 movdqu 32(%rdi),%xmm4
659 movdqu 48(%rdi),%xmm5 659 movdqu 48(%rdi),%xmm5
660 movdqu 64(%rdi),%xmm6 660 movdqu 64(%rdi),%xmm6
661 movdqu 80(%rdi),%xmm7 661 movdqu 80(%rdi),%xmm7
662 movdqu 96(%rdi),%xmm8 662 movdqu 96(%rdi),%xmm8
663 movdqu 112(%rdi),%xmm9 663 movdqu 112(%rdi),%xmm9
664 leaq 128(%rdi),%rdi 664 leaq 128(%rdi),%rdi
665 » subq» $128,%rdx 665 » subq» $0x80,%rdx
666 jmp L$ecb_dec_loop8_enter 666 jmp L$ecb_dec_loop8_enter
667 .p2align 4 667 .p2align 4
668 L$ecb_dec_loop8: 668 L$ecb_dec_loop8:
669 movups %xmm2,(%rsi) 669 movups %xmm2,(%rsi)
670 movq %r11,%rcx 670 movq %r11,%rcx
671 movdqu (%rdi),%xmm2 671 movdqu (%rdi),%xmm2
672 movl %r10d,%eax 672 movl %r10d,%eax
673 movups %xmm3,16(%rsi) 673 movups %xmm3,16(%rsi)
674 movdqu 16(%rdi),%xmm3 674 movdqu 16(%rdi),%xmm3
675 movups %xmm4,32(%rsi) 675 movups %xmm4,32(%rsi)
676 movdqu 32(%rdi),%xmm4 676 movdqu 32(%rdi),%xmm4
677 movups %xmm5,48(%rsi) 677 movups %xmm5,48(%rsi)
678 movdqu 48(%rdi),%xmm5 678 movdqu 48(%rdi),%xmm5
679 movups %xmm6,64(%rsi) 679 movups %xmm6,64(%rsi)
680 movdqu 64(%rdi),%xmm6 680 movdqu 64(%rdi),%xmm6
681 movups %xmm7,80(%rsi) 681 movups %xmm7,80(%rsi)
682 movdqu 80(%rdi),%xmm7 682 movdqu 80(%rdi),%xmm7
683 movups %xmm8,96(%rsi) 683 movups %xmm8,96(%rsi)
684 movdqu 96(%rdi),%xmm8 684 movdqu 96(%rdi),%xmm8
685 movups %xmm9,112(%rsi) 685 movups %xmm9,112(%rsi)
686 leaq 128(%rsi),%rsi 686 leaq 128(%rsi),%rsi
687 movdqu 112(%rdi),%xmm9 687 movdqu 112(%rdi),%xmm9
688 leaq 128(%rdi),%rdi 688 leaq 128(%rdi),%rdi
689 L$ecb_dec_loop8_enter: 689 L$ecb_dec_loop8_enter:
690 690
691 call _aesni_decrypt8 691 call _aesni_decrypt8
692 692
693 movups (%r11),%xmm0 693 movups (%r11),%xmm0
694 » subq» $128,%rdx 694 » subq» $0x80,%rdx
695 jnc L$ecb_dec_loop8 695 jnc L$ecb_dec_loop8
696 696
697 movups %xmm2,(%rsi) 697 movups %xmm2,(%rsi)
698 pxor %xmm2,%xmm2 698 pxor %xmm2,%xmm2
699 movq %r11,%rcx 699 movq %r11,%rcx
700 movups %xmm3,16(%rsi) 700 movups %xmm3,16(%rsi)
701 pxor %xmm3,%xmm3 701 pxor %xmm3,%xmm3
702 movl %r10d,%eax 702 movl %r10d,%eax
703 movups %xmm4,32(%rsi) 703 movups %xmm4,32(%rsi)
704 pxor %xmm4,%xmm4 704 pxor %xmm4,%xmm4
705 movups %xmm5,48(%rsi) 705 movups %xmm5,48(%rsi)
706 pxor %xmm5,%xmm5 706 pxor %xmm5,%xmm5
707 movups %xmm6,64(%rsi) 707 movups %xmm6,64(%rsi)
708 pxor %xmm6,%xmm6 708 pxor %xmm6,%xmm6
709 movups %xmm7,80(%rsi) 709 movups %xmm7,80(%rsi)
710 pxor %xmm7,%xmm7 710 pxor %xmm7,%xmm7
711 movups %xmm8,96(%rsi) 711 movups %xmm8,96(%rsi)
712 pxor %xmm8,%xmm8 712 pxor %xmm8,%xmm8
713 movups %xmm9,112(%rsi) 713 movups %xmm9,112(%rsi)
714 pxor %xmm9,%xmm9 714 pxor %xmm9,%xmm9
715 leaq 128(%rsi),%rsi 715 leaq 128(%rsi),%rsi
716 » addq» $128,%rdx 716 » addq» $0x80,%rdx
717 jz L$ecb_ret 717 jz L$ecb_ret
718 718
719 L$ecb_dec_tail: 719 L$ecb_dec_tail:
720 movups (%rdi),%xmm2 720 movups (%rdi),%xmm2
721 » cmpq» $32,%rdx 721 » cmpq» $0x20,%rdx
722 jb L$ecb_dec_one 722 jb L$ecb_dec_one
723 movups 16(%rdi),%xmm3 723 movups 16(%rdi),%xmm3
724 je L$ecb_dec_two 724 je L$ecb_dec_two
725 movups 32(%rdi),%xmm4 725 movups 32(%rdi),%xmm4
726 » cmpq» $64,%rdx 726 » cmpq» $0x40,%rdx
727 jb L$ecb_dec_three 727 jb L$ecb_dec_three
728 movups 48(%rdi),%xmm5 728 movups 48(%rdi),%xmm5
729 je L$ecb_dec_four 729 je L$ecb_dec_four
730 movups 64(%rdi),%xmm6 730 movups 64(%rdi),%xmm6
731 » cmpq» $96,%rdx 731 » cmpq» $0x60,%rdx
732 jb L$ecb_dec_five 732 jb L$ecb_dec_five
733 movups 80(%rdi),%xmm7 733 movups 80(%rdi),%xmm7
734 je L$ecb_dec_six 734 je L$ecb_dec_six
735 movups 96(%rdi),%xmm8 735 movups 96(%rdi),%xmm8
736 movups (%rcx),%xmm0 736 movups (%rcx),%xmm0
737 xorps %xmm9,%xmm9 737 xorps %xmm9,%xmm9
738 call _aesni_decrypt8 738 call _aesni_decrypt8
739 movups %xmm2,(%rsi) 739 movups %xmm2,(%rsi)
740 pxor %xmm2,%xmm2 740 pxor %xmm2,%xmm2
741 movups %xmm3,16(%rsi) 741 movups %xmm3,16(%rsi)
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after
1599 movq %rcx,%r11 1599 movq %rcx,%r11
1600 movl %r10d,%eax 1600 movl %r10d,%eax
1601 shll $4,%r10d 1601 shll $4,%r10d
1602 movq %rdx,%r9 1602 movq %rdx,%r9
1603 andq $-16,%rdx 1603 andq $-16,%rdx
1604 1604
1605 movups 16(%rcx,%r10,1),%xmm1 1605 movups 16(%rcx,%r10,1),%xmm1
1606 1606
1607 movdqa L$xts_magic(%rip),%xmm8 1607 movdqa L$xts_magic(%rip),%xmm8
1608 movdqa %xmm2,%xmm15 1608 movdqa %xmm2,%xmm15
1609 » pshufd» $95,%xmm2,%xmm9 1609 » pshufd» $0x5f,%xmm2,%xmm9
1610 pxor %xmm0,%xmm1 1610 pxor %xmm0,%xmm1
1611 movdqa %xmm9,%xmm14 1611 movdqa %xmm9,%xmm14
1612 paddd %xmm9,%xmm9 1612 paddd %xmm9,%xmm9
1613 movdqa %xmm15,%xmm10 1613 movdqa %xmm15,%xmm10
1614 psrad $31,%xmm14 1614 psrad $31,%xmm14
1615 paddq %xmm15,%xmm15 1615 paddq %xmm15,%xmm15
1616 pand %xmm8,%xmm14 1616 pand %xmm8,%xmm14
1617 pxor %xmm0,%xmm10 1617 pxor %xmm0,%xmm10
1618 pxor %xmm14,%xmm15 1618 pxor %xmm14,%xmm15
1619 movdqa %xmm9,%xmm14 1619 movdqa %xmm9,%xmm14
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1698 pxor %xmm9,%xmm14 1698 pxor %xmm9,%xmm14
1699 movdqa %xmm12,32(%rsp) 1699 movdqa %xmm12,32(%rsp)
1700 .byte 102,15,56,220,224 1700 .byte 102,15,56,220,224
1701 .byte 102,15,56,220,232 1701 .byte 102,15,56,220,232
1702 pxor %xmm9,%xmm8 1702 pxor %xmm9,%xmm8
1703 movdqa %xmm14,64(%rsp) 1703 movdqa %xmm14,64(%rsp)
1704 .byte 102,15,56,220,240 1704 .byte 102,15,56,220,240
1705 .byte 102,15,56,220,248 1705 .byte 102,15,56,220,248
1706 movups 64(%r11),%xmm0 1706 movups 64(%r11),%xmm0
1707 movdqa %xmm8,80(%rsp) 1707 movdqa %xmm8,80(%rsp)
1708 » pshufd» $95,%xmm15,%xmm9 1708 » pshufd» $0x5f,%xmm15,%xmm9
1709 jmp L$xts_enc_loop6 1709 jmp L$xts_enc_loop6
1710 .p2align 5 1710 .p2align 5
1711 L$xts_enc_loop6: 1711 L$xts_enc_loop6:
1712 .byte 102,15,56,220,209 1712 .byte 102,15,56,220,209
1713 .byte 102,15,56,220,217 1713 .byte 102,15,56,220,217
1714 .byte 102,15,56,220,225 1714 .byte 102,15,56,220,225
1715 .byte 102,15,56,220,233 1715 .byte 102,15,56,220,233
1716 .byte 102,15,56,220,241 1716 .byte 102,15,56,220,241
1717 .byte 102,15,56,220,249 1717 .byte 102,15,56,220,249
1718 movups -64(%rcx,%rax,1),%xmm1 1718 movups -64(%rcx,%rax,1),%xmm1
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1837 shrl $4,%eax 1837 shrl $4,%eax
1838 1838
1839 L$xts_enc_short: 1839 L$xts_enc_short:
1840 1840
1841 movl %eax,%r10d 1841 movl %eax,%r10d
1842 pxor %xmm0,%xmm10 1842 pxor %xmm0,%xmm10
1843 addq $96,%rdx 1843 addq $96,%rdx
1844 jz L$xts_enc_done 1844 jz L$xts_enc_done
1845 1845
1846 pxor %xmm0,%xmm11 1846 pxor %xmm0,%xmm11
1847 » cmpq» $32,%rdx 1847 » cmpq» $0x20,%rdx
1848 jb L$xts_enc_one 1848 jb L$xts_enc_one
1849 pxor %xmm0,%xmm12 1849 pxor %xmm0,%xmm12
1850 je L$xts_enc_two 1850 je L$xts_enc_two
1851 1851
1852 pxor %xmm0,%xmm13 1852 pxor %xmm0,%xmm13
1853 » cmpq» $64,%rdx 1853 » cmpq» $0x40,%rdx
1854 jb L$xts_enc_three 1854 jb L$xts_enc_three
1855 pxor %xmm0,%xmm14 1855 pxor %xmm0,%xmm14
1856 je L$xts_enc_four 1856 je L$xts_enc_four
1857 1857
1858 movdqu (%rdi),%xmm2 1858 movdqu (%rdi),%xmm2
1859 movdqu 16(%rdi),%xmm3 1859 movdqu 16(%rdi),%xmm3
1860 movdqu 32(%rdi),%xmm4 1860 movdqu 32(%rdi),%xmm4
1861 pxor %xmm10,%xmm2 1861 pxor %xmm10,%xmm2
1862 movdqu 48(%rdi),%xmm5 1862 movdqu 48(%rdi),%xmm5
1863 pxor %xmm11,%xmm3 1863 pxor %xmm11,%xmm3
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
2071 movq %rcx,%r11 2071 movq %rcx,%r11
2072 movl %r10d,%eax 2072 movl %r10d,%eax
2073 shll $4,%r10d 2073 shll $4,%r10d
2074 movq %rdx,%r9 2074 movq %rdx,%r9
2075 andq $-16,%rdx 2075 andq $-16,%rdx
2076 2076
2077 movups 16(%rcx,%r10,1),%xmm1 2077 movups 16(%rcx,%r10,1),%xmm1
2078 2078
2079 movdqa L$xts_magic(%rip),%xmm8 2079 movdqa L$xts_magic(%rip),%xmm8
2080 movdqa %xmm2,%xmm15 2080 movdqa %xmm2,%xmm15
2081 » pshufd» $95,%xmm2,%xmm9 2081 » pshufd» $0x5f,%xmm2,%xmm9
2082 pxor %xmm0,%xmm1 2082 pxor %xmm0,%xmm1
2083 movdqa %xmm9,%xmm14 2083 movdqa %xmm9,%xmm14
2084 paddd %xmm9,%xmm9 2084 paddd %xmm9,%xmm9
2085 movdqa %xmm15,%xmm10 2085 movdqa %xmm15,%xmm10
2086 psrad $31,%xmm14 2086 psrad $31,%xmm14
2087 paddq %xmm15,%xmm15 2087 paddq %xmm15,%xmm15
2088 pand %xmm8,%xmm14 2088 pand %xmm8,%xmm14
2089 pxor %xmm0,%xmm10 2089 pxor %xmm0,%xmm10
2090 pxor %xmm14,%xmm15 2090 pxor %xmm14,%xmm15
2091 movdqa %xmm9,%xmm14 2091 movdqa %xmm9,%xmm14
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
2170 pxor %xmm9,%xmm14 2170 pxor %xmm9,%xmm14
2171 movdqa %xmm12,32(%rsp) 2171 movdqa %xmm12,32(%rsp)
2172 .byte 102,15,56,222,224 2172 .byte 102,15,56,222,224
2173 .byte 102,15,56,222,232 2173 .byte 102,15,56,222,232
2174 pxor %xmm9,%xmm8 2174 pxor %xmm9,%xmm8
2175 movdqa %xmm14,64(%rsp) 2175 movdqa %xmm14,64(%rsp)
2176 .byte 102,15,56,222,240 2176 .byte 102,15,56,222,240
2177 .byte 102,15,56,222,248 2177 .byte 102,15,56,222,248
2178 movups 64(%r11),%xmm0 2178 movups 64(%r11),%xmm0
2179 movdqa %xmm8,80(%rsp) 2179 movdqa %xmm8,80(%rsp)
2180 » pshufd» $95,%xmm15,%xmm9 2180 » pshufd» $0x5f,%xmm15,%xmm9
2181 jmp L$xts_dec_loop6 2181 jmp L$xts_dec_loop6
2182 .p2align 5 2182 .p2align 5
2183 L$xts_dec_loop6: 2183 L$xts_dec_loop6:
2184 .byte 102,15,56,222,209 2184 .byte 102,15,56,222,209
2185 .byte 102,15,56,222,217 2185 .byte 102,15,56,222,217
2186 .byte 102,15,56,222,225 2186 .byte 102,15,56,222,225
2187 .byte 102,15,56,222,233 2187 .byte 102,15,56,222,233
2188 .byte 102,15,56,222,241 2188 .byte 102,15,56,222,241
2189 .byte 102,15,56,222,249 2189 .byte 102,15,56,222,249
2190 movups -64(%rcx,%rax,1),%xmm1 2190 movups -64(%rcx,%rax,1),%xmm1
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
2310 2310
2311 L$xts_dec_short: 2311 L$xts_dec_short:
2312 2312
2313 movl %eax,%r10d 2313 movl %eax,%r10d
2314 pxor %xmm0,%xmm10 2314 pxor %xmm0,%xmm10
2315 pxor %xmm0,%xmm11 2315 pxor %xmm0,%xmm11
2316 addq $96,%rdx 2316 addq $96,%rdx
2317 jz L$xts_dec_done 2317 jz L$xts_dec_done
2318 2318
2319 pxor %xmm0,%xmm12 2319 pxor %xmm0,%xmm12
2320 » cmpq» $32,%rdx 2320 » cmpq» $0x20,%rdx
2321 jb L$xts_dec_one 2321 jb L$xts_dec_one
2322 pxor %xmm0,%xmm13 2322 pxor %xmm0,%xmm13
2323 je L$xts_dec_two 2323 je L$xts_dec_two
2324 2324
2325 pxor %xmm0,%xmm14 2325 pxor %xmm0,%xmm14
2326 » cmpq» $64,%rdx 2326 » cmpq» $0x40,%rdx
2327 jb L$xts_dec_three 2327 jb L$xts_dec_three
2328 je L$xts_dec_four 2328 je L$xts_dec_four
2329 2329
2330 movdqu (%rdi),%xmm2 2330 movdqu (%rdi),%xmm2
2331 movdqu 16(%rdi),%xmm3 2331 movdqu 16(%rdi),%xmm3
2332 movdqu 32(%rdi),%xmm4 2332 movdqu 32(%rdi),%xmm4
2333 pxor %xmm10,%xmm2 2333 pxor %xmm10,%xmm2
2334 movdqu 48(%rdi),%xmm5 2334 movdqu 48(%rdi),%xmm5
2335 pxor %xmm11,%xmm3 2335 pxor %xmm11,%xmm3
2336 movdqu 64(%rdi),%xmm6 2336 movdqu 64(%rdi),%xmm6
(...skipping 10 matching lines...) Expand all
2347 movdqu %xmm2,(%rsi) 2347 movdqu %xmm2,(%rsi)
2348 xorps %xmm13,%xmm5 2348 xorps %xmm13,%xmm5
2349 movdqu %xmm3,16(%rsi) 2349 movdqu %xmm3,16(%rsi)
2350 xorps %xmm14,%xmm6 2350 xorps %xmm14,%xmm6
2351 movdqu %xmm4,32(%rsi) 2351 movdqu %xmm4,32(%rsi)
2352 pxor %xmm14,%xmm14 2352 pxor %xmm14,%xmm14
2353 movdqu %xmm5,48(%rsi) 2353 movdqu %xmm5,48(%rsi)
2354 pcmpgtd %xmm15,%xmm14 2354 pcmpgtd %xmm15,%xmm14
2355 movdqu %xmm6,64(%rsi) 2355 movdqu %xmm6,64(%rsi)
2356 leaq 80(%rsi),%rsi 2356 leaq 80(%rsi),%rsi
2357 » pshufd» $19,%xmm14,%xmm11 2357 » pshufd» $0x13,%xmm14,%xmm11
2358 andq $15,%r9 2358 andq $15,%r9
2359 jz L$xts_dec_ret 2359 jz L$xts_dec_ret
2360 2360
2361 movdqa %xmm15,%xmm10 2361 movdqa %xmm15,%xmm10
2362 paddq %xmm15,%xmm15 2362 paddq %xmm15,%xmm15
2363 pand %xmm8,%xmm11 2363 pand %xmm8,%xmm11
2364 pxor %xmm15,%xmm11 2364 pxor %xmm15,%xmm11
2365 jmp L$xts_dec_done2 2365 jmp L$xts_dec_done2
2366 2366
2367 .p2align 4 2367 .p2align 4
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
2637 jmp L$cbc_ret 2637 jmp L$cbc_ret
2638 .p2align 4 2638 .p2align 4
2639 L$cbc_decrypt_bulk: 2639 L$cbc_decrypt_bulk:
2640 leaq (%rsp),%rax 2640 leaq (%rsp),%rax
2641 pushq %rbp 2641 pushq %rbp
2642 subq $16,%rsp 2642 subq $16,%rsp
2643 andq $-16,%rsp 2643 andq $-16,%rsp
2644 leaq -8(%rax),%rbp 2644 leaq -8(%rax),%rbp
2645 movups (%r8),%xmm10 2645 movups (%r8),%xmm10
2646 movl %r10d,%eax 2646 movl %r10d,%eax
2647 » cmpq» $80,%rdx 2647 » cmpq» $0x50,%rdx
2648 jbe L$cbc_dec_tail 2648 jbe L$cbc_dec_tail
2649 2649
2650 movups (%rcx),%xmm0 2650 movups (%rcx),%xmm0
2651 movdqu 0(%rdi),%xmm2 2651 movdqu 0(%rdi),%xmm2
2652 movdqu 16(%rdi),%xmm3 2652 movdqu 16(%rdi),%xmm3
2653 movdqa %xmm2,%xmm11 2653 movdqa %xmm2,%xmm11
2654 movdqu 32(%rdi),%xmm4 2654 movdqu 32(%rdi),%xmm4
2655 movdqa %xmm3,%xmm12 2655 movdqa %xmm3,%xmm12
2656 movdqu 48(%rdi),%xmm5 2656 movdqu 48(%rdi),%xmm5
2657 movdqa %xmm4,%xmm13 2657 movdqa %xmm4,%xmm13
2658 movdqu 64(%rdi),%xmm6 2658 movdqu 64(%rdi),%xmm6
2659 movdqa %xmm5,%xmm14 2659 movdqa %xmm5,%xmm14
2660 movdqu 80(%rdi),%xmm7 2660 movdqu 80(%rdi),%xmm7
2661 movdqa %xmm6,%xmm15 2661 movdqa %xmm6,%xmm15
2662 movl _OPENSSL_ia32cap_P+4(%rip),%r9d 2662 movl _OPENSSL_ia32cap_P+4(%rip),%r9d
2663 » cmpq» $112,%rdx 2663 » cmpq» $0x70,%rdx
2664 jbe L$cbc_dec_six_or_seven 2664 jbe L$cbc_dec_six_or_seven
2665 2665
2666 andl $71303168,%r9d 2666 andl $71303168,%r9d
2667 » subq» $80,%rdx 2667 » subq» $0x50,%rdx
2668 cmpl $4194304,%r9d 2668 cmpl $4194304,%r9d
2669 je L$cbc_dec_loop6_enter 2669 je L$cbc_dec_loop6_enter
2670 » subq» $32,%rdx 2670 » subq» $0x20,%rdx
2671 leaq 112(%rcx),%rcx 2671 leaq 112(%rcx),%rcx
2672 jmp L$cbc_dec_loop8_enter 2672 jmp L$cbc_dec_loop8_enter
2673 .p2align 4 2673 .p2align 4
2674 L$cbc_dec_loop8: 2674 L$cbc_dec_loop8:
2675 movups %xmm9,(%rsi) 2675 movups %xmm9,(%rsi)
2676 leaq 16(%rsi),%rsi 2676 leaq 16(%rsi),%rsi
2677 L$cbc_dec_loop8_enter: 2677 L$cbc_dec_loop8_enter:
2678 movdqu 96(%rdi),%xmm8 2678 movdqu 96(%rdi),%xmm8
2679 pxor %xmm0,%xmm2 2679 pxor %xmm0,%xmm2
2680 movdqu 112(%rdi),%xmm9 2680 movdqu 112(%rdi),%xmm9
2681 pxor %xmm0,%xmm3 2681 pxor %xmm0,%xmm3
2682 movups 16-112(%rcx),%xmm1 2682 movups 16-112(%rcx),%xmm1
2683 pxor %xmm0,%xmm4 2683 pxor %xmm0,%xmm4
2684 xorq %r11,%r11 2684 xorq %r11,%r11
2685 » cmpq» $112,%rdx 2685 » cmpq» $0x70,%rdx
2686 pxor %xmm0,%xmm5 2686 pxor %xmm0,%xmm5
2687 pxor %xmm0,%xmm6 2687 pxor %xmm0,%xmm6
2688 pxor %xmm0,%xmm7 2688 pxor %xmm0,%xmm7
2689 pxor %xmm0,%xmm8 2689 pxor %xmm0,%xmm8
2690 2690
2691 .byte 102,15,56,222,209 2691 .byte 102,15,56,222,209
2692 pxor %xmm0,%xmm9 2692 pxor %xmm0,%xmm9
2693 movups 32-112(%rcx),%xmm0 2693 movups 32-112(%rcx),%xmm0
2694 .byte 102,15,56,222,217 2694 .byte 102,15,56,222,217
2695 .byte 102,15,56,222,225 2695 .byte 102,15,56,222,225
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
2860 movdqa %xmm13,%xmm4 2860 movdqa %xmm13,%xmm4
2861 movups %xmm5,48(%rsi) 2861 movups %xmm5,48(%rsi)
2862 movdqa %xmm14,%xmm5 2862 movdqa %xmm14,%xmm5
2863 movups %xmm6,64(%rsi) 2863 movups %xmm6,64(%rsi)
2864 movdqa %xmm15,%xmm6 2864 movdqa %xmm15,%xmm6
2865 movups %xmm7,80(%rsi) 2865 movups %xmm7,80(%rsi)
2866 movdqa %xmm1,%xmm7 2866 movdqa %xmm1,%xmm7
2867 movups %xmm8,96(%rsi) 2867 movups %xmm8,96(%rsi)
2868 leaq 112(%rsi),%rsi 2868 leaq 112(%rsi),%rsi
2869 2869
2870 » subq» $128,%rdx 2870 » subq» $0x80,%rdx
2871 ja L$cbc_dec_loop8 2871 ja L$cbc_dec_loop8
2872 2872
2873 movaps %xmm9,%xmm2 2873 movaps %xmm9,%xmm2
2874 leaq -112(%rcx),%rcx 2874 leaq -112(%rcx),%rcx
2875 » addq» $112,%rdx 2875 » addq» $0x70,%rdx
2876 jle L$cbc_dec_clear_tail_collected 2876 jle L$cbc_dec_clear_tail_collected
2877 movups %xmm9,(%rsi) 2877 movups %xmm9,(%rsi)
2878 leaq 16(%rsi),%rsi 2878 leaq 16(%rsi),%rsi
2879 » cmpq» $80,%rdx 2879 » cmpq» $0x50,%rdx
2880 jbe L$cbc_dec_tail 2880 jbe L$cbc_dec_tail
2881 2881
2882 movaps %xmm11,%xmm2 2882 movaps %xmm11,%xmm2
2883 L$cbc_dec_six_or_seven: 2883 L$cbc_dec_six_or_seven:
2884 » cmpq» $96,%rdx 2884 » cmpq» $0x60,%rdx
2885 ja L$cbc_dec_seven 2885 ja L$cbc_dec_seven
2886 2886
2887 movaps %xmm7,%xmm8 2887 movaps %xmm7,%xmm8
2888 call _aesni_decrypt6 2888 call _aesni_decrypt6
2889 pxor %xmm10,%xmm2 2889 pxor %xmm10,%xmm2
2890 movaps %xmm8,%xmm10 2890 movaps %xmm8,%xmm10
2891 pxor %xmm11,%xmm3 2891 pxor %xmm11,%xmm3
2892 movdqu %xmm2,(%rsi) 2892 movdqu %xmm2,(%rsi)
2893 pxor %xmm12,%xmm4 2893 pxor %xmm12,%xmm4
2894 movdqu %xmm3,16(%rsi) 2894 movdqu %xmm3,16(%rsi)
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
2967 movdqu %xmm3,16(%rsi) 2967 movdqu %xmm3,16(%rsi)
2968 pxor %xmm13,%xmm5 2968 pxor %xmm13,%xmm5
2969 movdqu %xmm4,32(%rsi) 2969 movdqu %xmm4,32(%rsi)
2970 pxor %xmm14,%xmm6 2970 pxor %xmm14,%xmm6
2971 movq %r11,%rcx 2971 movq %r11,%rcx
2972 movdqu %xmm5,48(%rsi) 2972 movdqu %xmm5,48(%rsi)
2973 pxor %xmm15,%xmm7 2973 pxor %xmm15,%xmm7
2974 movl %r10d,%eax 2974 movl %r10d,%eax
2975 movdqu %xmm6,64(%rsi) 2975 movdqu %xmm6,64(%rsi)
2976 leaq 80(%rsi),%rsi 2976 leaq 80(%rsi),%rsi
2977 » subq» $96,%rdx 2977 » subq» $0x60,%rdx
2978 ja L$cbc_dec_loop6 2978 ja L$cbc_dec_loop6
2979 2979
2980 movdqa %xmm7,%xmm2 2980 movdqa %xmm7,%xmm2
2981 » addq» $80,%rdx 2981 » addq» $0x50,%rdx
2982 jle L$cbc_dec_clear_tail_collected 2982 jle L$cbc_dec_clear_tail_collected
2983 movups %xmm7,(%rsi) 2983 movups %xmm7,(%rsi)
2984 leaq 16(%rsi),%rsi 2984 leaq 16(%rsi),%rsi
2985 2985
2986 L$cbc_dec_tail: 2986 L$cbc_dec_tail:
2987 movups (%rdi),%xmm2 2987 movups (%rdi),%xmm2
2988 » subq» $16,%rdx 2988 » subq» $0x10,%rdx
2989 jbe L$cbc_dec_one 2989 jbe L$cbc_dec_one
2990 2990
2991 movups 16(%rdi),%xmm3 2991 movups 16(%rdi),%xmm3
2992 movaps %xmm2,%xmm11 2992 movaps %xmm2,%xmm11
2993 » subq» $16,%rdx 2993 » subq» $0x10,%rdx
2994 jbe L$cbc_dec_two 2994 jbe L$cbc_dec_two
2995 2995
2996 movups 32(%rdi),%xmm4 2996 movups 32(%rdi),%xmm4
2997 movaps %xmm3,%xmm12 2997 movaps %xmm3,%xmm12
2998 » subq» $16,%rdx 2998 » subq» $0x10,%rdx
2999 jbe L$cbc_dec_three 2999 jbe L$cbc_dec_three
3000 3000
3001 movups 48(%rdi),%xmm5 3001 movups 48(%rdi),%xmm5
3002 movaps %xmm4,%xmm13 3002 movaps %xmm4,%xmm13
3003 » subq» $16,%rdx 3003 » subq» $0x10,%rdx
3004 jbe L$cbc_dec_four 3004 jbe L$cbc_dec_four
3005 3005
3006 movups 64(%rdi),%xmm6 3006 movups 64(%rdi),%xmm6
3007 movaps %xmm5,%xmm14 3007 movaps %xmm5,%xmm14
3008 movaps %xmm6,%xmm15 3008 movaps %xmm6,%xmm15
3009 xorps %xmm7,%xmm7 3009 xorps %xmm7,%xmm7
3010 call _aesni_decrypt6 3010 call _aesni_decrypt6
3011 pxor %xmm10,%xmm2 3011 pxor %xmm10,%xmm2
3012 movaps %xmm15,%xmm10 3012 movaps %xmm15,%xmm10
3013 pxor %xmm11,%xmm3 3013 pxor %xmm11,%xmm3
3014 movdqu %xmm2,(%rsi) 3014 movdqu %xmm2,(%rsi)
3015 pxor %xmm12,%xmm4 3015 pxor %xmm12,%xmm4
3016 movdqu %xmm3,16(%rsi) 3016 movdqu %xmm3,16(%rsi)
3017 pxor %xmm3,%xmm3 3017 pxor %xmm3,%xmm3
3018 pxor %xmm13,%xmm5 3018 pxor %xmm13,%xmm5
3019 movdqu %xmm4,32(%rsi) 3019 movdqu %xmm4,32(%rsi)
3020 pxor %xmm4,%xmm4 3020 pxor %xmm4,%xmm4
3021 pxor %xmm14,%xmm6 3021 pxor %xmm14,%xmm6
3022 movdqu %xmm5,48(%rsi) 3022 movdqu %xmm5,48(%rsi)
3023 pxor %xmm5,%xmm5 3023 pxor %xmm5,%xmm5
3024 leaq 64(%rsi),%rsi 3024 leaq 64(%rsi),%rsi
3025 movdqa %xmm6,%xmm2 3025 movdqa %xmm6,%xmm2
3026 pxor %xmm6,%xmm6 3026 pxor %xmm6,%xmm6
3027 pxor %xmm7,%xmm7 3027 pxor %xmm7,%xmm7
3028 » subq» $16,%rdx 3028 » subq» $0x10,%rdx
3029 jmp L$cbc_dec_tail_collected 3029 jmp L$cbc_dec_tail_collected
3030 3030
3031 .p2align 4 3031 .p2align 4
3032 L$cbc_dec_one: 3032 L$cbc_dec_one:
3033 movaps %xmm2,%xmm11 3033 movaps %xmm2,%xmm11
3034 movups (%rcx),%xmm0 3034 movups (%rcx),%xmm0
3035 movups 16(%rcx),%xmm1 3035 movups 16(%rcx),%xmm1
3036 leaq 32(%rcx),%rcx 3036 leaq 32(%rcx),%rcx
3037 xorps %xmm0,%xmm2 3037 xorps %xmm0,%xmm2
3038 L$oop_dec1_17: 3038 L$oop_dec1_17:
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
3337 leaq 24(%rax),%rax 3337 leaq 24(%rax),%rax
3338 3338
3339 movdqa %xmm0,%xmm3 3339 movdqa %xmm0,%xmm3
3340 pslldq $4,%xmm0 3340 pslldq $4,%xmm0
3341 pxor %xmm0,%xmm3 3341 pxor %xmm0,%xmm3
3342 pslldq $4,%xmm0 3342 pslldq $4,%xmm0
3343 pxor %xmm0,%xmm3 3343 pxor %xmm0,%xmm3
3344 pslldq $4,%xmm0 3344 pslldq $4,%xmm0
3345 pxor %xmm3,%xmm0 3345 pxor %xmm3,%xmm0
3346 3346
3347 » pshufd» $255,%xmm0,%xmm3 3347 » pshufd» $0xff,%xmm0,%xmm3
3348 pxor %xmm1,%xmm3 3348 pxor %xmm1,%xmm3
3349 pslldq $4,%xmm1 3349 pslldq $4,%xmm1
3350 pxor %xmm1,%xmm3 3350 pxor %xmm1,%xmm3
3351 3351
3352 pxor %xmm2,%xmm0 3352 pxor %xmm2,%xmm0
3353 pxor %xmm3,%xmm2 3353 pxor %xmm3,%xmm2
3354 movdqu %xmm0,-16(%rax) 3354 movdqu %xmm0,-16(%rax)
3355 3355
3356 decl %r10d 3356 decl %r10d
3357 jnz L$oop_key192 3357 jnz L$oop_key192
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
3424 pslldq $4,%xmm0 3424 pslldq $4,%xmm0
3425 pxor %xmm3,%xmm0 3425 pxor %xmm3,%xmm0
3426 pslld $1,%xmm4 3426 pslld $1,%xmm4
3427 3427
3428 pxor %xmm2,%xmm0 3428 pxor %xmm2,%xmm0
3429 movdqu %xmm0,(%rax) 3429 movdqu %xmm0,(%rax)
3430 3430
3431 decl %r10d 3431 decl %r10d
3432 jz L$done_key256 3432 jz L$done_key256
3433 3433
3434 » pshufd» $255,%xmm0,%xmm2 3434 » pshufd» $0xff,%xmm0,%xmm2
3435 pxor %xmm3,%xmm3 3435 pxor %xmm3,%xmm3
3436 .byte 102,15,56,221,211 3436 .byte 102,15,56,221,211
3437 3437
3438 movdqa %xmm1,%xmm3 3438 movdqa %xmm1,%xmm3
3439 pslldq $4,%xmm1 3439 pslldq $4,%xmm1
3440 pxor %xmm1,%xmm3 3440 pxor %xmm1,%xmm3
3441 pslldq $4,%xmm1 3441 pslldq $4,%xmm1
3442 pxor %xmm1,%xmm3 3442 pxor %xmm1,%xmm3
3443 pslldq $4,%xmm1 3443 pslldq $4,%xmm1
3444 pxor %xmm3,%xmm1 3444 pxor %xmm3,%xmm1
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
3555 L$key_rotate192: 3555 L$key_rotate192:
3556 .long 0x04070605,0x04070605,0x04070605,0x04070605 3556 .long 0x04070605,0x04070605,0x04070605,0x04070605
3557 L$key_rcon1: 3557 L$key_rcon1:
3558 .long 1,1,1,1 3558 .long 1,1,1,1
3559 L$key_rcon1b: 3559 L$key_rcon1b:
3560 .long 0x1b,0x1b,0x1b,0x1b 3560 .long 0x1b,0x1b,0x1b,0x1b
3561 3561
3562 .byte 65,69,83,32,102,111,114,32,73,110,116,101,108,32,65,69,83,45,78,73,44,32 ,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101 ,110,115,115,108,46,111,114,103,62,0 3562 .byte 65,69,83,32,102,111,114,32,73,110,116,101,108,32,65,69,83,45,78,73,44,32 ,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101 ,110,115,115,108,46,111,114,103,62,0
3563 .p2align 6 3563 .p2align 6
3564 #endif 3564 #endif
OLDNEW
« no previous file with comments | « third_party/boringssl/mac-x86_64/crypto/aes/aes-x86_64.S ('k') | third_party/boringssl/mac-x86_64/crypto/aes/bsaes-x86_64.S » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698