1 | .text
|
---|
2 | .globl _OPENSSL_ia32_cpuid
|
---|
3 | .align 4
|
---|
4 | _OPENSSL_ia32_cpuid:
|
---|
5 | L_OPENSSL_ia32_cpuid_begin:
|
---|
6 | #ifdef __CET__
|
---|
7 |
|
---|
8 | .byte 243,15,30,251
|
---|
9 | #endif
|
---|
10 |
|
---|
11 | pushl %ebp
|
---|
12 | pushl %ebx
|
---|
13 | pushl %esi
|
---|
14 | pushl %edi
|
---|
15 | xorl %edx,%edx
|
---|
16 | pushfl
|
---|
17 | popl %eax
|
---|
18 | movl %eax,%ecx
|
---|
19 | xorl $2097152,%eax
|
---|
20 | pushl %eax
|
---|
21 | popfl
|
---|
22 | pushfl
|
---|
23 | popl %eax
|
---|
24 | xorl %eax,%ecx
|
---|
25 | xorl %eax,%eax
|
---|
26 | movl 20(%esp),%esi
|
---|
27 | movl %eax,8(%esi)
|
---|
28 | btl $21,%ecx
|
---|
29 | jnc L000nocpuid
|
---|
30 | .byte 0x0f,0xa2
|
---|
31 | movl %eax,%edi
|
---|
32 | xorl %eax,%eax
|
---|
33 | cmpl $1970169159,%ebx
|
---|
34 | setne %al
|
---|
35 | movl %eax,%ebp
|
---|
36 | cmpl $1231384169,%edx
|
---|
37 | setne %al
|
---|
38 | orl %eax,%ebp
|
---|
39 | cmpl $1818588270,%ecx
|
---|
40 | setne %al
|
---|
41 | orl %eax,%ebp
|
---|
42 | jz L001intel
|
---|
43 | cmpl $1752462657,%ebx
|
---|
44 | setne %al
|
---|
45 | movl %eax,%esi
|
---|
46 | cmpl $1769238117,%edx
|
---|
47 | setne %al
|
---|
48 | orl %eax,%esi
|
---|
49 | cmpl $1145913699,%ecx
|
---|
50 | setne %al
|
---|
51 | orl %eax,%esi
|
---|
52 | jnz L001intel
|
---|
53 | movl $2147483648,%eax
|
---|
54 | .byte 0x0f,0xa2
|
---|
55 | cmpl $2147483649,%eax
|
---|
56 | jb L001intel
|
---|
57 | movl %eax,%esi
|
---|
58 | movl $2147483649,%eax
|
---|
59 | .byte 0x0f,0xa2
|
---|
60 | orl %ecx,%ebp
|
---|
61 | andl $2049,%ebp
|
---|
62 | cmpl $2147483656,%esi
|
---|
63 | jb L001intel
|
---|
64 | movl $2147483656,%eax
|
---|
65 | .byte 0x0f,0xa2
|
---|
66 | movzbl %cl,%esi
|
---|
67 | incl %esi
|
---|
68 | movl $1,%eax
|
---|
69 | xorl %ecx,%ecx
|
---|
70 | .byte 0x0f,0xa2
|
---|
71 | btl $28,%edx
|
---|
72 | jnc L002generic
|
---|
73 | shrl $16,%ebx
|
---|
74 | andl $255,%ebx
|
---|
75 | cmpl %esi,%ebx
|
---|
76 | ja L002generic
|
---|
77 | andl $4026531839,%edx
|
---|
78 | jmp L002generic
|
---|
79 | L001intel:
|
---|
80 | cmpl $4,%edi
|
---|
81 | movl $-1,%esi
|
---|
82 | jb L003nocacheinfo
|
---|
83 | movl $4,%eax
|
---|
84 | movl $0,%ecx
|
---|
85 | .byte 0x0f,0xa2
|
---|
86 | movl %eax,%esi
|
---|
87 | shrl $14,%esi
|
---|
88 | andl $4095,%esi
|
---|
89 | L003nocacheinfo:
|
---|
90 | movl $1,%eax
|
---|
91 | xorl %ecx,%ecx
|
---|
92 | .byte 0x0f,0xa2
|
---|
93 | andl $3220176895,%edx
|
---|
94 | cmpl $0,%ebp
|
---|
95 | jne L004notintel
|
---|
96 | orl $1073741824,%edx
|
---|
97 | andb $15,%ah
|
---|
98 | cmpb $15,%ah
|
---|
99 | jne L004notintel
|
---|
100 | orl $1048576,%edx
|
---|
101 | L004notintel:
|
---|
102 | btl $28,%edx
|
---|
103 | jnc L002generic
|
---|
104 | andl $4026531839,%edx
|
---|
105 | cmpl $0,%esi
|
---|
106 | je L002generic
|
---|
107 | orl $268435456,%edx
|
---|
108 | shrl $16,%ebx
|
---|
109 | cmpb $1,%bl
|
---|
110 | ja L002generic
|
---|
111 | andl $4026531839,%edx
|
---|
112 | L002generic:
|
---|
113 | andl $2048,%ebp
|
---|
114 | andl $4294965247,%ecx
|
---|
115 | movl %edx,%esi
|
---|
116 | orl %ecx,%ebp
|
---|
117 | cmpl $7,%edi
|
---|
118 | movl 20(%esp),%edi
|
---|
119 | jb L005no_extended_info
|
---|
120 | movl $7,%eax
|
---|
121 | xorl %ecx,%ecx
|
---|
122 | .byte 0x0f,0xa2
|
---|
123 | movl %ebx,8(%edi)
|
---|
124 | L005no_extended_info:
|
---|
125 | btl $27,%ebp
|
---|
126 | jnc L006clear_avx
|
---|
127 | xorl %ecx,%ecx
|
---|
128 | .byte 15,1,208
|
---|
129 | andl $6,%eax
|
---|
130 | cmpl $6,%eax
|
---|
131 | je L007done
|
---|
132 | cmpl $2,%eax
|
---|
133 | je L006clear_avx
|
---|
134 | L008clear_xmm:
|
---|
135 | andl $4261412861,%ebp
|
---|
136 | andl $4278190079,%esi
|
---|
137 | L006clear_avx:
|
---|
138 | andl $4026525695,%ebp
|
---|
139 | andl $4294967263,8(%edi)
|
---|
140 | L007done:
|
---|
141 | movl %esi,%eax
|
---|
142 | movl %ebp,%edx
|
---|
143 | L000nocpuid:
|
---|
144 | popl %edi
|
---|
145 | popl %esi
|
---|
146 | popl %ebx
|
---|
147 | popl %ebp
|
---|
148 | ret
|
---|
149 | .globl _OPENSSL_rdtsc
|
---|
150 | .align 4
|
---|
151 | _OPENSSL_rdtsc:
|
---|
152 | L_OPENSSL_rdtsc_begin:
|
---|
153 | #ifdef __CET__
|
---|
154 |
|
---|
155 | .byte 243,15,30,251
|
---|
156 | #endif
|
---|
157 |
|
---|
158 | xorl %eax,%eax
|
---|
159 | xorl %edx,%edx
|
---|
160 | call L009PIC_me_up
|
---|
161 | L009PIC_me_up:
|
---|
162 | popl %ecx
|
---|
163 | movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L009PIC_me_up(%ecx),%ecx
|
---|
164 | btl $4,(%ecx)
|
---|
165 | jnc L010notsc
|
---|
166 | .byte 0x0f,0x31
|
---|
167 | L010notsc:
|
---|
168 | ret
|
---|
169 | .globl _OPENSSL_instrument_halt
|
---|
170 | .align 4
|
---|
171 | _OPENSSL_instrument_halt:
|
---|
172 | L_OPENSSL_instrument_halt_begin:
|
---|
173 | #ifdef __CET__
|
---|
174 |
|
---|
175 | .byte 243,15,30,251
|
---|
176 | #endif
|
---|
177 |
|
---|
178 | call L011PIC_me_up
|
---|
179 | L011PIC_me_up:
|
---|
180 | popl %ecx
|
---|
181 | movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L011PIC_me_up(%ecx),%ecx
|
---|
182 | btl $4,(%ecx)
|
---|
183 | jnc L012nohalt
|
---|
184 | .long 2421723150
|
---|
185 | andl $3,%eax
|
---|
186 | jnz L012nohalt
|
---|
187 | pushfl
|
---|
188 | popl %eax
|
---|
189 | btl $9,%eax
|
---|
190 | jnc L012nohalt
|
---|
191 | .byte 0x0f,0x31
|
---|
192 | pushl %edx
|
---|
193 | pushl %eax
|
---|
194 | hlt
|
---|
195 | .byte 0x0f,0x31
|
---|
196 | subl (%esp),%eax
|
---|
197 | sbbl 4(%esp),%edx
|
---|
198 | addl $8,%esp
|
---|
199 | ret
|
---|
200 | L012nohalt:
|
---|
201 | xorl %eax,%eax
|
---|
202 | xorl %edx,%edx
|
---|
203 | ret
|
---|
204 | .globl _OPENSSL_far_spin
|
---|
205 | .align 4
|
---|
206 | _OPENSSL_far_spin:
|
---|
207 | L_OPENSSL_far_spin_begin:
|
---|
208 | #ifdef __CET__
|
---|
209 |
|
---|
210 | .byte 243,15,30,251
|
---|
211 | #endif
|
---|
212 |
|
---|
213 | pushfl
|
---|
214 | popl %eax
|
---|
215 | btl $9,%eax
|
---|
216 | jnc L013nospin
|
---|
217 | movl 4(%esp),%eax
|
---|
218 | movl 8(%esp),%ecx
|
---|
219 | .long 2430111262
|
---|
220 | xorl %eax,%eax
|
---|
221 | movl (%ecx),%edx
|
---|
222 | jmp L014spin
|
---|
223 | .align 4,0x90
|
---|
224 | L014spin:
|
---|
225 | incl %eax
|
---|
226 | cmpl (%ecx),%edx
|
---|
227 | je L014spin
|
---|
228 | .long 529567888
|
---|
229 | ret
|
---|
230 | L013nospin:
|
---|
231 | xorl %eax,%eax
|
---|
232 | xorl %edx,%edx
|
---|
233 | ret
|
---|
234 | .globl _OPENSSL_wipe_cpu
|
---|
235 | .align 4
|
---|
236 | _OPENSSL_wipe_cpu:
|
---|
237 | L_OPENSSL_wipe_cpu_begin:
|
---|
238 | #ifdef __CET__
|
---|
239 |
|
---|
240 | .byte 243,15,30,251
|
---|
241 | #endif
|
---|
242 |
|
---|
243 | xorl %eax,%eax
|
---|
244 | xorl %edx,%edx
|
---|
245 | call L015PIC_me_up
|
---|
246 | L015PIC_me_up:
|
---|
247 | popl %ecx
|
---|
248 | movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L015PIC_me_up(%ecx),%ecx
|
---|
249 | movl (%ecx),%ecx
|
---|
250 | btl $1,(%ecx)
|
---|
251 | jnc L016no_x87
|
---|
252 | .long 4007259865,4007259865,4007259865,4007259865,2430851995
|
---|
253 | L016no_x87:
|
---|
254 | leal 4(%esp),%eax
|
---|
255 | ret
|
---|
256 | .globl _OPENSSL_atomic_add
|
---|
257 | .align 4
|
---|
258 | _OPENSSL_atomic_add:
|
---|
259 | L_OPENSSL_atomic_add_begin:
|
---|
260 | #ifdef __CET__
|
---|
261 |
|
---|
262 | .byte 243,15,30,251
|
---|
263 | #endif
|
---|
264 |
|
---|
265 | movl 4(%esp),%edx
|
---|
266 | movl 8(%esp),%ecx
|
---|
267 | pushl %ebx
|
---|
268 | nop
|
---|
269 | movl (%edx),%eax
|
---|
270 | L017spin:
|
---|
271 | leal (%eax,%ecx,1),%ebx
|
---|
272 | nop
|
---|
273 | .long 447811568
|
---|
274 | jne L017spin
|
---|
275 | movl %ebx,%eax
|
---|
276 | popl %ebx
|
---|
277 | ret
|
---|
278 | .globl _OPENSSL_cleanse
|
---|
279 | .align 4
|
---|
280 | _OPENSSL_cleanse:
|
---|
281 | L_OPENSSL_cleanse_begin:
|
---|
282 | #ifdef __CET__
|
---|
283 |
|
---|
284 | .byte 243,15,30,251
|
---|
285 | #endif
|
---|
286 |
|
---|
287 | movl 4(%esp),%edx
|
---|
288 | movl 8(%esp),%ecx
|
---|
289 | xorl %eax,%eax
|
---|
290 | cmpl $7,%ecx
|
---|
291 | jae L018lot
|
---|
292 | cmpl $0,%ecx
|
---|
293 | je L019ret
|
---|
294 | L020little:
|
---|
295 | movb %al,(%edx)
|
---|
296 | subl $1,%ecx
|
---|
297 | leal 1(%edx),%edx
|
---|
298 | jnz L020little
|
---|
299 | L019ret:
|
---|
300 | ret
|
---|
301 | .align 4,0x90
|
---|
302 | L018lot:
|
---|
303 | testl $3,%edx
|
---|
304 | jz L021aligned
|
---|
305 | movb %al,(%edx)
|
---|
306 | leal -1(%ecx),%ecx
|
---|
307 | leal 1(%edx),%edx
|
---|
308 | jmp L018lot
|
---|
309 | L021aligned:
|
---|
310 | movl %eax,(%edx)
|
---|
311 | leal -4(%ecx),%ecx
|
---|
312 | testl $-4,%ecx
|
---|
313 | leal 4(%edx),%edx
|
---|
314 | jnz L021aligned
|
---|
315 | cmpl $0,%ecx
|
---|
316 | jne L020little
|
---|
317 | ret
|
---|
318 | .globl _CRYPTO_memcmp
|
---|
319 | .align 4
|
---|
320 | _CRYPTO_memcmp:
|
---|
321 | L_CRYPTO_memcmp_begin:
|
---|
322 | #ifdef __CET__
|
---|
323 |
|
---|
324 | .byte 243,15,30,251
|
---|
325 | #endif
|
---|
326 |
|
---|
327 | pushl %esi
|
---|
328 | pushl %edi
|
---|
329 | movl 12(%esp),%esi
|
---|
330 | movl 16(%esp),%edi
|
---|
331 | movl 20(%esp),%ecx
|
---|
332 | xorl %eax,%eax
|
---|
333 | xorl %edx,%edx
|
---|
334 | cmpl $0,%ecx
|
---|
335 | je L022no_data
|
---|
336 | L023loop:
|
---|
337 | movb (%esi),%dl
|
---|
338 | leal 1(%esi),%esi
|
---|
339 | xorb (%edi),%dl
|
---|
340 | leal 1(%edi),%edi
|
---|
341 | orb %dl,%al
|
---|
342 | decl %ecx
|
---|
343 | jnz L023loop
|
---|
344 | negl %eax
|
---|
345 | shrl $31,%eax
|
---|
346 | L022no_data:
|
---|
347 | popl %edi
|
---|
348 | popl %esi
|
---|
349 | ret
|
---|
350 | .globl _OPENSSL_instrument_bus
|
---|
351 | .align 4
|
---|
352 | _OPENSSL_instrument_bus:
|
---|
353 | L_OPENSSL_instrument_bus_begin:
|
---|
354 | #ifdef __CET__
|
---|
355 |
|
---|
356 | .byte 243,15,30,251
|
---|
357 | #endif
|
---|
358 |
|
---|
359 | pushl %ebp
|
---|
360 | pushl %ebx
|
---|
361 | pushl %esi
|
---|
362 | pushl %edi
|
---|
363 | movl $0,%eax
|
---|
364 | popl %edi
|
---|
365 | popl %esi
|
---|
366 | popl %ebx
|
---|
367 | popl %ebp
|
---|
368 | ret
|
---|
369 | .globl _OPENSSL_instrument_bus2
|
---|
370 | .align 4
|
---|
371 | _OPENSSL_instrument_bus2:
|
---|
372 | L_OPENSSL_instrument_bus2_begin:
|
---|
373 | #ifdef __CET__
|
---|
374 |
|
---|
375 | .byte 243,15,30,251
|
---|
376 | #endif
|
---|
377 |
|
---|
378 | pushl %ebp
|
---|
379 | pushl %ebx
|
---|
380 | pushl %esi
|
---|
381 | pushl %edi
|
---|
382 | movl $0,%eax
|
---|
383 | popl %edi
|
---|
384 | popl %esi
|
---|
385 | popl %ebx
|
---|
386 | popl %ebp
|
---|
387 | ret
|
---|
388 | .globl _OPENSSL_ia32_rdrand_bytes
|
---|
389 | .align 4
|
---|
390 | _OPENSSL_ia32_rdrand_bytes:
|
---|
391 | L_OPENSSL_ia32_rdrand_bytes_begin:
|
---|
392 | #ifdef __CET__
|
---|
393 |
|
---|
394 | .byte 243,15,30,251
|
---|
395 | #endif
|
---|
396 |
|
---|
397 | pushl %edi
|
---|
398 | pushl %ebx
|
---|
399 | xorl %eax,%eax
|
---|
400 | movl 12(%esp),%edi
|
---|
401 | movl 16(%esp),%ebx
|
---|
402 | cmpl $0,%ebx
|
---|
403 | je L024done
|
---|
404 | movl $8,%ecx
|
---|
405 | L025loop:
|
---|
406 | .byte 15,199,242
|
---|
407 | jc L026break
|
---|
408 | loop L025loop
|
---|
409 | jmp L024done
|
---|
410 | .align 4,0x90
|
---|
411 | L026break:
|
---|
412 | cmpl $4,%ebx
|
---|
413 | jb L027tail
|
---|
414 | movl %edx,(%edi)
|
---|
415 | leal 4(%edi),%edi
|
---|
416 | addl $4,%eax
|
---|
417 | subl $4,%ebx
|
---|
418 | jz L024done
|
---|
419 | movl $8,%ecx
|
---|
420 | jmp L025loop
|
---|
421 | .align 4,0x90
|
---|
422 | L027tail:
|
---|
423 | movb %dl,(%edi)
|
---|
424 | leal 1(%edi),%edi
|
---|
425 | incl %eax
|
---|
426 | shrl $8,%edx
|
---|
427 | decl %ebx
|
---|
428 | jnz L027tail
|
---|
429 | L024done:
|
---|
430 | xorl %edx,%edx
|
---|
431 | popl %ebx
|
---|
432 | popl %edi
|
---|
433 | ret
|
---|
434 | .globl _OPENSSL_ia32_rdseed_bytes
|
---|
435 | .align 4
|
---|
436 | _OPENSSL_ia32_rdseed_bytes:
|
---|
437 | L_OPENSSL_ia32_rdseed_bytes_begin:
|
---|
438 | #ifdef __CET__
|
---|
439 |
|
---|
440 | .byte 243,15,30,251
|
---|
441 | #endif
|
---|
442 |
|
---|
443 | pushl %edi
|
---|
444 | pushl %ebx
|
---|
445 | xorl %eax,%eax
|
---|
446 | movl 12(%esp),%edi
|
---|
447 | movl 16(%esp),%ebx
|
---|
448 | cmpl $0,%ebx
|
---|
449 | je L028done
|
---|
450 | movl $8,%ecx
|
---|
451 | L029loop:
|
---|
452 | .byte 15,199,250
|
---|
453 | jc L030break
|
---|
454 | loop L029loop
|
---|
455 | jmp L028done
|
---|
456 | .align 4,0x90
|
---|
457 | L030break:
|
---|
458 | cmpl $4,%ebx
|
---|
459 | jb L031tail
|
---|
460 | movl %edx,(%edi)
|
---|
461 | leal 4(%edi),%edi
|
---|
462 | addl $4,%eax
|
---|
463 | subl $4,%ebx
|
---|
464 | jz L028done
|
---|
465 | movl $8,%ecx
|
---|
466 | jmp L029loop
|
---|
467 | .align 4,0x90
|
---|
468 | L031tail:
|
---|
469 | movb %dl,(%edi)
|
---|
470 | leal 1(%edi),%edi
|
---|
471 | incl %eax
|
---|
472 | shrl $8,%edx
|
---|
473 | decl %ebx
|
---|
474 | jnz L031tail
|
---|
475 | L028done:
|
---|
476 | xorl %edx,%edx
|
---|
477 | popl %ebx
|
---|
478 | popl %edi
|
---|
479 | ret
|
---|
480 | .section __IMPORT,__pointers,non_lazy_symbol_pointers
|
---|
481 | L_OPENSSL_ia32cap_P$non_lazy_ptr:
|
---|
482 | .indirect_symbol _OPENSSL_ia32cap_P
|
---|
483 | .long 0
|
---|
484 | .comm _OPENSSL_ia32cap_P,16,2
|
---|
485 | .mod_init_func
|
---|
486 | .align 2
|
---|
487 | .long _OPENSSL_cpuid_setup
|
---|