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