VirtualBox

source: vbox/trunk/src/libs/openssl-3.0.9/crypto/genasm-elf/x86cpuid.S@ 100942

Last change on this file since 100942 was 97372, checked in by vboxsync, 2 years ago

libs: Switch to openssl-3.0.7, bugref:10317

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette