VirtualBox

source: vbox/trunk/src/libs/openssl-1.1.1k/crypto/genasm-macosx/x25519-x86_64.S@ 91789

最後變更 在這個檔案從91789是 83531,由 vboxsync 提交於 5 年 前

setting svn:sync-process=export for openssl-1.1.1f, all files except tests

檔案大小: 5.6 KB
 
1.text
2
3.globl _x25519_fe51_mul
4
5.p2align 5
6_x25519_fe51_mul:
7
8 pushq %rbp
9
10 pushq %rbx
11
12 pushq %r12
13
14 pushq %r13
15
16 pushq %r14
17
18 pushq %r15
19
20 leaq -40(%rsp),%rsp
21
22L$fe51_mul_body:
23
24 movq 0(%rsi),%rax
25 movq 0(%rdx),%r11
26 movq 8(%rdx),%r12
27 movq 16(%rdx),%r13
28 movq 24(%rdx),%rbp
29 movq 32(%rdx),%r14
30
31 movq %rdi,32(%rsp)
32 movq %rax,%rdi
33 mulq %r11
34 movq %r11,0(%rsp)
35 movq %rax,%rbx
36 movq %rdi,%rax
37 movq %rdx,%rcx
38 mulq %r12
39 movq %r12,8(%rsp)
40 movq %rax,%r8
41 movq %rdi,%rax
42 leaq (%r14,%r14,8),%r15
43 movq %rdx,%r9
44 mulq %r13
45 movq %r13,16(%rsp)
46 movq %rax,%r10
47 movq %rdi,%rax
48 leaq (%r14,%r15,2),%rdi
49 movq %rdx,%r11
50 mulq %rbp
51 movq %rax,%r12
52 movq 0(%rsi),%rax
53 movq %rdx,%r13
54 mulq %r14
55 movq %rax,%r14
56 movq 8(%rsi),%rax
57 movq %rdx,%r15
58
59 mulq %rdi
60 addq %rax,%rbx
61 movq 16(%rsi),%rax
62 adcq %rdx,%rcx
63 mulq %rdi
64 addq %rax,%r8
65 movq 24(%rsi),%rax
66 adcq %rdx,%r9
67 mulq %rdi
68 addq %rax,%r10
69 movq 32(%rsi),%rax
70 adcq %rdx,%r11
71 mulq %rdi
72 imulq $19,%rbp,%rdi
73 addq %rax,%r12
74 movq 8(%rsi),%rax
75 adcq %rdx,%r13
76 mulq %rbp
77 movq 16(%rsp),%rbp
78 addq %rax,%r14
79 movq 16(%rsi),%rax
80 adcq %rdx,%r15
81
82 mulq %rdi
83 addq %rax,%rbx
84 movq 24(%rsi),%rax
85 adcq %rdx,%rcx
86 mulq %rdi
87 addq %rax,%r8
88 movq 32(%rsi),%rax
89 adcq %rdx,%r9
90 mulq %rdi
91 imulq $19,%rbp,%rdi
92 addq %rax,%r10
93 movq 8(%rsi),%rax
94 adcq %rdx,%r11
95 mulq %rbp
96 addq %rax,%r12
97 movq 16(%rsi),%rax
98 adcq %rdx,%r13
99 mulq %rbp
100 movq 8(%rsp),%rbp
101 addq %rax,%r14
102 movq 24(%rsi),%rax
103 adcq %rdx,%r15
104
105 mulq %rdi
106 addq %rax,%rbx
107 movq 32(%rsi),%rax
108 adcq %rdx,%rcx
109 mulq %rdi
110 addq %rax,%r8
111 movq 8(%rsi),%rax
112 adcq %rdx,%r9
113 mulq %rbp
114 imulq $19,%rbp,%rdi
115 addq %rax,%r10
116 movq 16(%rsi),%rax
117 adcq %rdx,%r11
118 mulq %rbp
119 addq %rax,%r12
120 movq 24(%rsi),%rax
121 adcq %rdx,%r13
122 mulq %rbp
123 movq 0(%rsp),%rbp
124 addq %rax,%r14
125 movq 32(%rsi),%rax
126 adcq %rdx,%r15
127
128 mulq %rdi
129 addq %rax,%rbx
130 movq 8(%rsi),%rax
131 adcq %rdx,%rcx
132 mulq %rbp
133 addq %rax,%r8
134 movq 16(%rsi),%rax
135 adcq %rdx,%r9
136 mulq %rbp
137 addq %rax,%r10
138 movq 24(%rsi),%rax
139 adcq %rdx,%r11
140 mulq %rbp
141 addq %rax,%r12
142 movq 32(%rsi),%rax
143 adcq %rdx,%r13
144 mulq %rbp
145 addq %rax,%r14
146 adcq %rdx,%r15
147
148 movq 32(%rsp),%rdi
149 jmp L$reduce51
150L$fe51_mul_epilogue:
151
152
153
154.globl _x25519_fe51_sqr
155
156.p2align 5
157_x25519_fe51_sqr:
158
159 pushq %rbp
160
161 pushq %rbx
162
163 pushq %r12
164
165 pushq %r13
166
167 pushq %r14
168
169 pushq %r15
170
171 leaq -40(%rsp),%rsp
172
173L$fe51_sqr_body:
174
175 movq 0(%rsi),%rax
176 movq 16(%rsi),%r15
177 movq 32(%rsi),%rbp
178
179 movq %rdi,32(%rsp)
180 leaq (%rax,%rax,1),%r14
181 mulq %rax
182 movq %rax,%rbx
183 movq 8(%rsi),%rax
184 movq %rdx,%rcx
185 mulq %r14
186 movq %rax,%r8
187 movq %r15,%rax
188 movq %r15,0(%rsp)
189 movq %rdx,%r9
190 mulq %r14
191 movq %rax,%r10
192 movq 24(%rsi),%rax
193 movq %rdx,%r11
194 imulq $19,%rbp,%rdi
195 mulq %r14
196 movq %rax,%r12
197 movq %rbp,%rax
198 movq %rdx,%r13
199 mulq %r14
200 movq %rax,%r14
201 movq %rbp,%rax
202 movq %rdx,%r15
203
204 mulq %rdi
205 addq %rax,%r12
206 movq 8(%rsi),%rax
207 adcq %rdx,%r13
208
209 movq 24(%rsi),%rsi
210 leaq (%rax,%rax,1),%rbp
211 mulq %rax
212 addq %rax,%r10
213 movq 0(%rsp),%rax
214 adcq %rdx,%r11
215 mulq %rbp
216 addq %rax,%r12
217 movq %rbp,%rax
218 adcq %rdx,%r13
219 mulq %rsi
220 addq %rax,%r14
221 movq %rbp,%rax
222 adcq %rdx,%r15
223 imulq $19,%rsi,%rbp
224 mulq %rdi
225 addq %rax,%rbx
226 leaq (%rsi,%rsi,1),%rax
227 adcq %rdx,%rcx
228
229 mulq %rdi
230 addq %rax,%r10
231 movq %rsi,%rax
232 adcq %rdx,%r11
233 mulq %rbp
234 addq %rax,%r8
235 movq 0(%rsp),%rax
236 adcq %rdx,%r9
237
238 leaq (%rax,%rax,1),%rsi
239 mulq %rax
240 addq %rax,%r14
241 movq %rbp,%rax
242 adcq %rdx,%r15
243 mulq %rsi
244 addq %rax,%rbx
245 movq %rsi,%rax
246 adcq %rdx,%rcx
247 mulq %rdi
248 addq %rax,%r8
249 adcq %rdx,%r9
250
251 movq 32(%rsp),%rdi
252 jmp L$reduce51
253
254.p2align 5
255L$reduce51:
256 movq $0x7ffffffffffff,%rbp
257
258 movq %r10,%rdx
259 shrq $51,%r10
260 shlq $13,%r11
261 andq %rbp,%rdx
262 orq %r10,%r11
263 addq %r11,%r12
264 adcq $0,%r13
265
266 movq %rbx,%rax
267 shrq $51,%rbx
268 shlq $13,%rcx
269 andq %rbp,%rax
270 orq %rbx,%rcx
271 addq %rcx,%r8
272 adcq $0,%r9
273
274 movq %r12,%rbx
275 shrq $51,%r12
276 shlq $13,%r13
277 andq %rbp,%rbx
278 orq %r12,%r13
279 addq %r13,%r14
280 adcq $0,%r15
281
282 movq %r8,%rcx
283 shrq $51,%r8
284 shlq $13,%r9
285 andq %rbp,%rcx
286 orq %r8,%r9
287 addq %r9,%rdx
288
289 movq %r14,%r10
290 shrq $51,%r14
291 shlq $13,%r15
292 andq %rbp,%r10
293 orq %r14,%r15
294
295 leaq (%r15,%r15,8),%r14
296 leaq (%r15,%r14,2),%r15
297 addq %r15,%rax
298
299 movq %rdx,%r8
300 andq %rbp,%rdx
301 shrq $51,%r8
302 addq %r8,%rbx
303
304 movq %rax,%r9
305 andq %rbp,%rax
306 shrq $51,%r9
307 addq %r9,%rcx
308
309 movq %rax,0(%rdi)
310 movq %rcx,8(%rdi)
311 movq %rdx,16(%rdi)
312 movq %rbx,24(%rdi)
313 movq %r10,32(%rdi)
314
315 movq 40(%rsp),%r15
316
317 movq 48(%rsp),%r14
318
319 movq 56(%rsp),%r13
320
321 movq 64(%rsp),%r12
322
323 movq 72(%rsp),%rbx
324
325 movq 80(%rsp),%rbp
326
327 leaq 88(%rsp),%rsp
328
329L$fe51_sqr_epilogue:
330 .byte 0xf3,0xc3
331
332
333
334.globl _x25519_fe51_mul121666
335
336.p2align 5
337_x25519_fe51_mul121666:
338
339 pushq %rbp
340
341 pushq %rbx
342
343 pushq %r12
344
345 pushq %r13
346
347 pushq %r14
348
349 pushq %r15
350
351 leaq -40(%rsp),%rsp
352
353L$fe51_mul121666_body:
354 movl $121666,%eax
355
356 mulq 0(%rsi)
357 movq %rax,%rbx
358 movl $121666,%eax
359 movq %rdx,%rcx
360 mulq 8(%rsi)
361 movq %rax,%r8
362 movl $121666,%eax
363 movq %rdx,%r9
364 mulq 16(%rsi)
365 movq %rax,%r10
366 movl $121666,%eax
367 movq %rdx,%r11
368 mulq 24(%rsi)
369 movq %rax,%r12
370 movl $121666,%eax
371 movq %rdx,%r13
372 mulq 32(%rsi)
373 movq %rax,%r14
374 movq %rdx,%r15
375
376 jmp L$reduce51
377L$fe51_mul121666_epilogue:
378
379
380.globl _x25519_fe64_eligible
381
382.p2align 5
383_x25519_fe64_eligible:
384 xorl %eax,%eax
385 .byte 0xf3,0xc3
386
387
388.globl _x25519_fe64_mul
389
390.globl _x25519_fe64_sqr
391.globl _x25519_fe64_mul121666
392.globl _x25519_fe64_add
393.globl _x25519_fe64_sub
394.globl _x25519_fe64_tobytes
395_x25519_fe64_mul:
396_x25519_fe64_sqr:
397_x25519_fe64_mul121666:
398_x25519_fe64_add:
399_x25519_fe64_sub:
400_x25519_fe64_tobytes:
401.byte 0x0f,0x0b
402 .byte 0xf3,0xc3
403
404.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
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette