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 global _OPENSSL_ia32_cpuid
20 L$
_OPENSSL_ia32_cpuid_begin:
38 mov esi,DWORD [20+esp]
91 jb NEAR L
$003cacheinfo
92 mov esi,DWORD [20+esp]
100 jb NEAR L
$004nocacheinfo
113 jne NEAR L
$005notintel
117 jne NEAR L
$005notintel
121 jnc NEAR L
$002generic
136 jnc NEAR L
$006clear_avx
143 je NEAR L
$006clear_avx
149 mov edi,DWORD [20+esp]
150 and DWORD [8+edi],4294967263
160 ;extern _OPENSSL_ia32cap_P
161 global _OPENSSL_rdtsc
164 L$
_OPENSSL_rdtsc_begin:
167 lea ecx,[_OPENSSL_ia32cap_P
]
173 global _OPENSSL_instrument_halt
175 _OPENSSL_instrument_halt:
176 L$
_OPENSSL_instrument_halt_begin:
177 lea ecx,[_OPENSSL_ia32cap_P
]
193 sbb edx,DWORD [4+esp]
200 global _OPENSSL_far_spin
203 L$
_OPENSSL_far_spin_begin:
208 mov eax,DWORD [4+esp]
209 mov ecx,DWORD [8+esp]
225 global _OPENSSL_wipe_cpu
228 L$
_OPENSSL_wipe_cpu_begin:
231 lea ecx,[_OPENSSL_ia32cap_P
]
235 dd 4007259865,4007259865,4007259865,4007259865,2430851995
239 global _OPENSSL_atomic_add
242 L$
_OPENSSL_atomic_add_begin:
243 mov edx,DWORD [4+esp]
244 mov ecx,DWORD [8+esp]
256 global _OPENSSL_indirect_call
258 _OPENSSL_indirect_call:
259 L$
_OPENSSL_indirect_call_begin:
263 mov ecx,DWORD [12+ebp]
265 mov edx,DWORD [16+ebp]
266 mov DWORD [4+esp],edx
267 mov eax,DWORD [20+ebp]
268 mov DWORD [8+esp],eax
269 mov eax,DWORD [24+ebp]
270 mov DWORD [12+esp],eax
271 mov eax,DWORD [28+ebp]
272 mov DWORD [16+esp],eax
273 mov eax,DWORD [32+ebp]
274 mov DWORD [20+esp],eax
275 mov eax,DWORD [36+ebp]
276 mov DWORD [24+esp],eax
281 global _OPENSSL_ia32_rdrand
283 _OPENSSL_ia32_rdrand:
284 L$
_OPENSSL_ia32_rdrand_begin:
295 common _OPENSSL_ia32cap_P
16