VirtualBox

source: vbox/trunk/src/libs/openssl-1.1.1f/crypto/genasm-elf/x86cpuid.S@ 83531

Last change on this file since 83531 was 83531, checked in by vboxsync, 5 years ago

setting svn:sync-process=export for openssl-1.1.1f, all files except tests

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