xref: /freebsd/sys/crypto/openssl/powerpc64le/ghashp8-ppc.S (revision 71625ec9ad2a9bc8c09784fbd23b759830e0ee5f)
1/* Do not modify. This file is auto-generated from ghashp8-ppc.pl. */
2.machine	"any"
3
4.abiversion	2
5.text
6
7.globl	gcm_init_p8
8.type	gcm_init_p8,@function
9.align	5
10gcm_init_p8:
11.localentry	gcm_init_p8,0
12
13	li	0,-4096
14	li	8,0x10
15	li	12,-1
16	li	9,0x20
17	or	0,0,0
18	li	10,0x30
19	.long	0x7D202699
20
21	vspltisb	8,-16
22	vspltisb	5,1
23	vaddubm	8,8,8
24	vxor	4,4,4
25	vor	8,8,5
26	vsldoi	8,8,4,15
27	vsldoi	6,4,5,1
28	vaddubm	8,8,8
29	vspltisb	7,7
30	vor	8,8,6
31	vspltb	6,9,0
32	vsl	9,9,5
33	vsrab	6,6,7
34	vand	6,6,8
35	vxor	3,9,6
36
37	vsldoi	9,3,3,8
38	vsldoi	8,4,8,8
39	vsldoi	11,4,9,8
40	vsldoi	10,9,4,8
41
42	.long	0x7D001F99
43	.long	0x7D681F99
44	li	8,0x40
45	.long	0x7D291F99
46	li	9,0x50
47	.long	0x7D4A1F99
48	li	10,0x60
49
50	.long	0x10035CC8
51	.long	0x10234CC8
52	.long	0x104354C8
53
54	.long	0x10E044C8
55
56	vsldoi	5,1,4,8
57	vsldoi	6,4,1,8
58	vxor	0,0,5
59	vxor	2,2,6
60
61	vsldoi	0,0,0,8
62	vxor	0,0,7
63
64	vsldoi	6,0,0,8
65	.long	0x100044C8
66	vxor	6,6,2
67	vxor	16,0,6
68
69	vsldoi	17,16,16,8
70	vsldoi	19,4,17,8
71	vsldoi	18,17,4,8
72
73	.long	0x7E681F99
74	li	8,0x70
75	.long	0x7E291F99
76	li	9,0x80
77	.long	0x7E4A1F99
78	li	10,0x90
79	.long	0x10039CC8
80	.long	0x11B09CC8
81	.long	0x10238CC8
82	.long	0x11D08CC8
83	.long	0x104394C8
84	.long	0x11F094C8
85
86	.long	0x10E044C8
87	.long	0x114D44C8
88
89	vsldoi	5,1,4,8
90	vsldoi	6,4,1,8
91	vsldoi	11,14,4,8
92	vsldoi	9,4,14,8
93	vxor	0,0,5
94	vxor	2,2,6
95	vxor	13,13,11
96	vxor	15,15,9
97
98	vsldoi	0,0,0,8
99	vsldoi	13,13,13,8
100	vxor	0,0,7
101	vxor	13,13,10
102
103	vsldoi	6,0,0,8
104	vsldoi	9,13,13,8
105	.long	0x100044C8
106	.long	0x11AD44C8
107	vxor	6,6,2
108	vxor	9,9,15
109	vxor	0,0,6
110	vxor	13,13,9
111
112	vsldoi	9,0,0,8
113	vsldoi	17,13,13,8
114	vsldoi	11,4,9,8
115	vsldoi	10,9,4,8
116	vsldoi	19,4,17,8
117	vsldoi	18,17,4,8
118
119	.long	0x7D681F99
120	li	8,0xa0
121	.long	0x7D291F99
122	li	9,0xb0
123	.long	0x7D4A1F99
124	li	10,0xc0
125	.long	0x7E681F99
126	.long	0x7E291F99
127	.long	0x7E4A1F99
128
129	or	12,12,12
130	blr
131.long	0
132.byte	0,12,0x14,0,0,0,2,0
133.long	0
134.size	gcm_init_p8,.-gcm_init_p8
135.globl	gcm_gmult_p8
136.type	gcm_gmult_p8,@function
137.align	5
138gcm_gmult_p8:
139.localentry	gcm_gmult_p8,0
140
141	lis	0,0xfff8
142	li	8,0x10
143	li	12,-1
144	li	9,0x20
145	or	0,0,0
146	li	10,0x30
147	.long	0x7C601E99
148
149	.long	0x7D682699
150	lvsl	12,0,0
151	.long	0x7D292699
152	vspltisb	5,0x07
153	.long	0x7D4A2699
154	vxor	12,12,5
155	.long	0x7D002699
156	vperm	3,3,3,12
157	vxor	4,4,4
158
159	.long	0x10035CC8
160	.long	0x10234CC8
161	.long	0x104354C8
162
163	.long	0x10E044C8
164
165	vsldoi	5,1,4,8
166	vsldoi	6,4,1,8
167	vxor	0,0,5
168	vxor	2,2,6
169
170	vsldoi	0,0,0,8
171	vxor	0,0,7
172
173	vsldoi	6,0,0,8
174	.long	0x100044C8
175	vxor	6,6,2
176	vxor	0,0,6
177
178	vperm	0,0,0,12
179	.long	0x7C001F99
180
181	or	12,12,12
182	blr
183.long	0
184.byte	0,12,0x14,0,0,0,2,0
185.long	0
186.size	gcm_gmult_p8,.-gcm_gmult_p8
187
188.globl	gcm_ghash_p8
189.type	gcm_ghash_p8,@function
190.align	5
191gcm_ghash_p8:
192.localentry	gcm_ghash_p8,0
193
194	li	0,-4096
195	li	8,0x10
196	li	12,-1
197	li	9,0x20
198	or	0,0,0
199	li	10,0x30
200	.long	0x7C001E99
201
202	.long	0x7D682699
203	li	8,0x40
204	lvsl	12,0,0
205	.long	0x7D292699
206	li	9,0x50
207	vspltisb	5,0x07
208	.long	0x7D4A2699
209	li	10,0x60
210	vxor	12,12,5
211	.long	0x7D002699
212	vperm	0,0,0,12
213	vxor	4,4,4
214
215	cmpldi	6,64
216	bge	.Lgcm_ghash_p8_4x
217
218	.long	0x7C602E99
219	addi	5,5,16
220	subic.	6,6,16
221	vperm	3,3,3,12
222	vxor	3,3,0
223	beq	.Lshort
224
225	.long	0x7E682699
226	li	8,16
227	.long	0x7E292699
228	add	9,5,6
229	.long	0x7E4A2699
230
231
232.align	5
233.Loop_2x:
234	.long	0x7E002E99
235	vperm	16,16,16,12
236
237	subic	6,6,32
238	.long	0x10039CC8
239	.long	0x11B05CC8
240	subfe	0,0,0
241	.long	0x10238CC8
242	.long	0x11D04CC8
243	and	0,0,6
244	.long	0x104394C8
245	.long	0x11F054C8
246	add	5,5,0
247
248	vxor	0,0,13
249	vxor	1,1,14
250
251	.long	0x10E044C8
252
253	vsldoi	5,1,4,8
254	vsldoi	6,4,1,8
255	vxor	2,2,15
256	vxor	0,0,5
257	vxor	2,2,6
258
259	vsldoi	0,0,0,8
260	vxor	0,0,7
261	.long	0x7C682E99
262	addi	5,5,32
263
264	vsldoi	6,0,0,8
265	.long	0x100044C8
266	vperm	3,3,3,12
267	vxor	6,6,2
268	vxor	3,3,6
269	vxor	3,3,0
270	cmpld	9,5
271	bgt	.Loop_2x
272
273	cmplwi	6,0
274	bne	.Leven
275
276.Lshort:
277	.long	0x10035CC8
278	.long	0x10234CC8
279	.long	0x104354C8
280
281	.long	0x10E044C8
282
283	vsldoi	5,1,4,8
284	vsldoi	6,4,1,8
285	vxor	0,0,5
286	vxor	2,2,6
287
288	vsldoi	0,0,0,8
289	vxor	0,0,7
290
291	vsldoi	6,0,0,8
292	.long	0x100044C8
293	vxor	6,6,2
294
295.Leven:
296	vxor	0,0,6
297	vperm	0,0,0,12
298	.long	0x7C001F99
299
300	or	12,12,12
301	blr
302.long	0
303.byte	0,12,0x14,0,0,0,4,0
304.long	0
305.align	5
306.gcm_ghash_p8_4x:
307.Lgcm_ghash_p8_4x:
308	stdu	1,-256(1)
309	li	10,63
310	li	11,79
311	stvx	20,10,1
312	addi	10,10,32
313	stvx	21,11,1
314	addi	11,11,32
315	stvx	22,10,1
316	addi	10,10,32
317	stvx	23,11,1
318	addi	11,11,32
319	stvx	24,10,1
320	addi	10,10,32
321	stvx	25,11,1
322	addi	11,11,32
323	stvx	26,10,1
324	addi	10,10,32
325	stvx	27,11,1
326	addi	11,11,32
327	stvx	28,10,1
328	addi	10,10,32
329	stvx	29,11,1
330	addi	11,11,32
331	stvx	30,10,1
332	li	10,0x60
333	stvx	31,11,1
334	li	0,-1
335	stw	12,252(1)
336	or	0,0,0
337
338	lvsl	5,0,8
339
340	li	8,0x70
341	.long	0x7E292699
342	li	9,0x80
343	vspltisb	6,8
344
345	li	10,0x90
346	.long	0x7EE82699
347	li	8,0xa0
348	.long	0x7F092699
349	li	9,0xb0
350	.long	0x7F2A2699
351	li	10,0xc0
352	.long	0x7FA82699
353	li	8,0x10
354	.long	0x7FC92699
355	li	9,0x20
356	.long	0x7FEA2699
357	li	10,0x30
358
359	vsldoi	7,4,6,8
360	vaddubm	18,5,7
361	vaddubm	19,6,18
362
363	srdi	6,6,4
364
365	.long	0x7C602E99
366	.long	0x7E082E99
367	subic.	6,6,8
368	.long	0x7EC92E99
369	.long	0x7F8A2E99
370	addi	5,5,0x40
371	vperm	3,3,3,12
372	vperm	16,16,16,12
373	vperm	22,22,22,12
374	vperm	28,28,28,12
375
376	vxor	2,3,0
377
378	.long	0x11B0BCC8
379	.long	0x11D0C4C8
380	.long	0x11F0CCC8
381
382	vperm	11,17,9,18
383	vperm	5,22,28,19
384	vperm	10,17,9,19
385	vperm	6,22,28,18
386	.long	0x12B68CC8
387	.long	0x12855CC8
388	.long	0x137C4CC8
389	.long	0x134654C8
390
391	vxor	21,21,14
392	vxor	20,20,13
393	vxor	27,27,21
394	vxor	26,26,15
395
396	blt	.Ltail_4x
397
398.Loop_4x:
399	.long	0x7C602E99
400	.long	0x7E082E99
401	subic.	6,6,4
402	.long	0x7EC92E99
403	.long	0x7F8A2E99
404	addi	5,5,0x40
405	vperm	16,16,16,12
406	vperm	22,22,22,12
407	vperm	28,28,28,12
408	vperm	3,3,3,12
409
410	.long	0x1002ECC8
411	.long	0x1022F4C8
412	.long	0x1042FCC8
413	.long	0x11B0BCC8
414	.long	0x11D0C4C8
415	.long	0x11F0CCC8
416
417	vxor	0,0,20
418	vxor	1,1,27
419	vxor	2,2,26
420	vperm	5,22,28,19
421	vperm	6,22,28,18
422
423	.long	0x10E044C8
424	.long	0x12855CC8
425	.long	0x134654C8
426
427	vsldoi	5,1,4,8
428	vsldoi	6,4,1,8
429	vxor	0,0,5
430	vxor	2,2,6
431
432	vsldoi	0,0,0,8
433	vxor	0,0,7
434
435	vsldoi	6,0,0,8
436	.long	0x12B68CC8
437	.long	0x137C4CC8
438	.long	0x100044C8
439
440	vxor	20,20,13
441	vxor	26,26,15
442	vxor	2,2,3
443	vxor	21,21,14
444	vxor	2,2,6
445	vxor	27,27,21
446	vxor	2,2,0
447	bge	.Loop_4x
448
449.Ltail_4x:
450	.long	0x1002ECC8
451	.long	0x1022F4C8
452	.long	0x1042FCC8
453
454	vxor	0,0,20
455	vxor	1,1,27
456
457	.long	0x10E044C8
458
459	vsldoi	5,1,4,8
460	vsldoi	6,4,1,8
461	vxor	2,2,26
462	vxor	0,0,5
463	vxor	2,2,6
464
465	vsldoi	0,0,0,8
466	vxor	0,0,7
467
468	vsldoi	6,0,0,8
469	.long	0x100044C8
470	vxor	6,6,2
471	vxor	0,0,6
472
473	addic.	6,6,4
474	beq	.Ldone_4x
475
476	.long	0x7C602E99
477	cmpldi	6,2
478	li	6,-4
479	blt	.Lone
480	.long	0x7E082E99
481	beq	.Ltwo
482
483.Lthree:
484	.long	0x7EC92E99
485	vperm	3,3,3,12
486	vperm	16,16,16,12
487	vperm	22,22,22,12
488
489	vxor	2,3,0
490	vor	29,23,23
491	vor	30,24,24
492	vor	31,25,25
493
494	vperm	5,16,22,19
495	vperm	6,16,22,18
496	.long	0x12B08CC8
497	.long	0x13764CC8
498	.long	0x12855CC8
499	.long	0x134654C8
500
501	vxor	27,27,21
502	b	.Ltail_4x
503
504.align	4
505.Ltwo:
506	vperm	3,3,3,12
507	vperm	16,16,16,12
508
509	vxor	2,3,0
510	vperm	5,4,16,19
511	vperm	6,4,16,18
512
513	vsldoi	29,4,17,8
514	vor	30,17,17
515	vsldoi	31,17,4,8
516
517	.long	0x12855CC8
518	.long	0x13704CC8
519	.long	0x134654C8
520
521	b	.Ltail_4x
522
523.align	4
524.Lone:
525	vperm	3,3,3,12
526
527	vsldoi	29,4,9,8
528	vor	30,9,9
529	vsldoi	31,9,4,8
530
531	vxor	2,3,0
532	vxor	20,20,20
533	vxor	27,27,27
534	vxor	26,26,26
535
536	b	.Ltail_4x
537
538.Ldone_4x:
539	vperm	0,0,0,12
540	.long	0x7C001F99
541
542	li	10,63
543	li	11,79
544	or	12,12,12
545	lvx	20,10,1
546	addi	10,10,32
547	lvx	21,11,1
548	addi	11,11,32
549	lvx	22,10,1
550	addi	10,10,32
551	lvx	23,11,1
552	addi	11,11,32
553	lvx	24,10,1
554	addi	10,10,32
555	lvx	25,11,1
556	addi	11,11,32
557	lvx	26,10,1
558	addi	10,10,32
559	lvx	27,11,1
560	addi	11,11,32
561	lvx	28,10,1
562	addi	10,10,32
563	lvx	29,11,1
564	addi	11,11,32
565	lvx	30,10,1
566	lvx	31,11,1
567	addi	1,1,256
568	blr
569.long	0
570.byte	0,12,0x04,0,0x80,0,4,0
571.long	0
572.size	gcm_ghash_p8,.-gcm_ghash_p8
573
574.byte	71,72,65,83,72,32,102,111,114,32,80,111,119,101,114,73,83,65,32,50,46,48,55,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
575.align	2
576.align	2
577