xref: /freebsd/sys/crypto/openssl/i386/x86cpuid.S (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1/* Do not modify. This file is auto-generated from x86cpuid.pl. */
2#ifdef PIC
3.text
4.globl	OPENSSL_ia32_cpuid
5.type	OPENSSL_ia32_cpuid,@function
6.align	16
7OPENSSL_ia32_cpuid:
8.L_OPENSSL_ia32_cpuid_begin:
9	#ifdef __CET__
10
11.byte	243,15,30,251
12	#endif
13
14	pushl	%ebp
15	pushl	%ebx
16	pushl	%esi
17	pushl	%edi
18	xorl	%edx,%edx
19	pushfl
20	popl	%eax
21	movl	%eax,%ecx
22	xorl	$2097152,%eax
23	pushl	%eax
24	popfl
25	pushfl
26	popl	%eax
27	xorl	%eax,%ecx
28	xorl	%eax,%eax
29	movl	20(%esp),%esi
30	movl	%eax,8(%esi)
31	btl	$21,%ecx
32	jnc	.L000nocpuid
33	.byte	0x0f,0xa2
34	movl	%eax,%edi
35	xorl	%eax,%eax
36	cmpl	$1970169159,%ebx
37	setne	%al
38	movl	%eax,%ebp
39	cmpl	$1231384169,%edx
40	setne	%al
41	orl	%eax,%ebp
42	cmpl	$1818588270,%ecx
43	setne	%al
44	orl	%eax,%ebp
45	jz	.L001intel
46	cmpl	$1752462657,%ebx
47	setne	%al
48	movl	%eax,%esi
49	cmpl	$1769238117,%edx
50	setne	%al
51	orl	%eax,%esi
52	cmpl	$1145913699,%ecx
53	setne	%al
54	orl	%eax,%esi
55	jnz	.L001intel
56	movl	$2147483648,%eax
57	.byte	0x0f,0xa2
58	cmpl	$2147483649,%eax
59	jb	.L001intel
60	movl	%eax,%esi
61	movl	$2147483649,%eax
62	.byte	0x0f,0xa2
63	orl	%ecx,%ebp
64	andl	$2049,%ebp
65	cmpl	$2147483656,%esi
66	jb	.L001intel
67	movl	$2147483656,%eax
68	.byte	0x0f,0xa2
69	movzbl	%cl,%esi
70	incl	%esi
71	movl	$1,%eax
72	xorl	%ecx,%ecx
73	.byte	0x0f,0xa2
74	btl	$28,%edx
75	jnc	.L002generic
76	shrl	$16,%ebx
77	andl	$255,%ebx
78	cmpl	%esi,%ebx
79	ja	.L002generic
80	andl	$4026531839,%edx
81	jmp	.L002generic
82.L001intel:
83	cmpl	$4,%edi
84	movl	$-1,%esi
85	jb	.L003nocacheinfo
86	movl	$4,%eax
87	movl	$0,%ecx
88	.byte	0x0f,0xa2
89	movl	%eax,%esi
90	shrl	$14,%esi
91	andl	$4095,%esi
92.L003nocacheinfo:
93	movl	$1,%eax
94	xorl	%ecx,%ecx
95	.byte	0x0f,0xa2
96	andl	$3220176895,%edx
97	cmpl	$0,%ebp
98	jne	.L004notintel
99	orl	$1073741824,%edx
100	andb	$15,%ah
101	cmpb	$15,%ah
102	jne	.L004notintel
103	orl	$1048576,%edx
104.L004notintel:
105	btl	$28,%edx
106	jnc	.L002generic
107	andl	$4026531839,%edx
108	cmpl	$0,%esi
109	je	.L002generic
110	orl	$268435456,%edx
111	shrl	$16,%ebx
112	cmpb	$1,%bl
113	ja	.L002generic
114	andl	$4026531839,%edx
115.L002generic:
116	andl	$2048,%ebp
117	andl	$4294965247,%ecx
118	movl	%edx,%esi
119	orl	%ecx,%ebp
120	cmpl	$7,%edi
121	movl	20(%esp),%edi
122	jb	.L005no_extended_info
123	movl	$7,%eax
124	xorl	%ecx,%ecx
125	.byte	0x0f,0xa2
126	movl	%ebx,8(%edi)
127.L005no_extended_info:
128	btl	$27,%ebp
129	jnc	.L006clear_avx
130	xorl	%ecx,%ecx
131.byte	15,1,208
132	andl	$6,%eax
133	cmpl	$6,%eax
134	je	.L007done
135	cmpl	$2,%eax
136	je	.L006clear_avx
137.L008clear_xmm:
138	andl	$4261412861,%ebp
139	andl	$4278190079,%esi
140.L006clear_avx:
141	andl	$4026525695,%ebp
142	andl	$4294967263,8(%edi)
143.L007done:
144	movl	%esi,%eax
145	movl	%ebp,%edx
146.L000nocpuid:
147	popl	%edi
148	popl	%esi
149	popl	%ebx
150	popl	%ebp
151	ret
152.size	OPENSSL_ia32_cpuid,.-.L_OPENSSL_ia32_cpuid_begin
153.globl	OPENSSL_rdtsc
154.type	OPENSSL_rdtsc,@function
155.align	16
156OPENSSL_rdtsc:
157.L_OPENSSL_rdtsc_begin:
158	#ifdef __CET__
159
160.byte	243,15,30,251
161	#endif
162
163	xorl	%eax,%eax
164	xorl	%edx,%edx
165	call	.L009PIC_me_up
166.L009PIC_me_up:
167	popl	%ecx
168	leal	OPENSSL_ia32cap_P-.L009PIC_me_up(%ecx),%ecx
169	btl	$4,(%ecx)
170	jnc	.L010notsc
171	.byte	0x0f,0x31
172.L010notsc:
173	ret
174.size	OPENSSL_rdtsc,.-.L_OPENSSL_rdtsc_begin
175.globl	OPENSSL_instrument_halt
176.type	OPENSSL_instrument_halt,@function
177.align	16
178OPENSSL_instrument_halt:
179.L_OPENSSL_instrument_halt_begin:
180	#ifdef __CET__
181
182.byte	243,15,30,251
183	#endif
184
185	call	.L011PIC_me_up
186.L011PIC_me_up:
187	popl	%ecx
188	leal	OPENSSL_ia32cap_P-.L011PIC_me_up(%ecx),%ecx
189	btl	$4,(%ecx)
190	jnc	.L012nohalt
191.long	2421723150
192	andl	$3,%eax
193	jnz	.L012nohalt
194	pushfl
195	popl	%eax
196	btl	$9,%eax
197	jnc	.L012nohalt
198	.byte	0x0f,0x31
199	pushl	%edx
200	pushl	%eax
201	hlt
202	.byte	0x0f,0x31
203	subl	(%esp),%eax
204	sbbl	4(%esp),%edx
205	addl	$8,%esp
206	ret
207.L012nohalt:
208	xorl	%eax,%eax
209	xorl	%edx,%edx
210	ret
211.size	OPENSSL_instrument_halt,.-.L_OPENSSL_instrument_halt_begin
212.globl	OPENSSL_far_spin
213.type	OPENSSL_far_spin,@function
214.align	16
215OPENSSL_far_spin:
216.L_OPENSSL_far_spin_begin:
217	#ifdef __CET__
218
219.byte	243,15,30,251
220	#endif
221
222	pushfl
223	popl	%eax
224	btl	$9,%eax
225	jnc	.L013nospin
226	movl	4(%esp),%eax
227	movl	8(%esp),%ecx
228.long	2430111262
229	xorl	%eax,%eax
230	movl	(%ecx),%edx
231	jmp	.L014spin
232.align	16
233.L014spin:
234	incl	%eax
235	cmpl	(%ecx),%edx
236	je	.L014spin
237.long	529567888
238	ret
239.L013nospin:
240	xorl	%eax,%eax
241	xorl	%edx,%edx
242	ret
243.size	OPENSSL_far_spin,.-.L_OPENSSL_far_spin_begin
244.globl	OPENSSL_wipe_cpu
245.type	OPENSSL_wipe_cpu,@function
246.align	16
247OPENSSL_wipe_cpu:
248.L_OPENSSL_wipe_cpu_begin:
249	#ifdef __CET__
250
251.byte	243,15,30,251
252	#endif
253
254	xorl	%eax,%eax
255	xorl	%edx,%edx
256	call	.L015PIC_me_up
257.L015PIC_me_up:
258	popl	%ecx
259	leal	OPENSSL_ia32cap_P-.L015PIC_me_up(%ecx),%ecx
260	movl	(%ecx),%ecx
261	btl	$1,(%ecx)
262	jnc	.L016no_x87
263	andl	$83886080,%ecx
264	cmpl	$83886080,%ecx
265	jne	.L017no_sse2
266	pxor	%xmm0,%xmm0
267	pxor	%xmm1,%xmm1
268	pxor	%xmm2,%xmm2
269	pxor	%xmm3,%xmm3
270	pxor	%xmm4,%xmm4
271	pxor	%xmm5,%xmm5
272	pxor	%xmm6,%xmm6
273	pxor	%xmm7,%xmm7
274.L017no_sse2:
275.long	4007259865,4007259865,4007259865,4007259865,2430851995
276.L016no_x87:
277	leal	4(%esp),%eax
278	ret
279.size	OPENSSL_wipe_cpu,.-.L_OPENSSL_wipe_cpu_begin
280.globl	OPENSSL_atomic_add
281.type	OPENSSL_atomic_add,@function
282.align	16
283OPENSSL_atomic_add:
284.L_OPENSSL_atomic_add_begin:
285	#ifdef __CET__
286
287.byte	243,15,30,251
288	#endif
289
290	movl	4(%esp),%edx
291	movl	8(%esp),%ecx
292	pushl	%ebx
293	nop
294	movl	(%edx),%eax
295.L018spin:
296	leal	(%eax,%ecx,1),%ebx
297	nop
298.long	447811568
299	jne	.L018spin
300	movl	%ebx,%eax
301	popl	%ebx
302	ret
303.size	OPENSSL_atomic_add,.-.L_OPENSSL_atomic_add_begin
304.globl	OPENSSL_cleanse
305.type	OPENSSL_cleanse,@function
306.align	16
307OPENSSL_cleanse:
308.L_OPENSSL_cleanse_begin:
309	#ifdef __CET__
310
311.byte	243,15,30,251
312	#endif
313
314	movl	4(%esp),%edx
315	movl	8(%esp),%ecx
316	xorl	%eax,%eax
317	cmpl	$7,%ecx
318	jae	.L019lot
319	cmpl	$0,%ecx
320	je	.L020ret
321.L021little:
322	movb	%al,(%edx)
323	subl	$1,%ecx
324	leal	1(%edx),%edx
325	jnz	.L021little
326.L020ret:
327	ret
328.align	16
329.L019lot:
330	testl	$3,%edx
331	jz	.L022aligned
332	movb	%al,(%edx)
333	leal	-1(%ecx),%ecx
334	leal	1(%edx),%edx
335	jmp	.L019lot
336.L022aligned:
337	movl	%eax,(%edx)
338	leal	-4(%ecx),%ecx
339	testl	$-4,%ecx
340	leal	4(%edx),%edx
341	jnz	.L022aligned
342	cmpl	$0,%ecx
343	jne	.L021little
344	ret
345.size	OPENSSL_cleanse,.-.L_OPENSSL_cleanse_begin
346.globl	CRYPTO_memcmp
347.type	CRYPTO_memcmp,@function
348.align	16
349CRYPTO_memcmp:
350.L_CRYPTO_memcmp_begin:
351	#ifdef __CET__
352
353.byte	243,15,30,251
354	#endif
355
356	pushl	%esi
357	pushl	%edi
358	movl	12(%esp),%esi
359	movl	16(%esp),%edi
360	movl	20(%esp),%ecx
361	xorl	%eax,%eax
362	xorl	%edx,%edx
363	cmpl	$0,%ecx
364	je	.L023no_data
365.L024loop:
366	movb	(%esi),%dl
367	leal	1(%esi),%esi
368	xorb	(%edi),%dl
369	leal	1(%edi),%edi
370	orb	%dl,%al
371	decl	%ecx
372	jnz	.L024loop
373	negl	%eax
374	shrl	$31,%eax
375.L023no_data:
376	popl	%edi
377	popl	%esi
378	ret
379.size	CRYPTO_memcmp,.-.L_CRYPTO_memcmp_begin
380.globl	OPENSSL_instrument_bus
381.type	OPENSSL_instrument_bus,@function
382.align	16
383OPENSSL_instrument_bus:
384.L_OPENSSL_instrument_bus_begin:
385	#ifdef __CET__
386
387.byte	243,15,30,251
388	#endif
389
390	pushl	%ebp
391	pushl	%ebx
392	pushl	%esi
393	pushl	%edi
394	movl	$0,%eax
395	call	.L025PIC_me_up
396.L025PIC_me_up:
397	popl	%edx
398	leal	OPENSSL_ia32cap_P-.L025PIC_me_up(%edx),%edx
399	btl	$4,(%edx)
400	jnc	.L026nogo
401	btl	$19,(%edx)
402	jnc	.L026nogo
403	movl	20(%esp),%edi
404	movl	24(%esp),%ecx
405	.byte	0x0f,0x31
406	movl	%eax,%esi
407	movl	$0,%ebx
408	clflush	(%edi)
409.byte	240
410	addl	%ebx,(%edi)
411	jmp	.L027loop
412.align	16
413.L027loop:
414	.byte	0x0f,0x31
415	movl	%eax,%edx
416	subl	%esi,%eax
417	movl	%edx,%esi
418	movl	%eax,%ebx
419	clflush	(%edi)
420.byte	240
421	addl	%eax,(%edi)
422	leal	4(%edi),%edi
423	subl	$1,%ecx
424	jnz	.L027loop
425	movl	24(%esp),%eax
426.L026nogo:
427	popl	%edi
428	popl	%esi
429	popl	%ebx
430	popl	%ebp
431	ret
432.size	OPENSSL_instrument_bus,.-.L_OPENSSL_instrument_bus_begin
433.globl	OPENSSL_instrument_bus2
434.type	OPENSSL_instrument_bus2,@function
435.align	16
436OPENSSL_instrument_bus2:
437.L_OPENSSL_instrument_bus2_begin:
438	#ifdef __CET__
439
440.byte	243,15,30,251
441	#endif
442
443	pushl	%ebp
444	pushl	%ebx
445	pushl	%esi
446	pushl	%edi
447	movl	$0,%eax
448	call	.L028PIC_me_up
449.L028PIC_me_up:
450	popl	%edx
451	leal	OPENSSL_ia32cap_P-.L028PIC_me_up(%edx),%edx
452	btl	$4,(%edx)
453	jnc	.L029nogo
454	btl	$19,(%edx)
455	jnc	.L029nogo
456	movl	20(%esp),%edi
457	movl	24(%esp),%ecx
458	movl	28(%esp),%ebp
459	.byte	0x0f,0x31
460	movl	%eax,%esi
461	movl	$0,%ebx
462	clflush	(%edi)
463.byte	240
464	addl	%ebx,(%edi)
465	.byte	0x0f,0x31
466	movl	%eax,%edx
467	subl	%esi,%eax
468	movl	%edx,%esi
469	movl	%eax,%ebx
470	jmp	.L030loop2
471.align	16
472.L030loop2:
473	clflush	(%edi)
474.byte	240
475	addl	%eax,(%edi)
476	subl	$1,%ebp
477	jz	.L031done2
478	.byte	0x0f,0x31
479	movl	%eax,%edx
480	subl	%esi,%eax
481	movl	%edx,%esi
482	cmpl	%ebx,%eax
483	movl	%eax,%ebx
484	movl	$0,%edx
485	setne	%dl
486	subl	%edx,%ecx
487	leal	(%edi,%edx,4),%edi
488	jnz	.L030loop2
489.L031done2:
490	movl	24(%esp),%eax
491	subl	%ecx,%eax
492.L029nogo:
493	popl	%edi
494	popl	%esi
495	popl	%ebx
496	popl	%ebp
497	ret
498.size	OPENSSL_instrument_bus2,.-.L_OPENSSL_instrument_bus2_begin
499.globl	OPENSSL_ia32_rdrand_bytes
500.type	OPENSSL_ia32_rdrand_bytes,@function
501.align	16
502OPENSSL_ia32_rdrand_bytes:
503.L_OPENSSL_ia32_rdrand_bytes_begin:
504	#ifdef __CET__
505
506.byte	243,15,30,251
507	#endif
508
509	pushl	%edi
510	pushl	%ebx
511	xorl	%eax,%eax
512	movl	12(%esp),%edi
513	movl	16(%esp),%ebx
514	cmpl	$0,%ebx
515	je	.L032done
516	movl	$8,%ecx
517.L033loop:
518.byte	15,199,242
519	jc	.L034break
520	loop	.L033loop
521	jmp	.L032done
522.align	16
523.L034break:
524	cmpl	$4,%ebx
525	jb	.L035tail
526	movl	%edx,(%edi)
527	leal	4(%edi),%edi
528	addl	$4,%eax
529	subl	$4,%ebx
530	jz	.L032done
531	movl	$8,%ecx
532	jmp	.L033loop
533.align	16
534.L035tail:
535	movb	%dl,(%edi)
536	leal	1(%edi),%edi
537	incl	%eax
538	shrl	$8,%edx
539	decl	%ebx
540	jnz	.L035tail
541.L032done:
542	xorl	%edx,%edx
543	popl	%ebx
544	popl	%edi
545	ret
546.size	OPENSSL_ia32_rdrand_bytes,.-.L_OPENSSL_ia32_rdrand_bytes_begin
547.globl	OPENSSL_ia32_rdseed_bytes
548.type	OPENSSL_ia32_rdseed_bytes,@function
549.align	16
550OPENSSL_ia32_rdseed_bytes:
551.L_OPENSSL_ia32_rdseed_bytes_begin:
552	#ifdef __CET__
553
554.byte	243,15,30,251
555	#endif
556
557	pushl	%edi
558	pushl	%ebx
559	xorl	%eax,%eax
560	movl	12(%esp),%edi
561	movl	16(%esp),%ebx
562	cmpl	$0,%ebx
563	je	.L036done
564	movl	$8,%ecx
565.L037loop:
566.byte	15,199,250
567	jc	.L038break
568	loop	.L037loop
569	jmp	.L036done
570.align	16
571.L038break:
572	cmpl	$4,%ebx
573	jb	.L039tail
574	movl	%edx,(%edi)
575	leal	4(%edi),%edi
576	addl	$4,%eax
577	subl	$4,%ebx
578	jz	.L036done
579	movl	$8,%ecx
580	jmp	.L037loop
581.align	16
582.L039tail:
583	movb	%dl,(%edi)
584	leal	1(%edi),%edi
585	incl	%eax
586	shrl	$8,%edx
587	decl	%ebx
588	jnz	.L039tail
589.L036done:
590	xorl	%edx,%edx
591	popl	%ebx
592	popl	%edi
593	ret
594.size	OPENSSL_ia32_rdseed_bytes,.-.L_OPENSSL_ia32_rdseed_bytes_begin
595.hidden	OPENSSL_cpuid_setup
596.hidden	OPENSSL_ia32cap_P
597.comm	OPENSSL_ia32cap_P,16,4
598.section	.init
599	call	OPENSSL_cpuid_setup
600
601	.section ".note.gnu.property", "a"
602	.p2align 2
603	.long 1f - 0f
604	.long 4f - 1f
605	.long 5
6060:
607	.asciz "GNU"
6081:
609	.p2align 2
610	.long 0xc0000002
611	.long 3f - 2f
6122:
613	.long 3
6143:
615	.p2align 2
6164:
617#else
618.text
619.globl	OPENSSL_ia32_cpuid
620.type	OPENSSL_ia32_cpuid,@function
621.align	16
622OPENSSL_ia32_cpuid:
623.L_OPENSSL_ia32_cpuid_begin:
624	#ifdef __CET__
625
626.byte	243,15,30,251
627	#endif
628
629	pushl	%ebp
630	pushl	%ebx
631	pushl	%esi
632	pushl	%edi
633	xorl	%edx,%edx
634	pushfl
635	popl	%eax
636	movl	%eax,%ecx
637	xorl	$2097152,%eax
638	pushl	%eax
639	popfl
640	pushfl
641	popl	%eax
642	xorl	%eax,%ecx
643	xorl	%eax,%eax
644	movl	20(%esp),%esi
645	movl	%eax,8(%esi)
646	btl	$21,%ecx
647	jnc	.L000nocpuid
648	.byte	0x0f,0xa2
649	movl	%eax,%edi
650	xorl	%eax,%eax
651	cmpl	$1970169159,%ebx
652	setne	%al
653	movl	%eax,%ebp
654	cmpl	$1231384169,%edx
655	setne	%al
656	orl	%eax,%ebp
657	cmpl	$1818588270,%ecx
658	setne	%al
659	orl	%eax,%ebp
660	jz	.L001intel
661	cmpl	$1752462657,%ebx
662	setne	%al
663	movl	%eax,%esi
664	cmpl	$1769238117,%edx
665	setne	%al
666	orl	%eax,%esi
667	cmpl	$1145913699,%ecx
668	setne	%al
669	orl	%eax,%esi
670	jnz	.L001intel
671	movl	$2147483648,%eax
672	.byte	0x0f,0xa2
673	cmpl	$2147483649,%eax
674	jb	.L001intel
675	movl	%eax,%esi
676	movl	$2147483649,%eax
677	.byte	0x0f,0xa2
678	orl	%ecx,%ebp
679	andl	$2049,%ebp
680	cmpl	$2147483656,%esi
681	jb	.L001intel
682	movl	$2147483656,%eax
683	.byte	0x0f,0xa2
684	movzbl	%cl,%esi
685	incl	%esi
686	movl	$1,%eax
687	xorl	%ecx,%ecx
688	.byte	0x0f,0xa2
689	btl	$28,%edx
690	jnc	.L002generic
691	shrl	$16,%ebx
692	andl	$255,%ebx
693	cmpl	%esi,%ebx
694	ja	.L002generic
695	andl	$4026531839,%edx
696	jmp	.L002generic
697.L001intel:
698	cmpl	$4,%edi
699	movl	$-1,%esi
700	jb	.L003nocacheinfo
701	movl	$4,%eax
702	movl	$0,%ecx
703	.byte	0x0f,0xa2
704	movl	%eax,%esi
705	shrl	$14,%esi
706	andl	$4095,%esi
707.L003nocacheinfo:
708	movl	$1,%eax
709	xorl	%ecx,%ecx
710	.byte	0x0f,0xa2
711	andl	$3220176895,%edx
712	cmpl	$0,%ebp
713	jne	.L004notintel
714	orl	$1073741824,%edx
715	andb	$15,%ah
716	cmpb	$15,%ah
717	jne	.L004notintel
718	orl	$1048576,%edx
719.L004notintel:
720	btl	$28,%edx
721	jnc	.L002generic
722	andl	$4026531839,%edx
723	cmpl	$0,%esi
724	je	.L002generic
725	orl	$268435456,%edx
726	shrl	$16,%ebx
727	cmpb	$1,%bl
728	ja	.L002generic
729	andl	$4026531839,%edx
730.L002generic:
731	andl	$2048,%ebp
732	andl	$4294965247,%ecx
733	movl	%edx,%esi
734	orl	%ecx,%ebp
735	cmpl	$7,%edi
736	movl	20(%esp),%edi
737	jb	.L005no_extended_info
738	movl	$7,%eax
739	xorl	%ecx,%ecx
740	.byte	0x0f,0xa2
741	movl	%ebx,8(%edi)
742.L005no_extended_info:
743	btl	$27,%ebp
744	jnc	.L006clear_avx
745	xorl	%ecx,%ecx
746.byte	15,1,208
747	andl	$6,%eax
748	cmpl	$6,%eax
749	je	.L007done
750	cmpl	$2,%eax
751	je	.L006clear_avx
752.L008clear_xmm:
753	andl	$4261412861,%ebp
754	andl	$4278190079,%esi
755.L006clear_avx:
756	andl	$4026525695,%ebp
757	andl	$4294967263,8(%edi)
758.L007done:
759	movl	%esi,%eax
760	movl	%ebp,%edx
761.L000nocpuid:
762	popl	%edi
763	popl	%esi
764	popl	%ebx
765	popl	%ebp
766	ret
767.size	OPENSSL_ia32_cpuid,.-.L_OPENSSL_ia32_cpuid_begin
768.globl	OPENSSL_rdtsc
769.type	OPENSSL_rdtsc,@function
770.align	16
771OPENSSL_rdtsc:
772.L_OPENSSL_rdtsc_begin:
773	#ifdef __CET__
774
775.byte	243,15,30,251
776	#endif
777
778	xorl	%eax,%eax
779	xorl	%edx,%edx
780	leal	OPENSSL_ia32cap_P,%ecx
781	btl	$4,(%ecx)
782	jnc	.L009notsc
783	.byte	0x0f,0x31
784.L009notsc:
785	ret
786.size	OPENSSL_rdtsc,.-.L_OPENSSL_rdtsc_begin
787.globl	OPENSSL_instrument_halt
788.type	OPENSSL_instrument_halt,@function
789.align	16
790OPENSSL_instrument_halt:
791.L_OPENSSL_instrument_halt_begin:
792	#ifdef __CET__
793
794.byte	243,15,30,251
795	#endif
796
797	leal	OPENSSL_ia32cap_P,%ecx
798	btl	$4,(%ecx)
799	jnc	.L010nohalt
800.long	2421723150
801	andl	$3,%eax
802	jnz	.L010nohalt
803	pushfl
804	popl	%eax
805	btl	$9,%eax
806	jnc	.L010nohalt
807	.byte	0x0f,0x31
808	pushl	%edx
809	pushl	%eax
810	hlt
811	.byte	0x0f,0x31
812	subl	(%esp),%eax
813	sbbl	4(%esp),%edx
814	addl	$8,%esp
815	ret
816.L010nohalt:
817	xorl	%eax,%eax
818	xorl	%edx,%edx
819	ret
820.size	OPENSSL_instrument_halt,.-.L_OPENSSL_instrument_halt_begin
821.globl	OPENSSL_far_spin
822.type	OPENSSL_far_spin,@function
823.align	16
824OPENSSL_far_spin:
825.L_OPENSSL_far_spin_begin:
826	#ifdef __CET__
827
828.byte	243,15,30,251
829	#endif
830
831	pushfl
832	popl	%eax
833	btl	$9,%eax
834	jnc	.L011nospin
835	movl	4(%esp),%eax
836	movl	8(%esp),%ecx
837.long	2430111262
838	xorl	%eax,%eax
839	movl	(%ecx),%edx
840	jmp	.L012spin
841.align	16
842.L012spin:
843	incl	%eax
844	cmpl	(%ecx),%edx
845	je	.L012spin
846.long	529567888
847	ret
848.L011nospin:
849	xorl	%eax,%eax
850	xorl	%edx,%edx
851	ret
852.size	OPENSSL_far_spin,.-.L_OPENSSL_far_spin_begin
853.globl	OPENSSL_wipe_cpu
854.type	OPENSSL_wipe_cpu,@function
855.align	16
856OPENSSL_wipe_cpu:
857.L_OPENSSL_wipe_cpu_begin:
858	#ifdef __CET__
859
860.byte	243,15,30,251
861	#endif
862
863	xorl	%eax,%eax
864	xorl	%edx,%edx
865	leal	OPENSSL_ia32cap_P,%ecx
866	movl	(%ecx),%ecx
867	btl	$1,(%ecx)
868	jnc	.L013no_x87
869	andl	$83886080,%ecx
870	cmpl	$83886080,%ecx
871	jne	.L014no_sse2
872	pxor	%xmm0,%xmm0
873	pxor	%xmm1,%xmm1
874	pxor	%xmm2,%xmm2
875	pxor	%xmm3,%xmm3
876	pxor	%xmm4,%xmm4
877	pxor	%xmm5,%xmm5
878	pxor	%xmm6,%xmm6
879	pxor	%xmm7,%xmm7
880.L014no_sse2:
881.long	4007259865,4007259865,4007259865,4007259865,2430851995
882.L013no_x87:
883	leal	4(%esp),%eax
884	ret
885.size	OPENSSL_wipe_cpu,.-.L_OPENSSL_wipe_cpu_begin
886.globl	OPENSSL_atomic_add
887.type	OPENSSL_atomic_add,@function
888.align	16
889OPENSSL_atomic_add:
890.L_OPENSSL_atomic_add_begin:
891	#ifdef __CET__
892
893.byte	243,15,30,251
894	#endif
895
896	movl	4(%esp),%edx
897	movl	8(%esp),%ecx
898	pushl	%ebx
899	nop
900	movl	(%edx),%eax
901.L015spin:
902	leal	(%eax,%ecx,1),%ebx
903	nop
904.long	447811568
905	jne	.L015spin
906	movl	%ebx,%eax
907	popl	%ebx
908	ret
909.size	OPENSSL_atomic_add,.-.L_OPENSSL_atomic_add_begin
910.globl	OPENSSL_cleanse
911.type	OPENSSL_cleanse,@function
912.align	16
913OPENSSL_cleanse:
914.L_OPENSSL_cleanse_begin:
915	#ifdef __CET__
916
917.byte	243,15,30,251
918	#endif
919
920	movl	4(%esp),%edx
921	movl	8(%esp),%ecx
922	xorl	%eax,%eax
923	cmpl	$7,%ecx
924	jae	.L016lot
925	cmpl	$0,%ecx
926	je	.L017ret
927.L018little:
928	movb	%al,(%edx)
929	subl	$1,%ecx
930	leal	1(%edx),%edx
931	jnz	.L018little
932.L017ret:
933	ret
934.align	16
935.L016lot:
936	testl	$3,%edx
937	jz	.L019aligned
938	movb	%al,(%edx)
939	leal	-1(%ecx),%ecx
940	leal	1(%edx),%edx
941	jmp	.L016lot
942.L019aligned:
943	movl	%eax,(%edx)
944	leal	-4(%ecx),%ecx
945	testl	$-4,%ecx
946	leal	4(%edx),%edx
947	jnz	.L019aligned
948	cmpl	$0,%ecx
949	jne	.L018little
950	ret
951.size	OPENSSL_cleanse,.-.L_OPENSSL_cleanse_begin
952.globl	CRYPTO_memcmp
953.type	CRYPTO_memcmp,@function
954.align	16
955CRYPTO_memcmp:
956.L_CRYPTO_memcmp_begin:
957	#ifdef __CET__
958
959.byte	243,15,30,251
960	#endif
961
962	pushl	%esi
963	pushl	%edi
964	movl	12(%esp),%esi
965	movl	16(%esp),%edi
966	movl	20(%esp),%ecx
967	xorl	%eax,%eax
968	xorl	%edx,%edx
969	cmpl	$0,%ecx
970	je	.L020no_data
971.L021loop:
972	movb	(%esi),%dl
973	leal	1(%esi),%esi
974	xorb	(%edi),%dl
975	leal	1(%edi),%edi
976	orb	%dl,%al
977	decl	%ecx
978	jnz	.L021loop
979	negl	%eax
980	shrl	$31,%eax
981.L020no_data:
982	popl	%edi
983	popl	%esi
984	ret
985.size	CRYPTO_memcmp,.-.L_CRYPTO_memcmp_begin
986.globl	OPENSSL_instrument_bus
987.type	OPENSSL_instrument_bus,@function
988.align	16
989OPENSSL_instrument_bus:
990.L_OPENSSL_instrument_bus_begin:
991	#ifdef __CET__
992
993.byte	243,15,30,251
994	#endif
995
996	pushl	%ebp
997	pushl	%ebx
998	pushl	%esi
999	pushl	%edi
1000	movl	$0,%eax
1001	leal	OPENSSL_ia32cap_P,%edx
1002	btl	$4,(%edx)
1003	jnc	.L022nogo
1004	btl	$19,(%edx)
1005	jnc	.L022nogo
1006	movl	20(%esp),%edi
1007	movl	24(%esp),%ecx
1008	.byte	0x0f,0x31
1009	movl	%eax,%esi
1010	movl	$0,%ebx
1011	clflush	(%edi)
1012.byte	240
1013	addl	%ebx,(%edi)
1014	jmp	.L023loop
1015.align	16
1016.L023loop:
1017	.byte	0x0f,0x31
1018	movl	%eax,%edx
1019	subl	%esi,%eax
1020	movl	%edx,%esi
1021	movl	%eax,%ebx
1022	clflush	(%edi)
1023.byte	240
1024	addl	%eax,(%edi)
1025	leal	4(%edi),%edi
1026	subl	$1,%ecx
1027	jnz	.L023loop
1028	movl	24(%esp),%eax
1029.L022nogo:
1030	popl	%edi
1031	popl	%esi
1032	popl	%ebx
1033	popl	%ebp
1034	ret
1035.size	OPENSSL_instrument_bus,.-.L_OPENSSL_instrument_bus_begin
1036.globl	OPENSSL_instrument_bus2
1037.type	OPENSSL_instrument_bus2,@function
1038.align	16
1039OPENSSL_instrument_bus2:
1040.L_OPENSSL_instrument_bus2_begin:
1041	#ifdef __CET__
1042
1043.byte	243,15,30,251
1044	#endif
1045
1046	pushl	%ebp
1047	pushl	%ebx
1048	pushl	%esi
1049	pushl	%edi
1050	movl	$0,%eax
1051	leal	OPENSSL_ia32cap_P,%edx
1052	btl	$4,(%edx)
1053	jnc	.L024nogo
1054	btl	$19,(%edx)
1055	jnc	.L024nogo
1056	movl	20(%esp),%edi
1057	movl	24(%esp),%ecx
1058	movl	28(%esp),%ebp
1059	.byte	0x0f,0x31
1060	movl	%eax,%esi
1061	movl	$0,%ebx
1062	clflush	(%edi)
1063.byte	240
1064	addl	%ebx,(%edi)
1065	.byte	0x0f,0x31
1066	movl	%eax,%edx
1067	subl	%esi,%eax
1068	movl	%edx,%esi
1069	movl	%eax,%ebx
1070	jmp	.L025loop2
1071.align	16
1072.L025loop2:
1073	clflush	(%edi)
1074.byte	240
1075	addl	%eax,(%edi)
1076	subl	$1,%ebp
1077	jz	.L026done2
1078	.byte	0x0f,0x31
1079	movl	%eax,%edx
1080	subl	%esi,%eax
1081	movl	%edx,%esi
1082	cmpl	%ebx,%eax
1083	movl	%eax,%ebx
1084	movl	$0,%edx
1085	setne	%dl
1086	subl	%edx,%ecx
1087	leal	(%edi,%edx,4),%edi
1088	jnz	.L025loop2
1089.L026done2:
1090	movl	24(%esp),%eax
1091	subl	%ecx,%eax
1092.L024nogo:
1093	popl	%edi
1094	popl	%esi
1095	popl	%ebx
1096	popl	%ebp
1097	ret
1098.size	OPENSSL_instrument_bus2,.-.L_OPENSSL_instrument_bus2_begin
1099.globl	OPENSSL_ia32_rdrand_bytes
1100.type	OPENSSL_ia32_rdrand_bytes,@function
1101.align	16
1102OPENSSL_ia32_rdrand_bytes:
1103.L_OPENSSL_ia32_rdrand_bytes_begin:
1104	#ifdef __CET__
1105
1106.byte	243,15,30,251
1107	#endif
1108
1109	pushl	%edi
1110	pushl	%ebx
1111	xorl	%eax,%eax
1112	movl	12(%esp),%edi
1113	movl	16(%esp),%ebx
1114	cmpl	$0,%ebx
1115	je	.L027done
1116	movl	$8,%ecx
1117.L028loop:
1118.byte	15,199,242
1119	jc	.L029break
1120	loop	.L028loop
1121	jmp	.L027done
1122.align	16
1123.L029break:
1124	cmpl	$4,%ebx
1125	jb	.L030tail
1126	movl	%edx,(%edi)
1127	leal	4(%edi),%edi
1128	addl	$4,%eax
1129	subl	$4,%ebx
1130	jz	.L027done
1131	movl	$8,%ecx
1132	jmp	.L028loop
1133.align	16
1134.L030tail:
1135	movb	%dl,(%edi)
1136	leal	1(%edi),%edi
1137	incl	%eax
1138	shrl	$8,%edx
1139	decl	%ebx
1140	jnz	.L030tail
1141.L027done:
1142	xorl	%edx,%edx
1143	popl	%ebx
1144	popl	%edi
1145	ret
1146.size	OPENSSL_ia32_rdrand_bytes,.-.L_OPENSSL_ia32_rdrand_bytes_begin
1147.globl	OPENSSL_ia32_rdseed_bytes
1148.type	OPENSSL_ia32_rdseed_bytes,@function
1149.align	16
1150OPENSSL_ia32_rdseed_bytes:
1151.L_OPENSSL_ia32_rdseed_bytes_begin:
1152	#ifdef __CET__
1153
1154.byte	243,15,30,251
1155	#endif
1156
1157	pushl	%edi
1158	pushl	%ebx
1159	xorl	%eax,%eax
1160	movl	12(%esp),%edi
1161	movl	16(%esp),%ebx
1162	cmpl	$0,%ebx
1163	je	.L031done
1164	movl	$8,%ecx
1165.L032loop:
1166.byte	15,199,250
1167	jc	.L033break
1168	loop	.L032loop
1169	jmp	.L031done
1170.align	16
1171.L033break:
1172	cmpl	$4,%ebx
1173	jb	.L034tail
1174	movl	%edx,(%edi)
1175	leal	4(%edi),%edi
1176	addl	$4,%eax
1177	subl	$4,%ebx
1178	jz	.L031done
1179	movl	$8,%ecx
1180	jmp	.L032loop
1181.align	16
1182.L034tail:
1183	movb	%dl,(%edi)
1184	leal	1(%edi),%edi
1185	incl	%eax
1186	shrl	$8,%edx
1187	decl	%ebx
1188	jnz	.L034tail
1189.L031done:
1190	xorl	%edx,%edx
1191	popl	%ebx
1192	popl	%edi
1193	ret
1194.size	OPENSSL_ia32_rdseed_bytes,.-.L_OPENSSL_ia32_rdseed_bytes_begin
1195.hidden	OPENSSL_cpuid_setup
1196.hidden	OPENSSL_ia32cap_P
1197.comm	OPENSSL_ia32cap_P,16,4
1198.section	.init
1199	call	OPENSSL_cpuid_setup
1200
1201	.section ".note.gnu.property", "a"
1202	.p2align 2
1203	.long 1f - 0f
1204	.long 4f - 1f
1205	.long 5
12060:
1207	.asciz "GNU"
12081:
1209	.p2align 2
1210	.long 0xc0000002
1211	.long 3f - 2f
12122:
1213	.long 3
12143:
1215	.p2align 2
12164:
1217#endif
1218