1 %ifidn __OUTPUT_FORMAT__
,obj
2 section code use32 class
=code
align=64
3 %elifidn __OUTPUT_FORMAT__
,win32
4 %ifdef __YASM_VERSION_ID__
5 %if __YASM_VERSION_ID__
< 01010000h
6 %error yasm version
1.1.0 or later needed.
8 ; Yasm automatically includes .00 and complains about redefining it.
9 ; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html
13 section .text code
align=64
17 ;extern _OPENSSL_ia32cap_P
18 global _sha512_block_data_order
20 _sha512_block_data_order:
21 L$
_sha512_block_data_order_begin:
26 mov esi,DWORD [20+esp]
27 mov edi,DWORD [24+esp]
28 mov eax,DWORD [28+esp]
33 lea ebp,[(L
$001K512
-L
$000pic_point
)+ebp]
41 mov DWORD [12+esp],ebx
42 lea edx,[_OPENSSL_ia32cap_P
]
61 jmp NEAR L
$004loop_sse2
78 jmp NEAR L
$00500_14_sse2
141 jnz NEAR L
$00500_14_sse2
197 jmp NEAR L
$00616_79_sse2
353 jnz NEAR L
$00616_79_sse2
380 cmp edi,DWORD [88+esp]
381 jb NEAR L
$004loop_sse2
382 mov esp,DWORD [92+esp]
393 movdqa xmm1
,[640+ebp]
401 movdqa
[edx-128],xmm3
407 movdqa
[edx-112],xmm4
436 movdqu xmm7
,[112+edi]
441 movdqa xmm2
,[112+ebp]
464 jmp NEAR L
$00800_47_ssse3
469 db 102,15,58,15,208,8
471 db 102,15,58,15,220,8
593 movdqa
[edx-128],xmm2
596 db 102,15,58,15,217,8
598 db 102,15,58,15,229,8
720 movdqa
[edx-112],xmm3
723 db 102,15,58,15,226,8
725 db 102,15,58,15,238,8
850 db 102,15,58,15,235,8
852 db 102,15,58,15,247,8
977 db 102,15,58,15,244,8
979 db 102,15,58,15,248,8
1004 movdqa xmm7
,[32+edx]
1006 movdqa xmm6
,[64+ebp]
1101 movdqa
[edx-64],xmm6
1104 db 102,15,58,15,253,8
1105 movdqa
[16+edx],xmm1
1106 db 102,15,58,15,193,8
1131 movdqa xmm0
,[48+edx]
1133 movdqa xmm7
,[80+ebp]
1228 movdqa
[edx-48],xmm7
1231 db 102,15,58,15,198,8
1232 movdqa
[32+edx],xmm2
1233 db 102,15,58,15,202,8
1260 movdqa xmm0
,[96+ebp]
1355 movdqa
[edx-32],xmm0
1358 db 102,15,58,15,207,8
1359 movdqa
[48+edx],xmm3
1360 db 102,15,58,15,211,8
1385 movdqa xmm2
,[16+edx]
1387 movdqa xmm1
,[112+ebp]
1482 movdqa
[edx-16],xmm1
1485 jnz NEAR L
$00800_47_ssse3
1492 movdqu xmm1
,[16+ebx]
1587 movdqa
[edx-128],xmm3
1588 movdqa xmm4
,[16+ebp]
1590 movdqu xmm2
,[32+ebx]
1685 movdqa
[edx-112],xmm4
1686 movdqa xmm5
,[32+ebp]
1688 movdqu xmm3
,[48+ebx]
1783 movdqa
[edx-96],xmm5
1784 movdqa xmm6
,[48+ebp]
1786 movdqu xmm4
,[64+ebx]
1881 movdqa
[edx-80],xmm6
1882 movdqa xmm7
,[64+ebp]
1884 movdqu xmm5
,[80+ebx]
1979 movdqa
[edx-64],xmm7
1981 movdqa xmm0
,[80+ebp]
1983 movdqu xmm6
,[96+ebx]
2078 movdqa
[edx-48],xmm0
2079 movdqa
[16+edx],xmm1
2080 movdqa xmm1
,[96+ebp]
2082 movdqu xmm7
,[112+ebx]
2177 movdqa
[edx-32],xmm1
2178 movdqa
[32+edx],xmm2
2179 movdqa xmm2
,[112+ebp]
2274 movdqa
[edx-16],xmm2
2297 jb NEAR L
$007loop_ssse3
2298 mov esp,DWORD [76+edx]
2308 mov ebx,DWORD [4+edi]
2309 mov ecx,DWORD [8+edi]
2310 mov edx,DWORD [12+edi]
2319 mov eax,DWORD [16+edi]
2320 mov ebx,DWORD [20+edi]
2321 mov ecx,DWORD [24+edi]
2322 mov edx,DWORD [28+edi]
2331 mov eax,DWORD [32+edi]
2332 mov ebx,DWORD [36+edi]
2333 mov ecx,DWORD [40+edi]
2334 mov edx,DWORD [44+edi]
2343 mov eax,DWORD [48+edi]
2344 mov ebx,DWORD [52+edi]
2345 mov ecx,DWORD [56+edi]
2346 mov edx,DWORD [60+edi]
2355 mov eax,DWORD [64+edi]
2356 mov ebx,DWORD [68+edi]
2357 mov ecx,DWORD [72+edi]
2358 mov edx,DWORD [76+edi]
2367 mov eax,DWORD [80+edi]
2368 mov ebx,DWORD [84+edi]
2369 mov ecx,DWORD [88+edi]
2370 mov edx,DWORD [92+edi]
2379 mov eax,DWORD [96+edi]
2380 mov ebx,DWORD [100+edi]
2381 mov ecx,DWORD [104+edi]
2382 mov edx,DWORD [108+edi]
2391 mov eax,DWORD [112+edi]
2392 mov ebx,DWORD [116+edi]
2393 mov ecx,DWORD [120+edi]
2394 mov edx,DWORD [124+edi]
2405 mov DWORD [204+esp],edi
2411 mov ecx,DWORD [40+esp]
2412 mov edx,DWORD [44+esp]
2439 mov ecx,DWORD [48+esp]
2440 mov edx,DWORD [52+esp]
2441 mov esi,DWORD [56+esp]
2442 mov edi,DWORD [60+esp]
2443 add eax,DWORD [64+esp]
2444 adc ebx,DWORD [68+esp]
2447 and ecx,DWORD [40+esp]
2448 and edx,DWORD [44+esp]
2449 add eax,DWORD [192+esp]
2450 adc ebx,DWORD [196+esp]
2454 mov edi,DWORD [4+ebp]
2457 mov ecx,DWORD [32+esp]
2458 mov edx,DWORD [36+esp]
2462 mov DWORD [4+esp],ebx
2465 mov ecx,DWORD [8+esp]
2466 mov edx,DWORD [12+esp]
2467 mov DWORD [32+esp],eax
2468 mov DWORD [36+esp],ebx
2495 mov ecx,DWORD [8+esp]
2496 mov edx,DWORD [12+esp]
2497 mov esi,DWORD [16+esp]
2498 mov edi,DWORD [20+esp]
2500 adc ebx,DWORD [4+esp]
2503 and ecx,DWORD [24+esp]
2504 and edx,DWORD [28+esp]
2505 and esi,DWORD [8+esp]
2506 and edi,DWORD [12+esp]
2512 mov DWORD [4+esp],ebx
2517 jne NEAR L
$00900_15_x86
2520 mov ecx,DWORD [312+esp]
2521 mov edx,DWORD [316+esp]
2547 mov DWORD [4+esp],ebx
2548 mov ecx,DWORD [208+esp]
2549 mov edx,DWORD [212+esp]
2574 mov ecx,DWORD [320+esp]
2575 mov edx,DWORD [324+esp]
2577 adc ebx,DWORD [4+esp]
2578 mov esi,DWORD [248+esp]
2579 mov edi,DWORD [252+esp]
2584 mov DWORD [192+esp],eax
2585 mov DWORD [196+esp],ebx
2586 mov ecx,DWORD [40+esp]
2587 mov edx,DWORD [44+esp]
2614 mov ecx,DWORD [48+esp]
2615 mov edx,DWORD [52+esp]
2616 mov esi,DWORD [56+esp]
2617 mov edi,DWORD [60+esp]
2618 add eax,DWORD [64+esp]
2619 adc ebx,DWORD [68+esp]
2622 and ecx,DWORD [40+esp]
2623 and edx,DWORD [44+esp]
2624 add eax,DWORD [192+esp]
2625 adc ebx,DWORD [196+esp]
2629 mov edi,DWORD [4+ebp]
2632 mov ecx,DWORD [32+esp]
2633 mov edx,DWORD [36+esp]
2637 mov DWORD [4+esp],ebx
2640 mov ecx,DWORD [8+esp]
2641 mov edx,DWORD [12+esp]
2642 mov DWORD [32+esp],eax
2643 mov DWORD [36+esp],ebx
2670 mov ecx,DWORD [8+esp]
2671 mov edx,DWORD [12+esp]
2672 mov esi,DWORD [16+esp]
2673 mov edi,DWORD [20+esp]
2675 adc ebx,DWORD [4+esp]
2678 and ecx,DWORD [24+esp]
2679 and edx,DWORD [28+esp]
2680 and esi,DWORD [8+esp]
2681 and edi,DWORD [12+esp]
2687 mov DWORD [4+esp],ebx
2692 jne NEAR L
$01016_79_x86
2693 mov esi,DWORD [840+esp]
2694 mov edi,DWORD [844+esp]
2696 mov ebx,DWORD [4+esi]
2697 mov ecx,DWORD [8+esi]
2698 mov edx,DWORD [12+esi]
2699 add eax,DWORD [8+esp]
2700 adc ebx,DWORD [12+esp]
2702 mov DWORD [4+esi],ebx
2703 add ecx,DWORD [16+esp]
2704 adc edx,DWORD [20+esp]
2705 mov DWORD [8+esi],ecx
2706 mov DWORD [12+esi],edx
2707 mov eax,DWORD [16+esi]
2708 mov ebx,DWORD [20+esi]
2709 mov ecx,DWORD [24+esi]
2710 mov edx,DWORD [28+esi]
2711 add eax,DWORD [24+esp]
2712 adc ebx,DWORD [28+esp]
2713 mov DWORD [16+esi],eax
2714 mov DWORD [20+esi],ebx
2715 add ecx,DWORD [32+esp]
2716 adc edx,DWORD [36+esp]
2717 mov DWORD [24+esi],ecx
2718 mov DWORD [28+esi],edx
2719 mov eax,DWORD [32+esi]
2720 mov ebx,DWORD [36+esi]
2721 mov ecx,DWORD [40+esi]
2722 mov edx,DWORD [44+esi]
2723 add eax,DWORD [40+esp]
2724 adc ebx,DWORD [44+esp]
2725 mov DWORD [32+esi],eax
2726 mov DWORD [36+esi],ebx
2727 add ecx,DWORD [48+esp]
2728 adc edx,DWORD [52+esp]
2729 mov DWORD [40+esi],ecx
2730 mov DWORD [44+esi],edx
2731 mov eax,DWORD [48+esi]
2732 mov ebx,DWORD [52+esi]
2733 mov ecx,DWORD [56+esi]
2734 mov edx,DWORD [60+esi]
2735 add eax,DWORD [56+esp]
2736 adc ebx,DWORD [60+esp]
2737 mov DWORD [48+esi],eax
2738 mov DWORD [52+esi],ebx
2739 add ecx,DWORD [64+esp]
2740 adc edx,DWORD [68+esp]
2741 mov DWORD [56+esi],ecx
2742 mov DWORD [60+esi],edx
2745 cmp edi,DWORD [8+esp]
2746 jb NEAR L
$002loop_x86
2747 mov esp,DWORD [12+esp]
2755 dd 3609767458,1116352408
2756 dd 602891725,1899447441
2757 dd 3964484399,3049323471
2758 dd 2173295548,3921009573
2759 dd 4081628472,961987163
2760 dd 3053834265,1508970993
2761 dd 2937671579,2453635748
2762 dd 3664609560,2870763221
2763 dd 2734883394,3624381080
2764 dd 1164996542,310598401
2765 dd 1323610764,607225278
2766 dd 3590304994,1426881987
2767 dd 4068182383,1925078388
2768 dd 991336113,2162078206
2769 dd 633803317,2614888103
2770 dd 3479774868,3248222580
2771 dd 2666613458,3835390401
2772 dd 944711139,4022224774
2773 dd 2341262773,264347078
2774 dd 2007800933,604807628
2775 dd 1495990901,770255983
2776 dd 1856431235,1249150122
2777 dd 3175218132,1555081692
2778 dd 2198950837,1996064986
2779 dd 3999719339,2554220882
2780 dd 766784016,2821834349
2781 dd 2566594879,2952996808
2782 dd 3203337956,3210313671
2783 dd 1034457026,3336571891
2784 dd 2466948901,3584528711
2785 dd 3758326383,113926993
2786 dd 168717936,338241895
2787 dd 1188179964,666307205
2788 dd 1546045734,773529912
2789 dd 1522805485,1294757372
2790 dd 2643833823,1396182291
2791 dd 2343527390,1695183700
2792 dd 1014477480,1986661051
2793 dd 1206759142,2177026350
2794 dd 344077627,2456956037
2795 dd 1290863460,2730485921
2796 dd 3158454273,2820302411
2797 dd 3505952657,3259730800
2798 dd 106217008,3345764771
2799 dd 3606008344,3516065817
2800 dd 1432725776,3600352804
2801 dd 1467031594,4094571909
2802 dd 851169720,275423344
2803 dd 3100823752,430227734
2804 dd 1363258195,506948616
2805 dd 3750685593,659060556
2806 dd 3785050280,883997877
2807 dd 3318307427,958139571
2808 dd 3812723403,1322822218
2809 dd 2003034995,1537002063
2810 dd 3602036899,1747873779
2811 dd 1575990012,1955562222
2812 dd 1125592928,2024104815
2813 dd 2716904306,2227730452
2814 dd 442776044,2361852424
2815 dd 593698344,2428436474
2816 dd 3733110249,2756734187
2817 dd 2999351573,3204031479
2818 dd 3815920427,3329325298
2819 dd 3928383900,3391569614
2820 dd 566280711,3515267271
2821 dd 3454069534,3940187606
2822 dd 4000239992,4118630271
2823 dd 1914138554,116418474
2824 dd 2731055270,174292421
2825 dd 3203993006,289380356
2826 dd 320620315,460393269
2827 dd 587496836,685471733
2828 dd 1086792851,852142971
2829 dd 365543100,1017036298
2830 dd 2618297676,1126000580
2831 dd 3409855158,1288033470
2832 dd 4234509866,1501505948
2833 dd 987167468,1607167915
2834 dd 1246189591,1816402316
2836 dd 202182159,134810123
2837 db 83,72,65,53,49,50,32,98,108,111,99,107,32,116,114,97
2838 db 110,115,102,111,114,109,32,102,111,114,32,120,56,54,44,32
2839 db 67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97
2840 db 112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103
2843 common _OPENSSL_ia32cap_P
16