]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - secure/lib/libcrypto/amd64/x25519-x86_64.S
Merge OpenSSL 1.1.1e.
[FreeBSD/FreeBSD.git] / secure / lib / libcrypto / amd64 / x25519-x86_64.S
1 /* $FreeBSD$ */
2 /* Do not modify. This file is auto-generated from x25519-x86_64.pl. */
3 .text   
4
5 .globl  x25519_fe51_mul
6 .type   x25519_fe51_mul,@function
7 .align  32
8 x25519_fe51_mul:
9 .cfi_startproc  
10         pushq   %rbp
11 .cfi_adjust_cfa_offset  8
12 .cfi_offset     %rbp,-16
13         pushq   %rbx
14 .cfi_adjust_cfa_offset  8
15 .cfi_offset     %rbx,-24
16         pushq   %r12
17 .cfi_adjust_cfa_offset  8
18 .cfi_offset     %r12,-32
19         pushq   %r13
20 .cfi_adjust_cfa_offset  8
21 .cfi_offset     %r13,-40
22         pushq   %r14
23 .cfi_adjust_cfa_offset  8
24 .cfi_offset     %r14,-48
25         pushq   %r15
26 .cfi_adjust_cfa_offset  8
27 .cfi_offset     %r15,-56
28         leaq    -40(%rsp),%rsp
29 .cfi_adjust_cfa_offset  40
30 .Lfe51_mul_body:
31
32         movq    0(%rsi),%rax
33         movq    0(%rdx),%r11
34         movq    8(%rdx),%r12
35         movq    16(%rdx),%r13
36         movq    24(%rdx),%rbp
37         movq    32(%rdx),%r14
38
39         movq    %rdi,32(%rsp)
40         movq    %rax,%rdi
41         mulq    %r11
42         movq    %r11,0(%rsp)
43         movq    %rax,%rbx
44         movq    %rdi,%rax
45         movq    %rdx,%rcx
46         mulq    %r12
47         movq    %r12,8(%rsp)
48         movq    %rax,%r8
49         movq    %rdi,%rax
50         leaq    (%r14,%r14,8),%r15
51         movq    %rdx,%r9
52         mulq    %r13
53         movq    %r13,16(%rsp)
54         movq    %rax,%r10
55         movq    %rdi,%rax
56         leaq    (%r14,%r15,2),%rdi
57         movq    %rdx,%r11
58         mulq    %rbp
59         movq    %rax,%r12
60         movq    0(%rsi),%rax
61         movq    %rdx,%r13
62         mulq    %r14
63         movq    %rax,%r14
64         movq    8(%rsi),%rax
65         movq    %rdx,%r15
66
67         mulq    %rdi
68         addq    %rax,%rbx
69         movq    16(%rsi),%rax
70         adcq    %rdx,%rcx
71         mulq    %rdi
72         addq    %rax,%r8
73         movq    24(%rsi),%rax
74         adcq    %rdx,%r9
75         mulq    %rdi
76         addq    %rax,%r10
77         movq    32(%rsi),%rax
78         adcq    %rdx,%r11
79         mulq    %rdi
80         imulq   $19,%rbp,%rdi
81         addq    %rax,%r12
82         movq    8(%rsi),%rax
83         adcq    %rdx,%r13
84         mulq    %rbp
85         movq    16(%rsp),%rbp
86         addq    %rax,%r14
87         movq    16(%rsi),%rax
88         adcq    %rdx,%r15
89
90         mulq    %rdi
91         addq    %rax,%rbx
92         movq    24(%rsi),%rax
93         adcq    %rdx,%rcx
94         mulq    %rdi
95         addq    %rax,%r8
96         movq    32(%rsi),%rax
97         adcq    %rdx,%r9
98         mulq    %rdi
99         imulq   $19,%rbp,%rdi
100         addq    %rax,%r10
101         movq    8(%rsi),%rax
102         adcq    %rdx,%r11
103         mulq    %rbp
104         addq    %rax,%r12
105         movq    16(%rsi),%rax
106         adcq    %rdx,%r13
107         mulq    %rbp
108         movq    8(%rsp),%rbp
109         addq    %rax,%r14
110         movq    24(%rsi),%rax
111         adcq    %rdx,%r15
112
113         mulq    %rdi
114         addq    %rax,%rbx
115         movq    32(%rsi),%rax
116         adcq    %rdx,%rcx
117         mulq    %rdi
118         addq    %rax,%r8
119         movq    8(%rsi),%rax
120         adcq    %rdx,%r9
121         mulq    %rbp
122         imulq   $19,%rbp,%rdi
123         addq    %rax,%r10
124         movq    16(%rsi),%rax
125         adcq    %rdx,%r11
126         mulq    %rbp
127         addq    %rax,%r12
128         movq    24(%rsi),%rax
129         adcq    %rdx,%r13
130         mulq    %rbp
131         movq    0(%rsp),%rbp
132         addq    %rax,%r14
133         movq    32(%rsi),%rax
134         adcq    %rdx,%r15
135
136         mulq    %rdi
137         addq    %rax,%rbx
138         movq    8(%rsi),%rax
139         adcq    %rdx,%rcx
140         mulq    %rbp
141         addq    %rax,%r8
142         movq    16(%rsi),%rax
143         adcq    %rdx,%r9
144         mulq    %rbp
145         addq    %rax,%r10
146         movq    24(%rsi),%rax
147         adcq    %rdx,%r11
148         mulq    %rbp
149         addq    %rax,%r12
150         movq    32(%rsi),%rax
151         adcq    %rdx,%r13
152         mulq    %rbp
153         addq    %rax,%r14
154         adcq    %rdx,%r15
155
156         movq    32(%rsp),%rdi
157         jmp     .Lreduce51
158 .Lfe51_mul_epilogue:
159 .cfi_endproc    
160 .size   x25519_fe51_mul,.-x25519_fe51_mul
161
162 .globl  x25519_fe51_sqr
163 .type   x25519_fe51_sqr,@function
164 .align  32
165 x25519_fe51_sqr:
166 .cfi_startproc  
167         pushq   %rbp
168 .cfi_adjust_cfa_offset  8
169 .cfi_offset     %rbp,-16
170         pushq   %rbx
171 .cfi_adjust_cfa_offset  8
172 .cfi_offset     %rbx,-24
173         pushq   %r12
174 .cfi_adjust_cfa_offset  8
175 .cfi_offset     %r12,-32
176         pushq   %r13
177 .cfi_adjust_cfa_offset  8
178 .cfi_offset     %r13,-40
179         pushq   %r14
180 .cfi_adjust_cfa_offset  8
181 .cfi_offset     %r14,-48
182         pushq   %r15
183 .cfi_adjust_cfa_offset  8
184 .cfi_offset     %r15,-56
185         leaq    -40(%rsp),%rsp
186 .cfi_adjust_cfa_offset  40
187 .Lfe51_sqr_body:
188
189         movq    0(%rsi),%rax
190         movq    16(%rsi),%r15
191         movq    32(%rsi),%rbp
192
193         movq    %rdi,32(%rsp)
194         leaq    (%rax,%rax,1),%r14
195         mulq    %rax
196         movq    %rax,%rbx
197         movq    8(%rsi),%rax
198         movq    %rdx,%rcx
199         mulq    %r14
200         movq    %rax,%r8
201         movq    %r15,%rax
202         movq    %r15,0(%rsp)
203         movq    %rdx,%r9
204         mulq    %r14
205         movq    %rax,%r10
206         movq    24(%rsi),%rax
207         movq    %rdx,%r11
208         imulq   $19,%rbp,%rdi
209         mulq    %r14
210         movq    %rax,%r12
211         movq    %rbp,%rax
212         movq    %rdx,%r13
213         mulq    %r14
214         movq    %rax,%r14
215         movq    %rbp,%rax
216         movq    %rdx,%r15
217
218         mulq    %rdi
219         addq    %rax,%r12
220         movq    8(%rsi),%rax
221         adcq    %rdx,%r13
222
223         movq    24(%rsi),%rsi
224         leaq    (%rax,%rax,1),%rbp
225         mulq    %rax
226         addq    %rax,%r10
227         movq    0(%rsp),%rax
228         adcq    %rdx,%r11
229         mulq    %rbp
230         addq    %rax,%r12
231         movq    %rbp,%rax
232         adcq    %rdx,%r13
233         mulq    %rsi
234         addq    %rax,%r14
235         movq    %rbp,%rax
236         adcq    %rdx,%r15
237         imulq   $19,%rsi,%rbp
238         mulq    %rdi
239         addq    %rax,%rbx
240         leaq    (%rsi,%rsi,1),%rax
241         adcq    %rdx,%rcx
242
243         mulq    %rdi
244         addq    %rax,%r10
245         movq    %rsi,%rax
246         adcq    %rdx,%r11
247         mulq    %rbp
248         addq    %rax,%r8
249         movq    0(%rsp),%rax
250         adcq    %rdx,%r9
251
252         leaq    (%rax,%rax,1),%rsi
253         mulq    %rax
254         addq    %rax,%r14
255         movq    %rbp,%rax
256         adcq    %rdx,%r15
257         mulq    %rsi
258         addq    %rax,%rbx
259         movq    %rsi,%rax
260         adcq    %rdx,%rcx
261         mulq    %rdi
262         addq    %rax,%r8
263         adcq    %rdx,%r9
264
265         movq    32(%rsp),%rdi
266         jmp     .Lreduce51
267
268 .align  32
269 .Lreduce51:
270         movq    $0x7ffffffffffff,%rbp
271
272         movq    %r10,%rdx
273         shrq    $51,%r10
274         shlq    $13,%r11
275         andq    %rbp,%rdx
276         orq     %r10,%r11
277         addq    %r11,%r12
278         adcq    $0,%r13
279
280         movq    %rbx,%rax
281         shrq    $51,%rbx
282         shlq    $13,%rcx
283         andq    %rbp,%rax
284         orq     %rbx,%rcx
285         addq    %rcx,%r8
286         adcq    $0,%r9
287
288         movq    %r12,%rbx
289         shrq    $51,%r12
290         shlq    $13,%r13
291         andq    %rbp,%rbx
292         orq     %r12,%r13
293         addq    %r13,%r14
294         adcq    $0,%r15
295
296         movq    %r8,%rcx
297         shrq    $51,%r8
298         shlq    $13,%r9
299         andq    %rbp,%rcx
300         orq     %r8,%r9
301         addq    %r9,%rdx
302
303         movq    %r14,%r10
304         shrq    $51,%r14
305         shlq    $13,%r15
306         andq    %rbp,%r10
307         orq     %r14,%r15
308
309         leaq    (%r15,%r15,8),%r14
310         leaq    (%r15,%r14,2),%r15
311         addq    %r15,%rax
312
313         movq    %rdx,%r8
314         andq    %rbp,%rdx
315         shrq    $51,%r8
316         addq    %r8,%rbx
317
318         movq    %rax,%r9
319         andq    %rbp,%rax
320         shrq    $51,%r9
321         addq    %r9,%rcx
322
323         movq    %rax,0(%rdi)
324         movq    %rcx,8(%rdi)
325         movq    %rdx,16(%rdi)
326         movq    %rbx,24(%rdi)
327         movq    %r10,32(%rdi)
328
329         movq    40(%rsp),%r15
330 .cfi_restore    %r15
331         movq    48(%rsp),%r14
332 .cfi_restore    %r14
333         movq    56(%rsp),%r13
334 .cfi_restore    %r13
335         movq    64(%rsp),%r12
336 .cfi_restore    %r12
337         movq    72(%rsp),%rbx
338 .cfi_restore    %rbx
339         movq    80(%rsp),%rbp
340 .cfi_restore    %rbp
341         leaq    88(%rsp),%rsp
342 .cfi_adjust_cfa_offset  88
343 .Lfe51_sqr_epilogue:
344         .byte   0xf3,0xc3
345 .cfi_endproc    
346 .size   x25519_fe51_sqr,.-x25519_fe51_sqr
347
348 .globl  x25519_fe51_mul121666
349 .type   x25519_fe51_mul121666,@function
350 .align  32
351 x25519_fe51_mul121666:
352 .cfi_startproc  
353         pushq   %rbp
354 .cfi_adjust_cfa_offset  8
355 .cfi_offset     %rbp,-16
356         pushq   %rbx
357 .cfi_adjust_cfa_offset  8
358 .cfi_offset     %rbx,-24
359         pushq   %r12
360 .cfi_adjust_cfa_offset  8
361 .cfi_offset     %r12,-32
362         pushq   %r13
363 .cfi_adjust_cfa_offset  8
364 .cfi_offset     %r13,-40
365         pushq   %r14
366 .cfi_adjust_cfa_offset  8
367 .cfi_offset     %r14,-48
368         pushq   %r15
369 .cfi_adjust_cfa_offset  8
370 .cfi_offset     %r15,-56
371         leaq    -40(%rsp),%rsp
372 .cfi_adjust_cfa_offset  40
373 .Lfe51_mul121666_body:
374         movl    $121666,%eax
375
376         mulq    0(%rsi)
377         movq    %rax,%rbx
378         movl    $121666,%eax
379         movq    %rdx,%rcx
380         mulq    8(%rsi)
381         movq    %rax,%r8
382         movl    $121666,%eax
383         movq    %rdx,%r9
384         mulq    16(%rsi)
385         movq    %rax,%r10
386         movl    $121666,%eax
387         movq    %rdx,%r11
388         mulq    24(%rsi)
389         movq    %rax,%r12
390         movl    $121666,%eax
391         movq    %rdx,%r13
392         mulq    32(%rsi)
393         movq    %rax,%r14
394         movq    %rdx,%r15
395
396         jmp     .Lreduce51
397 .Lfe51_mul121666_epilogue:
398 .cfi_endproc    
399 .size   x25519_fe51_mul121666,.-x25519_fe51_mul121666
400 .globl  x25519_fe64_eligible
401 .type   x25519_fe64_eligible,@function
402 .align  32
403 x25519_fe64_eligible:
404 .cfi_startproc  
405         xorl    %eax,%eax
406         .byte   0xf3,0xc3
407 .cfi_endproc    
408 .size   x25519_fe64_eligible,.-x25519_fe64_eligible
409
410 .globl  x25519_fe64_mul
411 .type   x25519_fe64_mul,@function
412 .globl  x25519_fe64_sqr
413 .globl  x25519_fe64_mul121666
414 .globl  x25519_fe64_add
415 .globl  x25519_fe64_sub
416 .globl  x25519_fe64_tobytes
417 x25519_fe64_mul:
418 x25519_fe64_sqr:
419 x25519_fe64_mul121666:
420 x25519_fe64_add:
421 x25519_fe64_sub:
422 x25519_fe64_tobytes:
423 .cfi_startproc  
424 .byte   0x0f,0x0b
425         .byte   0xf3,0xc3
426 .cfi_endproc    
427 .size   x25519_fe64_mul,.-x25519_fe64_mul
428 .byte   88,50,53,53,49,57,32,112,114,105,109,105,116,105,118,101,115,32,102,111,114,32,120,56,54,95,54,52,44,32,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