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