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