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