source:
vbox/trunk/src/libs/openssl-1.1.1f/crypto/genasm-elf/keccak1600-x86_64.S@
83531
Last change on this file since 83531 was 83531, checked in by , 5 years ago | |
---|---|
File size: 8.2 KB |
Line | |
---|---|
1 | .text |
2 | |
3 | .type __KeccakF1600,@function |
4 | .align 32 |
5 | __KeccakF1600: |
6 | movq 60(%rdi),%rax |
7 | movq 68(%rdi),%rbx |
8 | movq 76(%rdi),%rcx |
9 | movq 84(%rdi),%rdx |
10 | movq 92(%rdi),%rbp |
11 | jmp .Loop |
12 | |
13 | .align 32 |
14 | .Loop: |
15 | movq -100(%rdi),%r8 |
16 | movq -52(%rdi),%r9 |
17 | movq -4(%rdi),%r10 |
18 | movq 44(%rdi),%r11 |
19 | |
20 | xorq -84(%rdi),%rcx |
21 | xorq -76(%rdi),%rdx |
22 | xorq %r8,%rax |
23 | xorq -92(%rdi),%rbx |
24 | xorq -44(%rdi),%rcx |
25 | xorq -60(%rdi),%rax |
26 | movq %rbp,%r12 |
27 | xorq -68(%rdi),%rbp |
28 | |
29 | xorq %r10,%rcx |
30 | xorq -20(%rdi),%rax |
31 | xorq -36(%rdi),%rdx |
32 | xorq %r9,%rbx |
33 | xorq -28(%rdi),%rbp |
34 | |
35 | xorq 36(%rdi),%rcx |
36 | xorq 20(%rdi),%rax |
37 | xorq 4(%rdi),%rdx |
38 | xorq -12(%rdi),%rbx |
39 | xorq 12(%rdi),%rbp |
40 | |
41 | movq %rcx,%r13 |
42 | rolq $1,%rcx |
43 | xorq %rax,%rcx |
44 | xorq %r11,%rdx |
45 | |
46 | rolq $1,%rax |
47 | xorq %rdx,%rax |
48 | xorq 28(%rdi),%rbx |
49 | |
50 | rolq $1,%rdx |
51 | xorq %rbx,%rdx |
52 | xorq 52(%rdi),%rbp |
53 | |
54 | rolq $1,%rbx |
55 | xorq %rbp,%rbx |
56 | |
57 | rolq $1,%rbp |
58 | xorq %r13,%rbp |
59 | xorq %rcx,%r9 |
60 | xorq %rdx,%r10 |
61 | rolq $44,%r9 |
62 | xorq %rbp,%r11 |
63 | xorq %rax,%r12 |
64 | rolq $43,%r10 |
65 | xorq %rbx,%r8 |
66 | movq %r9,%r13 |
67 | rolq $21,%r11 |
68 | orq %r10,%r9 |
69 | xorq %r8,%r9 |
70 | rolq $14,%r12 |
71 | |
72 | xorq (%r15),%r9 |
73 | leaq 8(%r15),%r15 |
74 | |
75 | movq %r12,%r14 |
76 | andq %r11,%r12 |
77 | movq %r9,-100(%rsi) |
78 | xorq %r10,%r12 |
79 | notq %r10 |
80 | movq %r12,-84(%rsi) |
81 | |
82 | orq %r11,%r10 |
83 | movq 76(%rdi),%r12 |
84 | xorq %r13,%r10 |
85 | movq %r10,-92(%rsi) |
86 | |
87 | andq %r8,%r13 |
88 | movq -28(%rdi),%r9 |
89 | xorq %r14,%r13 |
90 | movq -20(%rdi),%r10 |
91 | movq %r13,-68(%rsi) |
92 | |
93 | orq %r8,%r14 |
94 | movq -76(%rdi),%r8 |
95 | xorq %r11,%r14 |
96 | movq 28(%rdi),%r11 |
97 | movq %r14,-76(%rsi) |
98 | |
99 | |
100 | xorq %rbp,%r8 |
101 | xorq %rdx,%r12 |
102 | rolq $28,%r8 |
103 | xorq %rcx,%r11 |
104 | xorq %rax,%r9 |
105 | rolq $61,%r12 |
106 | rolq $45,%r11 |
107 | xorq %rbx,%r10 |
108 | rolq $20,%r9 |
109 | movq %r8,%r13 |
110 | orq %r12,%r8 |
111 | rolq $3,%r10 |
112 | |
113 | xorq %r11,%r8 |
114 | movq %r8,-36(%rsi) |
115 | |
116 | movq %r9,%r14 |
117 | andq %r13,%r9 |
118 | movq -92(%rdi),%r8 |
119 | xorq %r12,%r9 |
120 | notq %r12 |
121 | movq %r9,-28(%rsi) |
122 | |
123 | orq %r11,%r12 |
124 | movq -44(%rdi),%r9 |
125 | xorq %r10,%r12 |
126 | movq %r12,-44(%rsi) |
127 | |
128 | andq %r10,%r11 |
129 | movq 60(%rdi),%r12 |
130 | xorq %r14,%r11 |
131 | movq %r11,-52(%rsi) |
132 | |
133 | orq %r10,%r14 |
134 | movq 4(%rdi),%r10 |
135 | xorq %r13,%r14 |
136 | movq 52(%rdi),%r11 |
137 | movq %r14,-60(%rsi) |
138 | |
139 | |
140 | xorq %rbp,%r10 |
141 | xorq %rax,%r11 |
142 | rolq $25,%r10 |
143 | xorq %rdx,%r9 |
144 | rolq $8,%r11 |
145 | xorq %rbx,%r12 |
146 | rolq $6,%r9 |
147 | xorq %rcx,%r8 |
148 | rolq $18,%r12 |
149 | movq %r10,%r13 |
150 | andq %r11,%r10 |
151 | rolq $1,%r8 |
152 | |
153 | notq %r11 |
154 | xorq %r9,%r10 |
155 | movq %r10,-12(%rsi) |
156 | |
157 | movq %r12,%r14 |
158 | andq %r11,%r12 |
159 | movq -12(%rdi),%r10 |
160 | xorq %r13,%r12 |
161 | movq %r12,-4(%rsi) |
162 | |
163 | orq %r9,%r13 |
164 | movq 84(%rdi),%r12 |
165 | xorq %r8,%r13 |
166 | movq %r13,-20(%rsi) |
167 | |
168 | andq %r8,%r9 |
169 | xorq %r14,%r9 |
170 | movq %r9,12(%rsi) |
171 | |
172 | orq %r8,%r14 |
173 | movq -60(%rdi),%r9 |
174 | xorq %r11,%r14 |
175 | movq 36(%rdi),%r11 |
176 | movq %r14,4(%rsi) |
177 | |
178 | |
179 | movq -68(%rdi),%r8 |
180 | |
181 | xorq %rcx,%r10 |
182 | xorq %rdx,%r11 |
183 | rolq $10,%r10 |
184 | xorq %rbx,%r9 |
185 | rolq $15,%r11 |
186 | xorq %rbp,%r12 |
187 | rolq $36,%r9 |
188 | xorq %rax,%r8 |
189 | rolq $56,%r12 |
190 | movq %r10,%r13 |
191 | orq %r11,%r10 |
192 | rolq $27,%r8 |
193 | |
194 | notq %r11 |
195 | xorq %r9,%r10 |
196 | movq %r10,28(%rsi) |
197 | |
198 | movq %r12,%r14 |
199 | orq %r11,%r12 |
200 | xorq %r13,%r12 |
201 | movq %r12,36(%rsi) |
202 | |
203 | andq %r9,%r13 |
204 | xorq %r8,%r13 |
205 | movq %r13,20(%rsi) |
206 | |
207 | orq %r8,%r9 |
208 | xorq %r14,%r9 |
209 | movq %r9,52(%rsi) |
210 | |
211 | andq %r14,%r8 |
212 | xorq %r11,%r8 |
213 | movq %r8,44(%rsi) |
214 | |
215 | |
216 | xorq -84(%rdi),%rdx |
217 | xorq -36(%rdi),%rbp |
218 | rolq $62,%rdx |
219 | xorq 68(%rdi),%rcx |
220 | rolq $55,%rbp |
221 | xorq 12(%rdi),%rax |
222 | rolq $2,%rcx |
223 | xorq 20(%rdi),%rbx |
224 | xchgq %rsi,%rdi |
225 | rolq $39,%rax |
226 | rolq $41,%rbx |
227 | movq %rdx,%r13 |
228 | andq %rbp,%rdx |
229 | notq %rbp |
230 | xorq %rcx,%rdx |
231 | movq %rdx,92(%rdi) |
232 | |
233 | movq %rax,%r14 |
234 | andq %rbp,%rax |
235 | xorq %r13,%rax |
236 | movq %rax,60(%rdi) |
237 | |
238 | orq %rcx,%r13 |
239 | xorq %rbx,%r13 |
240 | movq %r13,84(%rdi) |
241 | |
242 | andq %rbx,%rcx |
243 | xorq %r14,%rcx |
244 | movq %rcx,76(%rdi) |
245 | |
246 | orq %r14,%rbx |
247 | xorq %rbp,%rbx |
248 | movq %rbx,68(%rdi) |
249 | |
250 | movq %rdx,%rbp |
251 | movq %r13,%rdx |
252 | |
253 | testq $255,%r15 |
254 | jnz .Loop |
255 | |
256 | leaq -192(%r15),%r15 |
257 | .byte 0xf3,0xc3 |
258 | .size __KeccakF1600,.-__KeccakF1600 |
259 | |
260 | .type KeccakF1600,@function |
261 | .align 32 |
262 | KeccakF1600: |
263 | .cfi_startproc |
264 | pushq %rbx |
265 | .cfi_adjust_cfa_offset 8 |
266 | .cfi_offset %rbx,-16 |
267 | pushq %rbp |
268 | .cfi_adjust_cfa_offset 8 |
269 | .cfi_offset %rbp,-24 |
270 | pushq %r12 |
271 | .cfi_adjust_cfa_offset 8 |
272 | .cfi_offset %r12,-32 |
273 | pushq %r13 |
274 | .cfi_adjust_cfa_offset 8 |
275 | .cfi_offset %r13,-40 |
276 | pushq %r14 |
277 | .cfi_adjust_cfa_offset 8 |
278 | .cfi_offset %r14,-48 |
279 | pushq %r15 |
280 | .cfi_adjust_cfa_offset 8 |
281 | .cfi_offset %r15,-56 |
282 | |
283 | leaq 100(%rdi),%rdi |
284 | subq $200,%rsp |
285 | .cfi_adjust_cfa_offset 200 |
286 | |
287 | notq -92(%rdi) |
288 | notq -84(%rdi) |
289 | notq -36(%rdi) |
290 | notq -4(%rdi) |
291 | notq 36(%rdi) |
292 | notq 60(%rdi) |
293 | |
294 | leaq iotas(%rip),%r15 |
295 | leaq 100(%rsp),%rsi |
296 | |
297 | call __KeccakF1600 |
298 | |
299 | notq -92(%rdi) |
300 | notq -84(%rdi) |
301 | notq -36(%rdi) |
302 | notq -4(%rdi) |
303 | notq 36(%rdi) |
304 | notq 60(%rdi) |
305 | leaq -100(%rdi),%rdi |
306 | |
307 | addq $200,%rsp |
308 | .cfi_adjust_cfa_offset -200 |
309 | |
310 | popq %r15 |
311 | .cfi_adjust_cfa_offset -8 |
312 | .cfi_restore %r15 |
313 | popq %r14 |
314 | .cfi_adjust_cfa_offset -8 |
315 | .cfi_restore %r14 |
316 | popq %r13 |
317 | .cfi_adjust_cfa_offset -8 |
318 | .cfi_restore %r13 |
319 | popq %r12 |
320 | .cfi_adjust_cfa_offset -8 |
321 | .cfi_restore %r12 |
322 | popq %rbp |
323 | .cfi_adjust_cfa_offset -8 |
324 | .cfi_restore %rbp |
325 | popq %rbx |
326 | .cfi_adjust_cfa_offset -8 |
327 | .cfi_restore %rbx |
328 | .byte 0xf3,0xc3 |
329 | .cfi_endproc |
330 | .size KeccakF1600,.-KeccakF1600 |
331 | .globl SHA3_absorb |
332 | .type SHA3_absorb,@function |
333 | .align 32 |
334 | SHA3_absorb: |
335 | .cfi_startproc |
336 | pushq %rbx |
337 | .cfi_adjust_cfa_offset 8 |
338 | .cfi_offset %rbx,-16 |
339 | pushq %rbp |
340 | .cfi_adjust_cfa_offset 8 |
341 | .cfi_offset %rbp,-24 |
342 | pushq %r12 |
343 | .cfi_adjust_cfa_offset 8 |
344 | .cfi_offset %r12,-32 |
345 | pushq %r13 |
346 | .cfi_adjust_cfa_offset 8 |
347 | .cfi_offset %r13,-40 |
348 | pushq %r14 |
349 | .cfi_adjust_cfa_offset 8 |
350 | .cfi_offset %r14,-48 |
351 | pushq %r15 |
352 | .cfi_adjust_cfa_offset 8 |
353 | .cfi_offset %r15,-56 |
354 | |
355 | leaq 100(%rdi),%rdi |
356 | subq $232,%rsp |
357 | .cfi_adjust_cfa_offset 232 |
358 | |
359 | movq %rsi,%r9 |
360 | leaq 100(%rsp),%rsi |
361 | |
362 | notq -92(%rdi) |
363 | notq -84(%rdi) |
364 | notq -36(%rdi) |
365 | notq -4(%rdi) |
366 | notq 36(%rdi) |
367 | notq 60(%rdi) |
368 | leaq iotas(%rip),%r15 |
369 | |
370 | movq %rcx,216-100(%rsi) |
371 | |
372 | .Loop_absorb: |
373 | cmpq %rcx,%rdx |
374 | jc .Ldone_absorb |
375 | |
376 | shrq $3,%rcx |
377 | leaq -100(%rdi),%r8 |
378 | |
379 | .Lblock_absorb: |
380 | movq (%r9),%rax |
381 | leaq 8(%r9),%r9 |
382 | xorq (%r8),%rax |
383 | leaq 8(%r8),%r8 |
384 | subq $8,%rdx |
385 | movq %rax,-8(%r8) |
386 | subq $1,%rcx |
387 | jnz .Lblock_absorb |
388 | |
389 | movq %r9,200-100(%rsi) |
390 | movq %rdx,208-100(%rsi) |
391 | call __KeccakF1600 |
392 | movq 200-100(%rsi),%r9 |
393 | movq 208-100(%rsi),%rdx |
394 | movq 216-100(%rsi),%rcx |
395 | jmp .Loop_absorb |
396 | |
397 | .align 32 |
398 | .Ldone_absorb: |
399 | movq %rdx,%rax |
400 | |
401 | notq -92(%rdi) |
402 | notq -84(%rdi) |
403 | notq -36(%rdi) |
404 | notq -4(%rdi) |
405 | notq 36(%rdi) |
406 | notq 60(%rdi) |
407 | |
408 | addq $232,%rsp |
409 | .cfi_adjust_cfa_offset -232 |
410 | |
411 | popq %r15 |
412 | .cfi_adjust_cfa_offset -8 |
413 | .cfi_restore %r15 |
414 | popq %r14 |
415 | .cfi_adjust_cfa_offset -8 |
416 | .cfi_restore %r14 |
417 | popq %r13 |
418 | .cfi_adjust_cfa_offset -8 |
419 | .cfi_restore %r13 |
420 | popq %r12 |
421 | .cfi_adjust_cfa_offset -8 |
422 | .cfi_restore %r12 |
423 | popq %rbp |
424 | .cfi_adjust_cfa_offset -8 |
425 | .cfi_restore %rbp |
426 | popq %rbx |
427 | .cfi_adjust_cfa_offset -8 |
428 | .cfi_restore %rbx |
429 | .byte 0xf3,0xc3 |
430 | .cfi_endproc |
431 | .size SHA3_absorb,.-SHA3_absorb |
432 | .globl SHA3_squeeze |
433 | .type SHA3_squeeze,@function |
434 | .align 32 |
435 | SHA3_squeeze: |
436 | .cfi_startproc |
437 | pushq %r12 |
438 | .cfi_adjust_cfa_offset 8 |
439 | .cfi_offset %r12,-16 |
440 | pushq %r13 |
441 | .cfi_adjust_cfa_offset 8 |
442 | .cfi_offset %r13,-24 |
443 | pushq %r14 |
444 | .cfi_adjust_cfa_offset 8 |
445 | .cfi_offset %r14,-32 |
446 | |
447 | shrq $3,%rcx |
448 | movq %rdi,%r8 |
449 | movq %rsi,%r12 |
450 | movq %rdx,%r13 |
451 | movq %rcx,%r14 |
452 | jmp .Loop_squeeze |
453 | |
454 | .align 32 |
455 | .Loop_squeeze: |
456 | cmpq $8,%r13 |
457 | jb .Ltail_squeeze |
458 | |
459 | movq (%r8),%rax |
460 | leaq 8(%r8),%r8 |
461 | movq %rax,(%r12) |
462 | leaq 8(%r12),%r12 |
463 | subq $8,%r13 |
464 | jz .Ldone_squeeze |
465 | |
466 | subq $1,%rcx |
467 | jnz .Loop_squeeze |
468 | |
469 | call KeccakF1600 |
470 | movq %rdi,%r8 |
471 | movq %r14,%rcx |
472 | jmp .Loop_squeeze |
473 | |
474 | .Ltail_squeeze: |
475 | movq %r8,%rsi |
476 | movq %r12,%rdi |
477 | movq %r13,%rcx |
478 | .byte 0xf3,0xa4 |
479 | |
480 | .Ldone_squeeze: |
481 | popq %r14 |
482 | .cfi_adjust_cfa_offset -8 |
483 | .cfi_restore %r14 |
484 | popq %r13 |
485 | .cfi_adjust_cfa_offset -8 |
486 | .cfi_restore %r13 |
487 | popq %r12 |
488 | .cfi_adjust_cfa_offset -8 |
489 | .cfi_restore %r13 |
490 | .byte 0xf3,0xc3 |
491 | .cfi_endproc |
492 | .size SHA3_squeeze,.-SHA3_squeeze |
493 | .align 256 |
494 | .quad 0,0,0,0,0,0,0,0 |
495 | .type iotas,@object |
496 | iotas: |
497 | .quad 0x0000000000000001 |
498 | .quad 0x0000000000008082 |
499 | .quad 0x800000000000808a |
500 | .quad 0x8000000080008000 |
501 | .quad 0x000000000000808b |
502 | .quad 0x0000000080000001 |
503 | .quad 0x8000000080008081 |
504 | .quad 0x8000000000008009 |
505 | .quad 0x000000000000008a |
506 | .quad 0x0000000000000088 |
507 | .quad 0x0000000080008009 |
508 | .quad 0x000000008000000a |
509 | .quad 0x000000008000808b |
510 | .quad 0x800000000000008b |
511 | .quad 0x8000000000008089 |
512 | .quad 0x8000000000008003 |
513 | .quad 0x8000000000008002 |
514 | .quad 0x8000000000000080 |
515 | .quad 0x000000000000800a |
516 | .quad 0x800000008000000a |
517 | .quad 0x8000000080008081 |
518 | .quad 0x8000000000008080 |
519 | .quad 0x0000000080000001 |
520 | .quad 0x8000000080008008 |
521 | .size iotas,.-iotas |
522 | .byte 75,101,99,99,97,107,45,49,54,48,48,32,97,98,115,111,114,98,32,97,110,100,32,115,113,117,101,101,122,101,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 |
Note:
See TracBrowser
for help on using the repository browser.