VirtualBox

source: vbox/trunk/src/libs/openssl-3.0.1/crypto/genasm-macosx/x86cpuid.S@ 94102

最後變更 在這個檔案從94102是 94083,由 vboxsync 提交於 3 年 前

libs/openssl-3.0.1: Recreate asm files, bugref:10128

檔案大小: 7.0 KB
 
1.text
2.globl _OPENSSL_ia32_cpuid
3.align 4
4_OPENSSL_ia32_cpuid:
5L_OPENSSL_ia32_cpuid_begin:
6.byte 243,15,30,251
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
75L001intel:
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
85L003nocacheinfo:
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
97L004notintel:
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
108L002generic:
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)
120L005no_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
130L008clear_xmm:
131 andl $4261412861,%ebp
132 andl $4278190079,%esi
133L006clear_avx:
134 andl $4026525695,%ebp
135 andl $4294967263,8(%edi)
136L007done:
137 movl %esi,%eax
138 movl %ebp,%edx
139L000nocpuid:
140 popl %edi
141 popl %esi
142 popl %ebx
143 popl %ebp
144 ret
145.globl _OPENSSL_rdtsc
146.align 4
147_OPENSSL_rdtsc:
148L_OPENSSL_rdtsc_begin:
149.byte 243,15,30,251
150 xorl %eax,%eax
151 xorl %edx,%edx
152 call L009PIC_me_up
153L009PIC_me_up:
154 popl %ecx
155 movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L009PIC_me_up(%ecx),%ecx
156 btl $4,(%ecx)
157 jnc L010notsc
158 .byte 0x0f,0x31
159L010notsc:
160 ret
161.globl _OPENSSL_instrument_halt
162.align 4
163_OPENSSL_instrument_halt:
164L_OPENSSL_instrument_halt_begin:
165.byte 243,15,30,251
166 call L011PIC_me_up
167L011PIC_me_up:
168 popl %ecx
169 movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L011PIC_me_up(%ecx),%ecx
170 btl $4,(%ecx)
171 jnc L012nohalt
172.long 2421723150
173 andl $3,%eax
174 jnz L012nohalt
175 pushfl
176 popl %eax
177 btl $9,%eax
178 jnc L012nohalt
179 .byte 0x0f,0x31
180 pushl %edx
181 pushl %eax
182 hlt
183 .byte 0x0f,0x31
184 subl (%esp),%eax
185 sbbl 4(%esp),%edx
186 addl $8,%esp
187 ret
188L012nohalt:
189 xorl %eax,%eax
190 xorl %edx,%edx
191 ret
192.globl _OPENSSL_far_spin
193.align 4
194_OPENSSL_far_spin:
195L_OPENSSL_far_spin_begin:
196.byte 243,15,30,251
197 pushfl
198 popl %eax
199 btl $9,%eax
200 jnc L013nospin
201 movl 4(%esp),%eax
202 movl 8(%esp),%ecx
203.long 2430111262
204 xorl %eax,%eax
205 movl (%ecx),%edx
206 jmp L014spin
207.align 4,0x90
208L014spin:
209 incl %eax
210 cmpl (%ecx),%edx
211 je L014spin
212.long 529567888
213 ret
214L013nospin:
215 xorl %eax,%eax
216 xorl %edx,%edx
217 ret
218.globl _OPENSSL_wipe_cpu
219.align 4
220_OPENSSL_wipe_cpu:
221L_OPENSSL_wipe_cpu_begin:
222.byte 243,15,30,251
223 xorl %eax,%eax
224 xorl %edx,%edx
225 call L015PIC_me_up
226L015PIC_me_up:
227 popl %ecx
228 movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L015PIC_me_up(%ecx),%ecx
229 movl (%ecx),%ecx
230 btl $1,(%ecx)
231 jnc L016no_x87
232.long 4007259865,4007259865,4007259865,4007259865,2430851995
233L016no_x87:
234 leal 4(%esp),%eax
235 ret
236.globl _OPENSSL_atomic_add
237.align 4
238_OPENSSL_atomic_add:
239L_OPENSSL_atomic_add_begin:
240.byte 243,15,30,251
241 movl 4(%esp),%edx
242 movl 8(%esp),%ecx
243 pushl %ebx
244 nop
245 movl (%edx),%eax
246L017spin:
247 leal (%eax,%ecx,1),%ebx
248 nop
249.long 447811568
250 jne L017spin
251 movl %ebx,%eax
252 popl %ebx
253 ret
254.globl _OPENSSL_cleanse
255.align 4
256_OPENSSL_cleanse:
257L_OPENSSL_cleanse_begin:
258.byte 243,15,30,251
259 movl 4(%esp),%edx
260 movl 8(%esp),%ecx
261 xorl %eax,%eax
262 cmpl $7,%ecx
263 jae L018lot
264 cmpl $0,%ecx
265 je L019ret
266L020little:
267 movb %al,(%edx)
268 subl $1,%ecx
269 leal 1(%edx),%edx
270 jnz L020little
271L019ret:
272 ret
273.align 4,0x90
274L018lot:
275 testl $3,%edx
276 jz L021aligned
277 movb %al,(%edx)
278 leal -1(%ecx),%ecx
279 leal 1(%edx),%edx
280 jmp L018lot
281L021aligned:
282 movl %eax,(%edx)
283 leal -4(%ecx),%ecx
284 testl $-4,%ecx
285 leal 4(%edx),%edx
286 jnz L021aligned
287 cmpl $0,%ecx
288 jne L020little
289 ret
290.globl _CRYPTO_memcmp
291.align 4
292_CRYPTO_memcmp:
293L_CRYPTO_memcmp_begin:
294.byte 243,15,30,251
295 pushl %esi
296 pushl %edi
297 movl 12(%esp),%esi
298 movl 16(%esp),%edi
299 movl 20(%esp),%ecx
300 xorl %eax,%eax
301 xorl %edx,%edx
302 cmpl $0,%ecx
303 je L022no_data
304L023loop:
305 movb (%esi),%dl
306 leal 1(%esi),%esi
307 xorb (%edi),%dl
308 leal 1(%edi),%edi
309 orb %dl,%al
310 decl %ecx
311 jnz L023loop
312 negl %eax
313 shrl $31,%eax
314L022no_data:
315 popl %edi
316 popl %esi
317 ret
318.globl _OPENSSL_instrument_bus
319.align 4
320_OPENSSL_instrument_bus:
321L_OPENSSL_instrument_bus_begin:
322.byte 243,15,30,251
323 pushl %ebp
324 pushl %ebx
325 pushl %esi
326 pushl %edi
327 movl $0,%eax
328 popl %edi
329 popl %esi
330 popl %ebx
331 popl %ebp
332 ret
333.globl _OPENSSL_instrument_bus2
334.align 4
335_OPENSSL_instrument_bus2:
336L_OPENSSL_instrument_bus2_begin:
337.byte 243,15,30,251
338 pushl %ebp
339 pushl %ebx
340 pushl %esi
341 pushl %edi
342 movl $0,%eax
343 popl %edi
344 popl %esi
345 popl %ebx
346 popl %ebp
347 ret
348.globl _OPENSSL_ia32_rdrand_bytes
349.align 4
350_OPENSSL_ia32_rdrand_bytes:
351L_OPENSSL_ia32_rdrand_bytes_begin:
352.byte 243,15,30,251
353 pushl %edi
354 pushl %ebx
355 xorl %eax,%eax
356 movl 12(%esp),%edi
357 movl 16(%esp),%ebx
358 cmpl $0,%ebx
359 je L024done
360 movl $8,%ecx
361L025loop:
362.byte 15,199,242
363 jc L026break
364 loop L025loop
365 jmp L024done
366.align 4,0x90
367L026break:
368 cmpl $4,%ebx
369 jb L027tail
370 movl %edx,(%edi)
371 leal 4(%edi),%edi
372 addl $4,%eax
373 subl $4,%ebx
374 jz L024done
375 movl $8,%ecx
376 jmp L025loop
377.align 4,0x90
378L027tail:
379 movb %dl,(%edi)
380 leal 1(%edi),%edi
381 incl %eax
382 shrl $8,%edx
383 decl %ebx
384 jnz L027tail
385L024done:
386 xorl %edx,%edx
387 popl %ebx
388 popl %edi
389 ret
390.globl _OPENSSL_ia32_rdseed_bytes
391.align 4
392_OPENSSL_ia32_rdseed_bytes:
393L_OPENSSL_ia32_rdseed_bytes_begin:
394.byte 243,15,30,251
395 pushl %edi
396 pushl %ebx
397 xorl %eax,%eax
398 movl 12(%esp),%edi
399 movl 16(%esp),%ebx
400 cmpl $0,%ebx
401 je L028done
402 movl $8,%ecx
403L029loop:
404.byte 15,199,250
405 jc L030break
406 loop L029loop
407 jmp L028done
408.align 4,0x90
409L030break:
410 cmpl $4,%ebx
411 jb L031tail
412 movl %edx,(%edi)
413 leal 4(%edi),%edi
414 addl $4,%eax
415 subl $4,%ebx
416 jz L028done
417 movl $8,%ecx
418 jmp L029loop
419.align 4,0x90
420L031tail:
421 movb %dl,(%edi)
422 leal 1(%edi),%edi
423 incl %eax
424 shrl $8,%edx
425 decl %ebx
426 jnz L031tail
427L028done:
428 xorl %edx,%edx
429 popl %ebx
430 popl %edi
431 ret
432.section __IMPORT,__pointers,non_lazy_symbol_pointers
433L_OPENSSL_ia32cap_P$non_lazy_ptr:
434.indirect_symbol _OPENSSL_ia32cap_P
435.long 0
436.comm _OPENSSL_ia32cap_P,16,2
437.mod_init_func
438.align 2
439.long _OPENSSL_cpuid_setup
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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