xref: /freebsd/sys/crypto/openssl/powerpc/ppccpuid.S (revision 4731124cace5e7a0224e29784617d2856e5c59ab)
1/* $FreeBSD$ */
2/* Do not modify. This file is auto-generated from ppccpuid.pl. */
3.machine	"any"
4.text
5
6.globl	OPENSSL_fpu_probe
7.type	OPENSSL_fpu_probe,@function
8.align	4
9OPENSSL_fpu_probe:
10	fmr	0,0
11	blr
12.long	0
13.byte	0,12,0x14,0,0,0,0,0
14.size	OPENSSL_fpu_probe,.-OPENSSL_fpu_probe
15.globl	OPENSSL_ppc64_probe
16.type	OPENSSL_ppc64_probe,@function
17.align	4
18OPENSSL_ppc64_probe:
19	fcfid	1,1
20	rldicl	0,0,32,32
21	blr
22.long	0
23.byte	0,12,0x14,0,0,0,0,0
24.size	OPENSSL_ppc64_probe,.-OPENSSL_ppc64_probe
25
26.globl	OPENSSL_altivec_probe
27.type	OPENSSL_altivec_probe,@function
28.align	4
29OPENSSL_altivec_probe:
30.long	0x10000484
31	blr
32.long	0
33.byte	0,12,0x14,0,0,0,0,0
34.size	OPENSSL_altivec_probe,.-OPENSSL_altivec_probe
35
36.globl	OPENSSL_crypto207_probe
37.type	OPENSSL_crypto207_probe,@function
38.align	4
39OPENSSL_crypto207_probe:
40	.long	0x7C000E99
41	.long	0x10000508
42	blr
43.long	0
44.byte	0,12,0x14,0,0,0,0,0
45.size	OPENSSL_crypto207_probe,.-OPENSSL_crypto207_probe
46
47.globl	OPENSSL_madd300_probe
48.type	OPENSSL_madd300_probe,@function
49.align	4
50OPENSSL_madd300_probe:
51	xor	0,0,0
52	.long	0x10600033
53	.long	0x10600031
54	blr
55.long	0
56.byte	0,12,0x14,0,0,0,0,0
57
58.globl	OPENSSL_wipe_cpu
59.type	OPENSSL_wipe_cpu,@function
60.align	4
61OPENSSL_wipe_cpu:
62	xor	0,0,0
63	fmr	0,31
64	fmr	1,31
65	fmr	2,31
66	mr	3,1
67	fmr	3,31
68	xor	4,4,4
69	fmr	4,31
70	xor	5,5,5
71	fmr	5,31
72	xor	6,6,6
73	fmr	6,31
74	xor	7,7,7
75	fmr	7,31
76	xor	8,8,8
77	fmr	8,31
78	xor	9,9,9
79	fmr	9,31
80	xor	10,10,10
81	fmr	10,31
82	xor	11,11,11
83	fmr	11,31
84	xor	12,12,12
85	fmr	12,31
86	fmr	13,31
87	blr
88.long	0
89.byte	0,12,0x14,0,0,0,0,0
90.size	OPENSSL_wipe_cpu,.-OPENSSL_wipe_cpu
91
92.globl	OPENSSL_atomic_add
93.type	OPENSSL_atomic_add,@function
94.align	4
95OPENSSL_atomic_add:
96.Ladd:	lwarx	5,0,3
97	add	0,4,5
98	stwcx.	0,0,3
99	bne-	.Ladd
100	mr	3,0
101	blr
102.long	0
103.byte	0,12,0x14,0,0,0,2,0
104.long	0
105.size	OPENSSL_atomic_add,.-OPENSSL_atomic_add
106
107.globl	OPENSSL_rdtsc_mftb
108.type	OPENSSL_rdtsc_mftb,@function
109.align	4
110OPENSSL_rdtsc_mftb:
111	mftb	3
112	blr
113.long	0
114.byte	0,12,0x14,0,0,0,0,0
115.size	OPENSSL_rdtsc_mftb,.-OPENSSL_rdtsc_mftb
116
117.globl	OPENSSL_rdtsc_mfspr268
118.type	OPENSSL_rdtsc_mfspr268,@function
119.align	4
120OPENSSL_rdtsc_mfspr268:
121	mfspr	3,268
122	blr
123.long	0
124.byte	0,12,0x14,0,0,0,0,0
125.size	OPENSSL_rdtsc_mfspr268,.-OPENSSL_rdtsc_mfspr268
126
127.globl	OPENSSL_cleanse
128.type	OPENSSL_cleanse,@function
129.align	4
130OPENSSL_cleanse:
131	cmplwi	4,7
132	li	0,0
133	bge	.Lot
134	cmplwi	4,0
135	.long	0x4DC20020
136.Little:	mtctr	4
137	stb	0,0(3)
138	addi	3,3,1
139	bdnz	$-8
140	blr
141.Lot:	andi.	5,3,3
142	beq	.Laligned
143	stb	0,0(3)
144	subi	4,4,1
145	addi	3,3,1
146	b	.Lot
147.Laligned:
148	srwi	5,4,2
149	mtctr	5
150	stw	0,0(3)
151	addi	3,3,4
152	bdnz	$-8
153	andi.	4,4,3
154	bne	.Little
155	blr
156.long	0
157.byte	0,12,0x14,0,0,0,2,0
158.long	0
159.size	OPENSSL_cleanse,.-OPENSSL_cleanse
160
161.globl	CRYPTO_memcmp
162.type	CRYPTO_memcmp,@function
163.align	4
164CRYPTO_memcmp:
165	cmplwi	5,0
166	li	0,0
167	beq	.Lno_data
168	mtctr	5
169.Loop_cmp:
170	lbz	6,0(3)
171	addi	3,3,1
172	lbz	7,0(4)
173	addi	4,4,1
174	xor	6,6,7
175	or	0,0,6
176	bdnz	.Loop_cmp
177
178.Lno_data:
179	li	3,0
180	sub	3,3,0
181	extrwi	3,3,1,0
182	blr
183.long	0
184.byte	0,12,0x14,0,0,0,3,0
185.long	0
186.size	CRYPTO_memcmp,.-CRYPTO_memcmp
187.globl	OPENSSL_instrument_bus_mftb
188.type	OPENSSL_instrument_bus_mftb,@function
189.align	4
190OPENSSL_instrument_bus_mftb:
191	mtctr	4
192
193	mftb	7
194	li	8,0
195
196	dcbf	0,3
197	lwarx	6,0,3
198	add	6,6,8
199	stwcx.	6,0,3
200	stwx	6,0,3
201
202.Loop:	mftb	6
203	sub	8,6,7
204	mr	7,6
205	dcbf	0,3
206	lwarx	6,0,3
207	add	6,6,8
208	stwcx.	6,0,3
209	stwx	6,0,3
210	addi	3,3,4
211	bdnz	.Loop
212
213	mr	3,4
214	blr
215.long	0
216.byte	0,12,0x14,0,0,0,2,0
217.long	0
218.size	OPENSSL_instrument_bus_mftb,.-OPENSSL_instrument_bus_mftb
219
220.globl	OPENSSL_instrument_bus2_mftb
221.type	OPENSSL_instrument_bus2_mftb,@function
222.align	4
223OPENSSL_instrument_bus2_mftb:
224	mr	0,4
225	slwi	4,4,2
226
227	mftb	7
228	li	8,0
229
230	dcbf	0,3
231	lwarx	6,0,3
232	add	6,6,8
233	stwcx.	6,0,3
234	stwx	6,0,3
235
236	mftb	6
237	sub	8,6,7
238	mr	7,6
239	mr	9,8
240.Loop2:
241	dcbf	0,3
242	lwarx	6,0,3
243	add	6,6,8
244	stwcx.	6,0,3
245	stwx	6,0,3
246
247	addic.	5,5,-1
248	beq	.Ldone2
249
250	mftb	6
251	sub	8,6,7
252	mr	7,6
253	.long	0x7f884840
254	mr	9,8
255
256	mfcr	6
257	not	6,6
258	rlwinm	6,6,1,29,29
259
260	sub.	4,4,6
261	add	3,3,6
262	bne	.Loop2
263
264.Ldone2:
265	srwi	4,4,2
266	sub	3,0,4
267	blr
268.long	0
269.byte	0,12,0x14,0,0,0,3,0
270.long	0
271.size	OPENSSL_instrument_bus2_mftb,.-OPENSSL_instrument_bus2_mftb
272
273.globl	OPENSSL_instrument_bus_mfspr268
274.type	OPENSSL_instrument_bus_mfspr268,@function
275.align	4
276OPENSSL_instrument_bus_mfspr268:
277	mtctr	4
278
279	mfspr	7,268
280	li	8,0
281
282	dcbf	0,3
283	lwarx	6,0,3
284	add	6,6,8
285	stwcx.	6,0,3
286	stwx	6,0,3
287
288.Loop3:	mfspr	6,268
289	sub	8,6,7
290	mr	7,6
291	dcbf	0,3
292	lwarx	6,0,3
293	add	6,6,8
294	stwcx.	6,0,3
295	stwx	6,0,3
296	addi	3,3,4
297	bdnz	.Loop3
298
299	mr	3,4
300	blr
301.long	0
302.byte	0,12,0x14,0,0,0,2,0
303.long	0
304.size	OPENSSL_instrument_bus_mfspr268,.-OPENSSL_instrument_bus_mfspr268
305
306.globl	OPENSSL_instrument_bus2_mfspr268
307.type	OPENSSL_instrument_bus2_mfspr268,@function
308.align	4
309OPENSSL_instrument_bus2_mfspr268:
310	mr	0,4
311	slwi	4,4,2
312
313	mfspr	7,268
314	li	8,0
315
316	dcbf	0,3
317	lwarx	6,0,3
318	add	6,6,8
319	stwcx.	6,0,3
320	stwx	6,0,3
321
322	mfspr	6,268
323	sub	8,6,7
324	mr	7,6
325	mr	9,8
326.Loop4:
327	dcbf	0,3
328	lwarx	6,0,3
329	add	6,6,8
330	stwcx.	6,0,3
331	stwx	6,0,3
332
333	addic.	5,5,-1
334	beq	.Ldone4
335
336	mfspr	6,268
337	sub	8,6,7
338	mr	7,6
339	.long	0x7f884840
340	mr	9,8
341
342	mfcr	6
343	not	6,6
344	rlwinm	6,6,1,29,29
345
346	sub.	4,4,6
347	add	3,3,6
348	bne	.Loop4
349
350.Ldone4:
351	srwi	4,4,2
352	sub	3,0,4
353	blr
354.long	0
355.byte	0,12,0x14,0,0,0,3,0
356.long	0
357.size	OPENSSL_instrument_bus2_mfspr268,.-OPENSSL_instrument_bus2_mfspr268
358