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