xref: /freebsd/sys/crypto/openssl/powerpc/poly1305-ppcfp.S (revision 924226fba12cc9a228c73b956e1b7fa24c60b055)
1/* $FreeBSD$ */
2/* Do not modify. This file is auto-generated from poly1305-ppcfp.pl. */
3.machine	"any"
4.text
5
6.globl	poly1305_init_fpu
7.type	poly1305_init_fpu,@function
8.align	6
9poly1305_init_fpu:
10	stwu	1,-24(1)
11	mflr	6
12	stw	6,28(1)
13
14	bl	.LPICmeup
15
16	xor	0,0,0
17	mtlr	6
18
19	lfd	8,8*0(5)
20	lfd	9,8*1(5)
21	lfd	10,8*2(5)
22	lfd	11,8*3(5)
23	lfd	12,8*4(5)
24	lfd	13,8*5(5)
25
26	stfd	8,8*0(3)
27	stfd	9,8*1(3)
28	stfd	10,8*2(3)
29	stfd	11,8*3(3)
30
31	.long	0x7c040040
32	beq-	.Lno_key
33
34	lfd	6,8*13(5)
35	mffs	7
36
37	stfd	8,8*4(3)
38	stfd	9,8*5(3)
39	stfd	10,8*6(3)
40	stfd	11,8*7(3)
41
42	li	8,4
43	li	9,8
44	li	10,12
45	lwbrx	7,0,4
46	lwbrx	8,8,4
47	lwbrx	9,9,4
48	lwbrx	10,10,4
49
50	lis	11,0xf000
51	ori	12,11,3
52	andc	7,7,11
53	andc	8,8,12
54	andc	9,9,12
55	andc	10,10,12
56
57	stw	7,36(3)
58	stw	8,44(3)
59	stw	9,52(3)
60	stw	10,60(3)
61
62	mtfsf	255,6
63	stfd	8,8*18(3)
64	stfd	9,8*19(3)
65	stfd	10,8*20(3)
66	stfd	11,8*21(3)
67	stfd	12,8*22(3)
68	stfd	13,8*23(3)
69
70	lfd	0,8*4(3)
71	lfd	2,8*5(3)
72	lfd	4,8*6(3)
73	lfd	6,8*7(3)
74
75	fsub	0,0,8
76	fsub	2,2,9
77	fsub	4,4,10
78	fsub	6,6,11
79
80	lfd	8,8*6(5)
81	lfd	9,8*7(5)
82	lfd	10,8*8(5)
83	lfd	11,8*9(5)
84
85	fmul	3,2,13
86	fmul	5,4,13
87	stfd	7,8*15(3)
88	fmul	7,6,13
89
90	fadd	1,0,8
91	stfd	3,8*12(3)
92	fadd	3,2,9
93	stfd	5,8*13(3)
94	fadd	5,4,10
95	stfd	7,8*14(3)
96	fadd	7,6,11
97
98	fsub	1,1,8
99	fsub	3,3,9
100	fsub	5,5,10
101	fsub	7,7,11
102
103	lfd	8,8*10(5)
104	lfd	9,8*11(5)
105	lfd	10,8*12(5)
106
107	fsub	0,0,1
108	fsub	2,2,3
109	fsub	4,4,5
110	fsub	6,6,7
111
112	stfd	1,8*5(3)
113	stfd	3,8*7(3)
114	stfd	5,8*9(3)
115	stfd	7,8*11(3)
116
117	stfd	0,8*4(3)
118	stfd	2,8*6(3)
119	stfd	4,8*8(3)
120	stfd	6,8*10(3)
121
122	lfd	2,8*12(3)
123	lfd	4,8*13(3)
124	lfd	6,8*14(3)
125	lfd	0,8*15(3)
126
127	fadd	3,2,8
128	fadd	5,4,9
129	fadd	7,6,10
130
131	fsub	3,3,8
132	fsub	5,5,9
133	fsub	7,7,10
134
135	fsub	2,2,3
136	fsub	4,4,5
137	fsub	6,6,7
138
139	stfd	3,8*13(3)
140	stfd	5,8*15(3)
141	stfd	7,8*17(3)
142
143	stfd	2,8*12(3)
144	stfd	4,8*14(3)
145	stfd	6,8*16(3)
146
147	mtfsf	255,0
148.Lno_key:
149	xor	3,3,3
150	addi	1,1,24
151	blr
152.long	0
153.byte	0,12,4,1,0x80,0,2,0
154.size	poly1305_init_fpu,.-poly1305_init_fpu
155
156.globl	poly1305_blocks_fpu
157.type	poly1305_blocks_fpu,@function
158.align	4
159poly1305_blocks_fpu:
160	srwi.	5,5,4
161	beq-	.Labort
162
163	stwu	1,-216(1)
164	mflr	0
165	stfd	14,72(1)
166	stfd	15,80(1)
167	stfd	16,88(1)
168	stfd	17,96(1)
169	stfd	18,104(1)
170	stfd	19,112(1)
171	stfd	20,120(1)
172	stfd	21,128(1)
173	stfd	22,136(1)
174	stfd	23,144(1)
175	stfd	24,152(1)
176	stfd	25,160(1)
177	stfd	26,168(1)
178	stfd	27,176(1)
179	stfd	28,184(1)
180	stfd	29,192(1)
181	stfd	30,200(1)
182	stfd	31,208(1)
183	stw	0,220(1)
184
185	xor	0,0,0
186	li	10,1
187	mtctr	5
188	neg	5,5
189	stw	0,56(1)
190	stw	10,60(1)
191
192	lfd	8,8*18(3)
193	lfd	9,8*19(3)
194	lfd	10,8*20(3)
195	lfd	11,8*21(3)
196	lfd	12,8*22(3)
197	lfd	13,8*23(3)
198
199	lfd	0,8*0(3)
200	lfd	2,8*1(3)
201	lfd	4,8*2(3)
202	lfd	6,8*3(3)
203
204	stfd	8,24(1)
205	oris	10,6,18736
206	stfd	9,32(1)
207	stfd	10,40(1)
208	stw	10,48(1)
209
210	li	11,4
211	li	12,8
212	li	6,12
213	lwbrx	7,0,4
214	lwbrx	8,11,4
215	lwbrx	9,12,4
216	lwbrx	10,6,4
217	addi	4,4,16
218
219	stw	7,28(1)
220	stw	8,36(1)
221	stw	9,44(1)
222	stw	10,52(1)
223
224	mffs	28
225	lfd	29,56(1)
226	lfd	14,8*4(3)
227	lfd	15,8*5(3)
228	lfd	16,8*6(3)
229	lfd	17,8*7(3)
230	lfd	18,8*8(3)
231	lfd	19,8*9(3)
232	lfd	24,8*10(3)
233	lfd	25,8*11(3)
234	lfd	26,8*12(3)
235	lfd	27,8*13(3)
236	lfd	20,8*14(3)
237	lfd	21,8*15(3)
238	lfd	22,8*16(3)
239	lfd	23,8*17(3)
240
241	stfd	28,56(1)
242	mtfsf	255,29
243
244	addic	5,5,1
245	addze	0,0
246	slwi.	0,0,4
247	sub	4,4,0
248
249	lfd	28,24(1)
250	lfd	29,32(1)
251	lfd	30,40(1)
252	lfd	31,48(1)
253
254	fsub	0,0,8
255	lwbrx	7,0,4
256	fsub	2,2,9
257	lwbrx	8,11,4
258	fsub	4,4,10
259	lwbrx	9,12,4
260	fsub	6,6,11
261	lwbrx	10,6,4
262
263	fsub	28,28,8
264	addi	4,4,16
265	fsub	29,29,9
266	fsub	30,30,10
267	fsub	31,31,11
268
269	fadd	28,28,0
270	stw	7,28(1)
271	fadd	29,29,2
272	stw	8,36(1)
273	fadd	30,30,4
274	stw	9,44(1)
275	fadd	31,31,6
276	stw	10,52(1)
277
278	b	.Lentry
279
280.align	4
281.Loop:
282	fsub	30,30,8
283	addic	5,5,1
284	fsub	31,31,9
285	addze	0,0
286	fsub	26,26,10
287	slwi.	0,0,4
288	fsub	27,27,11
289	sub	4,4,0
290
291	fadd	0,0,30
292	fadd	1,1,31
293	fadd	4,4,26
294	fadd	5,5,27
295
296
297	fadd	26,2,10
298	lwbrx	7,0,4
299	fadd	27,3,10
300	lwbrx	8,11,4
301	fadd	30,6,12
302	lwbrx	9,12,4
303	fadd	31,7,12
304	lwbrx	10,6,4
305	fadd	24,0,9
306	addi	4,4,16
307	fadd	25,1,9
308	fadd	28,4,11
309	fadd	29,5,11
310
311	fsub	26,26,10
312	stw	7,28(1)
313	fsub	27,27,10
314	stw	8,36(1)
315	fsub	30,30,12
316	stw	9,44(1)
317	fsub	31,31,12
318	stw	10,52(1)
319	fsub	24,24,9
320	fsub	25,25,9
321	fsub	28,28,11
322	fsub	29,29,11
323
324	fsub	2,2,26
325	fsub	3,3,27
326	fsub	6,6,30
327	fsub	7,7,31
328	fsub	4,4,28
329	fsub	5,5,29
330	fsub	0,0,24
331	fsub	1,1,25
332
333	fadd	2,2,24
334	fadd	3,3,25
335	fadd	6,6,28
336	fadd	7,7,29
337	fadd	4,4,26
338	fadd	5,5,27
339	fmadd	0,30,13,0
340	fmadd	1,31,13,1
341
342	fadd	29,2,3
343	lfd	26,8*12(3)
344	fadd	31,6,7
345	lfd	27,8*13(3)
346	fadd	30,4,5
347	lfd	24,8*10(3)
348	fadd	28,0,1
349	lfd	25,8*11(3)
350.Lentry:
351	fmul	0,22,29
352	fmul	1,23,29
353	fmul	4,16,29
354	fmul	5,17,29
355	fmul	2,14,29
356	fmul	3,15,29
357	fmul	6,18,29
358	fmul	7,19,29
359
360	fmadd	0,26,31,0
361	fmadd	1,27,31,1
362	fmadd	4,22,31,4
363	fmadd	5,23,31,5
364	fmadd	2,20,31,2
365	fmadd	3,21,31,3
366	fmadd	6,14,31,6
367	fmadd	7,15,31,7
368
369	fmadd	0,20,30,0
370	fmadd	1,21,30,1
371	fmadd	4,14,30,4
372	fmadd	5,15,30,5
373	fmadd	2,22,30,2
374	fmadd	3,23,30,3
375	fmadd	6,16,30,6
376	fmadd	7,17,30,7
377
378	fmadd	0,14,28,0
379	lfd	30,24(1)
380	fmadd	1,15,28,1
381	lfd	31,32(1)
382	fmadd	4,18,28,4
383	lfd	26,40(1)
384	fmadd	5,19,28,5
385	lfd	27,48(1)
386	fmadd	2,16,28,2
387	fmadd	3,17,28,3
388	fmadd	6,24,28,6
389	fmadd	7,25,28,7
390
391	bdnz	.Loop
392
393
394	fadd	24,0,9
395	fadd	25,1,9
396	fadd	28,4,11
397	fadd	29,5,11
398	fadd	26,2,10
399	fadd	27,3,10
400	fadd	30,6,12
401	fadd	31,7,12
402
403	fsub	24,24,9
404	fsub	25,25,9
405	fsub	28,28,11
406	fsub	29,29,11
407	fsub	26,26,10
408	fsub	27,27,10
409	fsub	30,30,12
410	fsub	31,31,12
411
412	fsub	2,2,26
413	fsub	3,3,27
414	fsub	6,6,30
415	fsub	7,7,31
416	fsub	4,4,28
417	fsub	5,5,29
418	fsub	0,0,24
419	fsub	1,1,25
420
421	fadd	2,2,24
422	fadd	3,3,25
423	fadd	6,6,28
424	fadd	7,7,29
425	fadd	4,4,26
426	fadd	5,5,27
427	fmadd	0,30,13,0
428	fmadd	1,31,13,1
429
430	fadd	29,2,3
431	fadd	31,6,7
432	fadd	30,4,5
433	fadd	28,0,1
434
435	lfd	0,56(1)
436	fadd	29,29,9
437	fadd	31,31,11
438	fadd	30,30,10
439	fadd	28,28,8
440
441	stfd	29,8*1(3)
442	stfd	31,8*3(3)
443	stfd	30,8*2(3)
444	stfd	28,8*0(3)
445
446	mtfsf	255,0
447	lfd	14,72(1)
448	lfd	15,80(1)
449	lfd	16,88(1)
450	lfd	17,96(1)
451	lfd	18,104(1)
452	lfd	19,112(1)
453	lfd	20,120(1)
454	lfd	21,128(1)
455	lfd	22,136(1)
456	lfd	23,144(1)
457	lfd	24,152(1)
458	lfd	25,160(1)
459	lfd	26,168(1)
460	lfd	27,176(1)
461	lfd	28,184(1)
462	lfd	29,192(1)
463	lfd	30,200(1)
464	lfd	31,208(1)
465	addi	1,1,216
466.Labort:
467	blr
468.long	0
469.byte	0,12,4,1,0x80,0,4,0
470.size	poly1305_blocks_fpu,.-poly1305_blocks_fpu
471.globl	poly1305_emit_fpu
472.type	poly1305_emit_fpu,@function
473.align	4
474poly1305_emit_fpu:
475	stwu	1,-40(1)
476	mflr	0
477	stw	28,24(1)
478	stw	29,28(1)
479	stw	30,32(1)
480	stw	31,36(1)
481	stw	0,44(1)
482
483	lwz	28,0(3)
484	lwz	7,4(3)
485	lwz	29,8(3)
486	lwz	8,12(3)
487	lwz	30,16(3)
488	lwz	9,20(3)
489	lwz	31,24(3)
490	lwz	10,28(3)
491
492	lis	0,0xfff0
493	andc	28,28,0
494	andc	29,29,0
495	andc	30,30,0
496	andc	31,31,0
497	li	0,3
498
499	srwi	6,31,2
500	and	11,31,0
501	andc	31,31,0
502	add	31,31,6
503	addc	7,7,31
504	adde	8,8,28
505	adde	9,9,29
506	adde	10,10,30
507	addze	11,11
508
509	addic	28,7,5
510	addze	29,8
511	addze	30,9
512	addze	31,10
513	addze	0,11
514
515	srwi	0,0,2
516	neg	0,0
517	srawi	0,0,31
518
519	andc	7,7,0
520	and	28,28,0
521	andc	8,8,0
522	and	29,29,0
523	or	7,7,28
524	lwz	28,0(5)
525	andc	9,9,0
526	and	30,30,0
527	or	8,8,29
528	lwz	29,4(5)
529	andc	10,10,0
530	and	31,31,0
531	or	9,9,30
532	lwz	30,8(5)
533	or	10,10,31
534	lwz	31,12(5)
535
536	addc	7,7,28
537	adde	8,8,29
538	adde	9,9,30
539	adde	10,10,31
540	li	29,4
541	stwbrx	7,0,4
542	li	30,8
543	stwbrx	8,29,4
544	li	31,12
545	stwbrx	9,30,4
546	stwbrx	10,31,4
547	lwz	28,24(1)
548	lwz	29,28(1)
549	lwz	30,32(1)
550	lwz	31,36(1)
551	addi	1,1,40
552	blr
553.long	0
554.byte	0,12,4,1,0x80,4,3,0
555.size	poly1305_emit_fpu,.-poly1305_emit_fpu
556.align	6
557.LPICmeup:
558	mflr	0
559	bcl	20,31,$+4
560	mflr	5
561	addi	5,5,56
562	mtlr	0
563	blr
564.long	0
565.byte	0,12,0x14,0,0,0,0,0
566.space	28
567
568.long	0x43300000,0x00000000
569.long	0x45300000,0x00000000
570.long	0x47300000,0x00000000
571.long	0x49300000,0x00000000
572.long	0x4b500000,0x00000000
573
574.long	0x37f40000,0x00000000
575
576.long	0x44300000,0x00000000
577.long	0x46300000,0x00000000
578.long	0x48300000,0x00000000
579.long	0x4a300000,0x00000000
580.long	0x3e300000,0x00000000
581.long	0x40300000,0x00000000
582.long	0x42300000,0x00000000
583
584.long	0x00000000,0x00000001
585.byte	80,111,108,121,49,51,48,53,32,102,111,114,32,80,80,67,32,70,80,85,44,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
586.align	2
587.align	4
588