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