xref: /freebsd/sys/crypto/openssl/powerpc64le/x25519-ppc64.S (revision a64729f5077d77e13b9497cb33ecb3c82e606ee8)
1/* Do not modify. This file is auto-generated from x25519-ppc64.pl. */
2.abiversion	2
3.text
4
5.globl	x25519_fe51_mul
6.type	x25519_fe51_mul,@function
7.type	x25519_fe51_mul,@function
8.align	5
9x25519_fe51_mul:
10.localentry	x25519_fe51_mul,0
11
12	stdu	1,-144(1)
13	std	21,56(1)
14	std	22,64(1)
15	std	23,72(1)
16	std	24,80(1)
17	std	25,88(1)
18	std	26,96(1)
19	std	27,104(1)
20	std	28,112(1)
21	std	29,120(1)
22	std	30,128(1)
23	std	31,136(1)
24
25	ld	6,0(5)
26	ld	7,0(4)
27	ld	8,8(4)
28	ld	9,16(4)
29	ld	10,24(4)
30	ld	11,32(4)
31
32	mulld	22,7,6
33	mulhdu	23,7,6
34
35	mulld	24,8,6
36	mulhdu	25,8,6
37
38	mulld	30,11,6
39	mulhdu	31,11,6
40	ld	4,8(5)
41	mulli	11,11,19
42
43	mulld	26,9,6
44	mulhdu	27,9,6
45
46	mulld	28,10,6
47	mulhdu	29,10,6
48	mulld	12,11,4
49	mulhdu	21,11,4
50	addc	22,22,12
51	adde	23,23,21
52
53	mulld	12,7,4
54	mulhdu	21,7,4
55	addc	24,24,12
56	adde	25,25,21
57
58	mulld	12,10,4
59	mulhdu	21,10,4
60	ld	6,16(5)
61	mulli	10,10,19
62	addc	30,30,12
63	adde	31,31,21
64
65	mulld	12,8,4
66	mulhdu	21,8,4
67	addc	26,26,12
68	adde	27,27,21
69
70	mulld	12,9,4
71	mulhdu	21,9,4
72	addc	28,28,12
73	adde	29,29,21
74	mulld	12,10,6
75	mulhdu	21,10,6
76	addc	22,22,12
77	adde	23,23,21
78
79	mulld	12,11,6
80	mulhdu	21,11,6
81	addc	24,24,12
82	adde	25,25,21
83
84	mulld	12,9,6
85	mulhdu	21,9,6
86	ld	4,24(5)
87	mulli	9,9,19
88	addc	30,30,12
89	adde	31,31,21
90
91	mulld	12,7,6
92	mulhdu	21,7,6
93	addc	26,26,12
94	adde	27,27,21
95
96	mulld	12,8,6
97	mulhdu	21,8,6
98	addc	28,28,12
99	adde	29,29,21
100	mulld	12,9,4
101	mulhdu	21,9,4
102	addc	22,22,12
103	adde	23,23,21
104
105	mulld	12,10,4
106	mulhdu	21,10,4
107	addc	24,24,12
108	adde	25,25,21
109
110	mulld	12,8,4
111	mulhdu	21,8,4
112	ld	6,32(5)
113	mulli	8,8,19
114	addc	30,30,12
115	adde	31,31,21
116
117	mulld	12,11,4
118	mulhdu	21,11,4
119	addc	26,26,12
120	adde	27,27,21
121
122	mulld	12,7,4
123	mulhdu	21,7,4
124	addc	28,28,12
125	adde	29,29,21
126	mulld	12,8,6
127	mulhdu	21,8,6
128	addc	22,22,12
129	adde	23,23,21
130
131	mulld	12,9,6
132	mulhdu	21,9,6
133	addc	24,24,12
134	adde	25,25,21
135
136	mulld	12,10,6
137	mulhdu	21,10,6
138	addc	26,26,12
139	adde	27,27,21
140
141	mulld	12,11,6
142	mulhdu	21,11,6
143	addc	28,28,12
144	adde	29,29,21
145
146	mulld	12,7,6
147	mulhdu	21,7,6
148	addc	30,30,12
149	adde	31,31,21
150
151.Lfe51_reduce:
152	li	0,-1
153	srdi	0,0,13
154
155	srdi	12,26,51
156	and	9,26,0
157	insrdi	12,27,51,0
158	srdi	21,22,51
159	and	7,22,0
160	insrdi	21,23,51,0
161	addc	28,28,12
162	addze	29,29
163	addc	24,24,21
164	addze	25,25
165
166	srdi	12,28,51
167	and	10,28,0
168	insrdi	12,29,51,0
169	srdi	21,24,51
170	and	8,24,0
171	insrdi	21,25,51,0
172	addc	30,30,12
173	addze	31,31
174	add	9,9,21
175
176	srdi	12,30,51
177	and	11,30,0
178	insrdi	12,31,51,0
179	mulli	12,12,19
180
181	add	7,7,12
182
183	srdi	21,9,51
184	and	9,9,0
185	add	10,10,21
186
187	srdi	12,7,51
188	and	7,7,0
189	add	8,8,12
190
191	std	9,16(3)
192	std	10,24(3)
193	std	11,32(3)
194	std	7,0(3)
195	std	8,8(3)
196
197	ld	21,56(1)
198	ld	22,64(1)
199	ld	23,72(1)
200	ld	24,80(1)
201	ld	25,88(1)
202	ld	26,96(1)
203	ld	27,104(1)
204	ld	28,112(1)
205	ld	29,120(1)
206	ld	30,128(1)
207	ld	31,136(1)
208	addi	1,1,144
209	blr
210.long	0
211.byte	0,12,4,0,0x80,11,3,0
212.long	0
213.size	x25519_fe51_mul,.-x25519_fe51_mul
214.globl	x25519_fe51_sqr
215.type	x25519_fe51_sqr,@function
216.type	x25519_fe51_sqr,@function
217.align	5
218x25519_fe51_sqr:
219.localentry	x25519_fe51_sqr,0
220
221	stdu	1,-144(1)
222	std	21,56(1)
223	std	22,64(1)
224	std	23,72(1)
225	std	24,80(1)
226	std	25,88(1)
227	std	26,96(1)
228	std	27,104(1)
229	std	28,112(1)
230	std	29,120(1)
231	std	30,128(1)
232	std	31,136(1)
233
234	ld	7,0(4)
235	ld	8,8(4)
236	ld	9,16(4)
237	ld	10,24(4)
238	ld	11,32(4)
239
240	add	6,7,7
241	mulli	21,11,19
242
243	mulld	22,7,7
244	mulhdu	23,7,7
245	mulld	24,8,6
246	mulhdu	25,8,6
247	mulld	26,9,6
248	mulhdu	27,9,6
249	mulld	28,10,6
250	mulhdu	29,10,6
251	mulld	30,11,6
252	mulhdu	31,11,6
253	add	6,8,8
254	mulld	12,11,21
255	mulhdu	11,11,21
256	addc	28,28,12
257	adde	29,29,11
258
259	mulli	5,10,19
260
261	mulld	12,8,8
262	mulhdu	11,8,8
263	addc	26,26,12
264	adde	27,27,11
265	mulld	12,9,6
266	mulhdu	11,9,6
267	addc	28,28,12
268	adde	29,29,11
269	mulld	12,10,6
270	mulhdu	11,10,6
271	addc	30,30,12
272	adde	31,31,11
273	mulld	12,21,6
274	mulhdu	11,21,6
275	add	6,10,10
276	addc	22,22,12
277	adde	23,23,11
278	mulld	12,10,5
279	mulhdu	10,10,5
280	addc	24,24,12
281	adde	25,25,10
282	mulld	12,6,21
283	mulhdu	10,6,21
284	add	6,9,9
285	addc	26,26,12
286	adde	27,27,10
287
288	mulld	12,9,9
289	mulhdu	10,9,9
290	addc	30,30,12
291	adde	31,31,10
292	mulld	12,5,6
293	mulhdu	10,5,6
294	addc	22,22,12
295	adde	23,23,10
296	mulld	12,21,6
297	mulhdu	10,21,6
298	addc	24,24,12
299	adde	25,25,10
300
301	b	.Lfe51_reduce
302.long	0
303.byte	0,12,4,0,0x80,11,2,0
304.long	0
305.size	x25519_fe51_sqr,.-x25519_fe51_sqr
306.globl	x25519_fe51_mul121666
307.type	x25519_fe51_mul121666,@function
308.type	x25519_fe51_mul121666,@function
309.align	5
310x25519_fe51_mul121666:
311.localentry	x25519_fe51_mul121666,0
312
313	stdu	1,-144(1)
314	std	21,56(1)
315	std	22,64(1)
316	std	23,72(1)
317	std	24,80(1)
318	std	25,88(1)
319	std	26,96(1)
320	std	27,104(1)
321	std	28,112(1)
322	std	29,120(1)
323	std	30,128(1)
324	std	31,136(1)
325
326	lis	6,1
327	ori	6,6,56130
328	ld	7,0(4)
329	ld	8,8(4)
330	ld	9,16(4)
331	ld	10,24(4)
332	ld	11,32(4)
333
334	mulld	22,7,6
335	mulhdu	23,7,6
336	mulld	24,8,6
337	mulhdu	25,8,6
338	mulld	26,9,6
339	mulhdu	27,9,6
340	mulld	28,10,6
341	mulhdu	29,10,6
342	mulld	30,11,6
343	mulhdu	31,11,6
344
345	b	.Lfe51_reduce
346.long	0
347.byte	0,12,4,0,0x80,11,2,0
348.long	0
349.size	x25519_fe51_mul121666,.-x25519_fe51_mul121666
350