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