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 jnc NEAR L
$002generic
132 jnc NEAR L
$006clear_avx
139 je NEAR L
$006clear_avx
145 mov edi,DWORD [20+esp]
146 and DWORD [8+edi],4294967263
156 ;extern _OPENSSL_ia32cap_P
157 global _OPENSSL_rdtsc
160 L$
_OPENSSL_rdtsc_begin:
163 lea ecx,[_OPENSSL_ia32cap_P
]
169 global _OPENSSL_instrument_halt
171 _OPENSSL_instrument_halt:
172 L$
_OPENSSL_instrument_halt_begin:
173 lea ecx,[_OPENSSL_ia32cap_P
]
189 sbb edx,DWORD [4+esp]
196 global _OPENSSL_far_spin
199 L$
_OPENSSL_far_spin_begin:
204 mov eax,DWORD [4+esp]
205 mov ecx,DWORD [8+esp]
221 global _OPENSSL_wipe_cpu
224 L$
_OPENSSL_wipe_cpu_begin:
227 lea ecx,[_OPENSSL_ia32cap_P
]
231 dd 4007259865,4007259865,4007259865,4007259865,2430851995
235 global _OPENSSL_atomic_add
238 L$
_OPENSSL_atomic_add_begin:
239 mov edx,DWORD [4+esp]
240 mov ecx,DWORD [8+esp]
252 global _OPENSSL_indirect_call
254 _OPENSSL_indirect_call:
255 L$
_OPENSSL_indirect_call_begin:
259 mov ecx,DWORD [12+ebp]
261 mov edx,DWORD [16+ebp]
262 mov DWORD [4+esp],edx
263 mov eax,DWORD [20+ebp]
264 mov DWORD [8+esp],eax
265 mov eax,DWORD [24+ebp]
266 mov DWORD [12+esp],eax
267 mov eax,DWORD [28+ebp]
268 mov DWORD [16+esp],eax
269 mov eax,DWORD [32+ebp]
270 mov DWORD [20+esp],eax
271 mov eax,DWORD [36+ebp]
272 mov DWORD [24+esp],eax
277 global _OPENSSL_ia32_rdrand
279 _OPENSSL_ia32_rdrand:
280 L$
_OPENSSL_ia32_rdrand_begin:
291 common _OPENSSL_ia32cap_P
16