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
27 mov edi,DWORD [40+esp]
29 jl NEAR L
$000just_leave
35 lea esp,[edi*4+esp-32]
49 mov edx,DWORD [12+esi]
50 mov esi,DWORD [16+esi]
54 mov DWORD [12+esp],ecx
55 mov DWORD [16+esp],edx
56 mov DWORD [20+esp],esi
58 mov DWORD [24+esp],ebp
59 lea eax,[_OPENSSL_ia32cap_P
]
61 jnc NEAR L
$001non_sse2
65 mov edi,DWORD [12+esp]
66 mov ebp,DWORD [16+esp]
79 movd mm1
,DWORD [4+ebp]
80 movd mm0
,DWORD [4+esi]
92 movd mm1
,DWORD [4+ecx*4+ebp]
94 movd mm0
,DWORD [4+ecx*4+esi]
96 movd
DWORD [28+ecx*4+esp],mm3
108 movd
DWORD [28+ecx*4+esp],mm3
112 movq
[32+ebx*4+esp],mm3
116 movd mm4
,DWORD [edx*4+edi]
118 movd mm6
,DWORD [32+esp]
128 movd mm6
,DWORD [36+esp]
129 movd mm1
,DWORD [4+ebp]
130 movd mm0
,DWORD [4+esi]
142 movd mm6
,DWORD [36+ecx*4+esp]
144 movd mm1
,DWORD [4+ecx*4+ebp]
146 movd mm0
,DWORD [4+ecx*4+esi]
148 movd
DWORD [28+ecx*4+esp],mm3
162 movd
DWORD [28+ecx*4+esp],mm3
165 movd mm6
,DWORD [36+ebx*4+esp]
168 movq
[32+ebx*4+esp],mm3
173 jmp NEAR L
$005common_tail
176 mov esi,DWORD [8+esp]
178 mov edi,DWORD [12+esp]
183 lea eax,[4+ebx*4+edi]
186 jz NEAR L
$006bn_sqr_mont
187 mov DWORD [28+esp],eax
197 mov eax,DWORD [ecx*4+esi]
199 mov DWORD [28+ecx*4+esp],ebp
203 mov edi,DWORD [20+esp]
205 mov esi,DWORD [16+esp]
207 imul
edi,DWORD [32+esp]
208 mov DWORD [32+ebx*4+esp],eax
210 mov DWORD [36+ebx*4+esp],edx
211 mov DWORD [40+ebx*4+esp],ecx
214 add eax,DWORD [32+esp]
215 mov eax,DWORD [4+esi]
218 jmp NEAR L
$0082ndmadd
223 add ebp,DWORD [32+ecx*4+esp]
227 mov eax,DWORD [ecx*4+esi]
230 mov DWORD [28+ecx*4+esp],ebp
234 add eax,DWORD [32+ebx*4+esp]
235 mov edi,DWORD [20+esp]
237 mov esi,DWORD [16+esp]
240 imul
edi,DWORD [32+esp]
242 add edx,DWORD [36+ebx*4+esp]
243 mov DWORD [32+ebx*4+esp],ebp
246 mov DWORD [36+ebx*4+esp],edx
247 mov DWORD [40+ebx*4+esp],ecx
249 add eax,DWORD [32+esp]
250 mov eax,DWORD [4+esi]
257 add ebp,DWORD [32+ecx*4+esp]
261 mov eax,DWORD [ecx*4+esi]
264 mov DWORD [24+ecx*4+esp],ebp
268 add ebp,DWORD [32+ebx*4+esp]
272 mov DWORD [28+ebx*4+esp],ebp
274 mov ecx,DWORD [12+esp]
275 add edx,DWORD [36+ebx*4+esp]
276 adc eax,DWORD [40+ebx*4+esp]
278 mov DWORD [32+ebx*4+esp],edx
279 cmp ecx,DWORD [28+esp]
280 mov DWORD [36+ebx*4+esp],eax
281 je NEAR L
$005common_tail
283 mov esi,DWORD [8+esp]
284 mov DWORD [12+esp],ecx
288 jmp NEAR L
$0091stmadd
292 mov DWORD [12+esp],ecx
295 mov DWORD [32+esp],eax
302 mov eax,DWORD [ecx*4+esi]
312 mov DWORD [28+ecx*4+esp],ebp
314 mov eax,DWORD [ecx*4+esi]
318 mov edi,DWORD [20+esp]
320 mov esi,DWORD [16+esp]
322 imul
edi,DWORD [32+esp]
324 mov DWORD [32+ecx*4+esp],ebp
328 mov DWORD [36+ecx*4+esp],ebp
329 mov DWORD [40+ecx*4+esp],edx
331 add eax,DWORD [32+esp]
334 mov eax,DWORD [4+esi]
340 add ebp,DWORD [32+ecx*4+esp]
343 mov eax,DWORD [4+ecx*4+esi]
345 mov DWORD [28+ecx*4+esp],ebp
348 add ebp,DWORD [36+ecx*4+esp]
352 mov eax,DWORD [ecx*4+esi]
355 mov DWORD [24+ecx*4+esp],ebp
359 add ebp,DWORD [32+ebx*4+esp]
363 mov DWORD [28+ebx*4+esp],ebp
364 mov ecx,DWORD [12+esp]
366 mov esi,DWORD [8+esp]
367 add edx,DWORD [36+ebx*4+esp]
368 adc eax,DWORD [40+ebx*4+esp]
369 mov DWORD [32+ebx*4+esp],edx
371 mov DWORD [36+ebx*4+esp],eax
372 je NEAR L
$005common_tail
373 mov edi,DWORD [4+ecx*4+esi]
376 mov DWORD [12+esp],ecx
378 add eax,DWORD [32+ecx*4+esp]
380 mov DWORD [32+ecx*4+esp],eax
390 mov eax,DWORD [ecx*4+esi]
397 add ebp,DWORD [32+ecx*4+esp]
403 mov DWORD [28+ecx*4+esp],ebp
412 mov edi,DWORD [20+esp]
413 mov esi,DWORD [16+esp]
414 imul
edi,DWORD [32+esp]
415 add edx,DWORD [32+ecx*4+esp]
418 mov DWORD [32+ecx*4+esp],edx
419 mov DWORD [36+ecx*4+esp],ebp
421 add eax,DWORD [32+esp]
425 mov eax,DWORD [4+esi]
426 jmp NEAR L
$0113rdmadd
429 mov ebp,DWORD [16+esp]
430 mov edi,DWORD [4+esp]
437 sbb eax,DWORD [edx*4+ebp]
438 mov DWORD [edx*4+edi],eax
440 mov eax,DWORD [4+edx*4+esi]
446 mov edx,DWORD [ebx*4+esi]
447 mov ebp,DWORD [ebx*4+edi]
451 mov DWORD [ebx*4+esi],ecx
452 mov DWORD [ebx*4+edi],edx
455 mov esp,DWORD [24+esp]
463 db 77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105
464 db 112,108,105,99,97,116,105,111,110,32,102,111,114,32,120,56
465 db 54,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121
466 db 32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46
469 common _OPENSSL_ia32cap_P
16