VirtualBox

source: vbox/trunk/src/libs/openssl-1.1.1j/crypto/genasm-nasm/md5-x86_64.S@ 88461

Last change on this file since 88461 was 83531, checked in by vboxsync, 5 years ago

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

File size: 12.5 KB
Line 
1default rel
2%define XMMWORD
3%define YMMWORD
4%define ZMMWORD
5section .text code align=64
6
7ALIGN 16
8
9global md5_block_asm_data_order
10
11md5_block_asm_data_order:
12 mov QWORD[8+rsp],rdi ;WIN64 prologue
13 mov QWORD[16+rsp],rsi
14 mov rax,rsp
15$L$SEH_begin_md5_block_asm_data_order:
16 mov rdi,rcx
17 mov rsi,rdx
18 mov rdx,r8
19
20
21
22 push rbp
23
24 push rbx
25
26 push r12
27
28 push r14
29
30 push r15
31
32$L$prologue:
33
34
35
36
37 mov rbp,rdi
38 shl rdx,6
39 lea rdi,[rdx*1+rsi]
40 mov eax,DWORD[rbp]
41 mov ebx,DWORD[4+rbp]
42 mov ecx,DWORD[8+rbp]
43 mov edx,DWORD[12+rbp]
44
45
46
47
48
49
50
51 cmp rsi,rdi
52 je NEAR $L$end
53
54
55$L$loop:
56 mov r8d,eax
57 mov r9d,ebx
58 mov r14d,ecx
59 mov r15d,edx
60 mov r10d,DWORD[rsi]
61 mov r11d,edx
62 xor r11d,ecx
63 lea eax,[((-680876936))+r10*1+rax]
64 and r11d,ebx
65 mov r10d,DWORD[4+rsi]
66 xor r11d,edx
67 add eax,r11d
68 rol eax,7
69 mov r11d,ecx
70 add eax,ebx
71 xor r11d,ebx
72 lea edx,[((-389564586))+r10*1+rdx]
73 and r11d,eax
74 mov r10d,DWORD[8+rsi]
75 xor r11d,ecx
76 add edx,r11d
77 rol edx,12
78 mov r11d,ebx
79 add edx,eax
80 xor r11d,eax
81 lea ecx,[606105819+r10*1+rcx]
82 and r11d,edx
83 mov r10d,DWORD[12+rsi]
84 xor r11d,ebx
85 add ecx,r11d
86 rol ecx,17
87 mov r11d,eax
88 add ecx,edx
89 xor r11d,edx
90 lea ebx,[((-1044525330))+r10*1+rbx]
91 and r11d,ecx
92 mov r10d,DWORD[16+rsi]
93 xor r11d,eax
94 add ebx,r11d
95 rol ebx,22
96 mov r11d,edx
97 add ebx,ecx
98 xor r11d,ecx
99 lea eax,[((-176418897))+r10*1+rax]
100 and r11d,ebx
101 mov r10d,DWORD[20+rsi]
102 xor r11d,edx
103 add eax,r11d
104 rol eax,7
105 mov r11d,ecx
106 add eax,ebx
107 xor r11d,ebx
108 lea edx,[1200080426+r10*1+rdx]
109 and r11d,eax
110 mov r10d,DWORD[24+rsi]
111 xor r11d,ecx
112 add edx,r11d
113 rol edx,12
114 mov r11d,ebx
115 add edx,eax
116 xor r11d,eax
117 lea ecx,[((-1473231341))+r10*1+rcx]
118 and r11d,edx
119 mov r10d,DWORD[28+rsi]
120 xor r11d,ebx
121 add ecx,r11d
122 rol ecx,17
123 mov r11d,eax
124 add ecx,edx
125 xor r11d,edx
126 lea ebx,[((-45705983))+r10*1+rbx]
127 and r11d,ecx
128 mov r10d,DWORD[32+rsi]
129 xor r11d,eax
130 add ebx,r11d
131 rol ebx,22
132 mov r11d,edx
133 add ebx,ecx
134 xor r11d,ecx
135 lea eax,[1770035416+r10*1+rax]
136 and r11d,ebx
137 mov r10d,DWORD[36+rsi]
138 xor r11d,edx
139 add eax,r11d
140 rol eax,7
141 mov r11d,ecx
142 add eax,ebx
143 xor r11d,ebx
144 lea edx,[((-1958414417))+r10*1+rdx]
145 and r11d,eax
146 mov r10d,DWORD[40+rsi]
147 xor r11d,ecx
148 add edx,r11d
149 rol edx,12
150 mov r11d,ebx
151 add edx,eax
152 xor r11d,eax
153 lea ecx,[((-42063))+r10*1+rcx]
154 and r11d,edx
155 mov r10d,DWORD[44+rsi]
156 xor r11d,ebx
157 add ecx,r11d
158 rol ecx,17
159 mov r11d,eax
160 add ecx,edx
161 xor r11d,edx
162 lea ebx,[((-1990404162))+r10*1+rbx]
163 and r11d,ecx
164 mov r10d,DWORD[48+rsi]
165 xor r11d,eax
166 add ebx,r11d
167 rol ebx,22
168 mov r11d,edx
169 add ebx,ecx
170 xor r11d,ecx
171 lea eax,[1804603682+r10*1+rax]
172 and r11d,ebx
173 mov r10d,DWORD[52+rsi]
174 xor r11d,edx
175 add eax,r11d
176 rol eax,7
177 mov r11d,ecx
178 add eax,ebx
179 xor r11d,ebx
180 lea edx,[((-40341101))+r10*1+rdx]
181 and r11d,eax
182 mov r10d,DWORD[56+rsi]
183 xor r11d,ecx
184 add edx,r11d
185 rol edx,12
186 mov r11d,ebx
187 add edx,eax
188 xor r11d,eax
189 lea ecx,[((-1502002290))+r10*1+rcx]
190 and r11d,edx
191 mov r10d,DWORD[60+rsi]
192 xor r11d,ebx
193 add ecx,r11d
194 rol ecx,17
195 mov r11d,eax
196 add ecx,edx
197 xor r11d,edx
198 lea ebx,[1236535329+r10*1+rbx]
199 and r11d,ecx
200 mov r10d,DWORD[4+rsi]
201 xor r11d,eax
202 add ebx,r11d
203 rol ebx,22
204 mov r11d,edx
205 add ebx,ecx
206 mov r11d,edx
207 mov r12d,edx
208 not r11d
209 and r12d,ebx
210 lea eax,[((-165796510))+r10*1+rax]
211 and r11d,ecx
212 mov r10d,DWORD[24+rsi]
213 or r12d,r11d
214 mov r11d,ecx
215 add eax,r12d
216 mov r12d,ecx
217 rol eax,5
218 add eax,ebx
219 not r11d
220 and r12d,eax
221 lea edx,[((-1069501632))+r10*1+rdx]
222 and r11d,ebx
223 mov r10d,DWORD[44+rsi]
224 or r12d,r11d
225 mov r11d,ebx
226 add edx,r12d
227 mov r12d,ebx
228 rol edx,9
229 add edx,eax
230 not r11d
231 and r12d,edx
232 lea ecx,[643717713+r10*1+rcx]
233 and r11d,eax
234 mov r10d,DWORD[rsi]
235 or r12d,r11d
236 mov r11d,eax
237 add ecx,r12d
238 mov r12d,eax
239 rol ecx,14
240 add ecx,edx
241 not r11d
242 and r12d,ecx
243 lea ebx,[((-373897302))+r10*1+rbx]
244 and r11d,edx
245 mov r10d,DWORD[20+rsi]
246 or r12d,r11d
247 mov r11d,edx
248 add ebx,r12d
249 mov r12d,edx
250 rol ebx,20
251 add ebx,ecx
252 not r11d
253 and r12d,ebx
254 lea eax,[((-701558691))+r10*1+rax]
255 and r11d,ecx
256 mov r10d,DWORD[40+rsi]
257 or r12d,r11d
258 mov r11d,ecx
259 add eax,r12d
260 mov r12d,ecx
261 rol eax,5
262 add eax,ebx
263 not r11d
264 and r12d,eax
265 lea edx,[38016083+r10*1+rdx]
266 and r11d,ebx
267 mov r10d,DWORD[60+rsi]
268 or r12d,r11d
269 mov r11d,ebx
270 add edx,r12d
271 mov r12d,ebx
272 rol edx,9
273 add edx,eax
274 not r11d
275 and r12d,edx
276 lea ecx,[((-660478335))+r10*1+rcx]
277 and r11d,eax
278 mov r10d,DWORD[16+rsi]
279 or r12d,r11d
280 mov r11d,eax
281 add ecx,r12d
282 mov r12d,eax
283 rol ecx,14
284 add ecx,edx
285 not r11d
286 and r12d,ecx
287 lea ebx,[((-405537848))+r10*1+rbx]
288 and r11d,edx
289 mov r10d,DWORD[36+rsi]
290 or r12d,r11d
291 mov r11d,edx
292 add ebx,r12d
293 mov r12d,edx
294 rol ebx,20
295 add ebx,ecx
296 not r11d
297 and r12d,ebx
298 lea eax,[568446438+r10*1+rax]
299 and r11d,ecx
300 mov r10d,DWORD[56+rsi]
301 or r12d,r11d
302 mov r11d,ecx
303 add eax,r12d
304 mov r12d,ecx
305 rol eax,5
306 add eax,ebx
307 not r11d
308 and r12d,eax
309 lea edx,[((-1019803690))+r10*1+rdx]
310 and r11d,ebx
311 mov r10d,DWORD[12+rsi]
312 or r12d,r11d
313 mov r11d,ebx
314 add edx,r12d
315 mov r12d,ebx
316 rol edx,9
317 add edx,eax
318 not r11d
319 and r12d,edx
320 lea ecx,[((-187363961))+r10*1+rcx]
321 and r11d,eax
322 mov r10d,DWORD[32+rsi]
323 or r12d,r11d
324 mov r11d,eax
325 add ecx,r12d
326 mov r12d,eax
327 rol ecx,14
328 add ecx,edx
329 not r11d
330 and r12d,ecx
331 lea ebx,[1163531501+r10*1+rbx]
332 and r11d,edx
333 mov r10d,DWORD[52+rsi]
334 or r12d,r11d
335 mov r11d,edx
336 add ebx,r12d
337 mov r12d,edx
338 rol ebx,20
339 add ebx,ecx
340 not r11d
341 and r12d,ebx
342 lea eax,[((-1444681467))+r10*1+rax]
343 and r11d,ecx
344 mov r10d,DWORD[8+rsi]
345 or r12d,r11d
346 mov r11d,ecx
347 add eax,r12d
348 mov r12d,ecx
349 rol eax,5
350 add eax,ebx
351 not r11d
352 and r12d,eax
353 lea edx,[((-51403784))+r10*1+rdx]
354 and r11d,ebx
355 mov r10d,DWORD[28+rsi]
356 or r12d,r11d
357 mov r11d,ebx
358 add edx,r12d
359 mov r12d,ebx
360 rol edx,9
361 add edx,eax
362 not r11d
363 and r12d,edx
364 lea ecx,[1735328473+r10*1+rcx]
365 and r11d,eax
366 mov r10d,DWORD[48+rsi]
367 or r12d,r11d
368 mov r11d,eax
369 add ecx,r12d
370 mov r12d,eax
371 rol ecx,14
372 add ecx,edx
373 not r11d
374 and r12d,ecx
375 lea ebx,[((-1926607734))+r10*1+rbx]
376 and r11d,edx
377 mov r10d,DWORD[20+rsi]
378 or r12d,r11d
379 mov r11d,edx
380 add ebx,r12d
381 mov r12d,edx
382 rol ebx,20
383 add ebx,ecx
384 mov r11d,ecx
385 lea eax,[((-378558))+r10*1+rax]
386 xor r11d,edx
387 mov r10d,DWORD[32+rsi]
388 xor r11d,ebx
389 add eax,r11d
390 mov r11d,ebx
391 rol eax,4
392 add eax,ebx
393 lea edx,[((-2022574463))+r10*1+rdx]
394 xor r11d,ecx
395 mov r10d,DWORD[44+rsi]
396 xor r11d,eax
397 add edx,r11d
398 rol edx,11
399 mov r11d,eax
400 add edx,eax
401 lea ecx,[1839030562+r10*1+rcx]
402 xor r11d,ebx
403 mov r10d,DWORD[56+rsi]
404 xor r11d,edx
405 add ecx,r11d
406 mov r11d,edx
407 rol ecx,16
408 add ecx,edx
409 lea ebx,[((-35309556))+r10*1+rbx]
410 xor r11d,eax
411 mov r10d,DWORD[4+rsi]
412 xor r11d,ecx
413 add ebx,r11d
414 rol ebx,23
415 mov r11d,ecx
416 add ebx,ecx
417 lea eax,[((-1530992060))+r10*1+rax]
418 xor r11d,edx
419 mov r10d,DWORD[16+rsi]
420 xor r11d,ebx
421 add eax,r11d
422 mov r11d,ebx
423 rol eax,4
424 add eax,ebx
425 lea edx,[1272893353+r10*1+rdx]
426 xor r11d,ecx
427 mov r10d,DWORD[28+rsi]
428 xor r11d,eax
429 add edx,r11d
430 rol edx,11
431 mov r11d,eax
432 add edx,eax
433 lea ecx,[((-155497632))+r10*1+rcx]
434 xor r11d,ebx
435 mov r10d,DWORD[40+rsi]
436 xor r11d,edx
437 add ecx,r11d
438 mov r11d,edx
439 rol ecx,16
440 add ecx,edx
441 lea ebx,[((-1094730640))+r10*1+rbx]
442 xor r11d,eax
443 mov r10d,DWORD[52+rsi]
444 xor r11d,ecx
445 add ebx,r11d
446 rol ebx,23
447 mov r11d,ecx
448 add ebx,ecx
449 lea eax,[681279174+r10*1+rax]
450 xor r11d,edx
451 mov r10d,DWORD[rsi]
452 xor r11d,ebx
453 add eax,r11d
454 mov r11d,ebx
455 rol eax,4
456 add eax,ebx
457 lea edx,[((-358537222))+r10*1+rdx]
458 xor r11d,ecx
459 mov r10d,DWORD[12+rsi]
460 xor r11d,eax
461 add edx,r11d
462 rol edx,11
463 mov r11d,eax
464 add edx,eax
465 lea ecx,[((-722521979))+r10*1+rcx]
466 xor r11d,ebx
467 mov r10d,DWORD[24+rsi]
468 xor r11d,edx
469 add ecx,r11d
470 mov r11d,edx
471 rol ecx,16
472 add ecx,edx
473 lea ebx,[76029189+r10*1+rbx]
474 xor r11d,eax
475 mov r10d,DWORD[36+rsi]
476 xor r11d,ecx
477 add ebx,r11d
478 rol ebx,23
479 mov r11d,ecx
480 add ebx,ecx
481 lea eax,[((-640364487))+r10*1+rax]
482 xor r11d,edx
483 mov r10d,DWORD[48+rsi]
484 xor r11d,ebx
485 add eax,r11d
486 mov r11d,ebx
487 rol eax,4
488 add eax,ebx
489 lea edx,[((-421815835))+r10*1+rdx]
490 xor r11d,ecx
491 mov r10d,DWORD[60+rsi]
492 xor r11d,eax
493 add edx,r11d
494 rol edx,11
495 mov r11d,eax
496 add edx,eax
497 lea ecx,[530742520+r10*1+rcx]
498 xor r11d,ebx
499 mov r10d,DWORD[8+rsi]
500 xor r11d,edx
501 add ecx,r11d
502 mov r11d,edx
503 rol ecx,16
504 add ecx,edx
505 lea ebx,[((-995338651))+r10*1+rbx]
506 xor r11d,eax
507 mov r10d,DWORD[rsi]
508 xor r11d,ecx
509 add ebx,r11d
510 rol ebx,23
511 mov r11d,ecx
512 add ebx,ecx
513 mov r11d,0xffffffff
514 xor r11d,edx
515 lea eax,[((-198630844))+r10*1+rax]
516 or r11d,ebx
517 mov r10d,DWORD[28+rsi]
518 xor r11d,ecx
519 add eax,r11d
520 mov r11d,0xffffffff
521 rol eax,6
522 xor r11d,ecx
523 add eax,ebx
524 lea edx,[1126891415+r10*1+rdx]
525 or r11d,eax
526 mov r10d,DWORD[56+rsi]
527 xor r11d,ebx
528 add edx,r11d
529 mov r11d,0xffffffff
530 rol edx,10
531 xor r11d,ebx
532 add edx,eax
533 lea ecx,[((-1416354905))+r10*1+rcx]
534 or r11d,edx
535 mov r10d,DWORD[20+rsi]
536 xor r11d,eax
537 add ecx,r11d
538 mov r11d,0xffffffff
539 rol ecx,15
540 xor r11d,eax
541 add ecx,edx
542 lea ebx,[((-57434055))+r10*1+rbx]
543 or r11d,ecx
544 mov r10d,DWORD[48+rsi]
545 xor r11d,edx
546 add ebx,r11d
547 mov r11d,0xffffffff
548 rol ebx,21
549 xor r11d,edx
550 add ebx,ecx
551 lea eax,[1700485571+r10*1+rax]
552 or r11d,ebx
553 mov r10d,DWORD[12+rsi]
554 xor r11d,ecx
555 add eax,r11d
556 mov r11d,0xffffffff
557 rol eax,6
558 xor r11d,ecx
559 add eax,ebx
560 lea edx,[((-1894986606))+r10*1+rdx]
561 or r11d,eax
562 mov r10d,DWORD[40+rsi]
563 xor r11d,ebx
564 add edx,r11d
565 mov r11d,0xffffffff
566 rol edx,10
567 xor r11d,ebx
568 add edx,eax
569 lea ecx,[((-1051523))+r10*1+rcx]
570 or r11d,edx
571 mov r10d,DWORD[4+rsi]
572 xor r11d,eax
573 add ecx,r11d
574 mov r11d,0xffffffff
575 rol ecx,15
576 xor r11d,eax
577 add ecx,edx
578 lea ebx,[((-2054922799))+r10*1+rbx]
579 or r11d,ecx
580 mov r10d,DWORD[32+rsi]
581 xor r11d,edx
582 add ebx,r11d
583 mov r11d,0xffffffff
584 rol ebx,21
585 xor r11d,edx
586 add ebx,ecx
587 lea eax,[1873313359+r10*1+rax]
588 or r11d,ebx
589 mov r10d,DWORD[60+rsi]
590 xor r11d,ecx
591 add eax,r11d
592 mov r11d,0xffffffff
593 rol eax,6
594 xor r11d,ecx
595 add eax,ebx
596 lea edx,[((-30611744))+r10*1+rdx]
597 or r11d,eax
598 mov r10d,DWORD[24+rsi]
599 xor r11d,ebx
600 add edx,r11d
601 mov r11d,0xffffffff
602 rol edx,10
603 xor r11d,ebx
604 add edx,eax
605 lea ecx,[((-1560198380))+r10*1+rcx]
606 or r11d,edx
607 mov r10d,DWORD[52+rsi]
608 xor r11d,eax
609 add ecx,r11d
610 mov r11d,0xffffffff
611 rol ecx,15
612 xor r11d,eax
613 add ecx,edx
614 lea ebx,[1309151649+r10*1+rbx]
615 or r11d,ecx
616 mov r10d,DWORD[16+rsi]
617 xor r11d,edx
618 add ebx,r11d
619 mov r11d,0xffffffff
620 rol ebx,21
621 xor r11d,edx
622 add ebx,ecx
623 lea eax,[((-145523070))+r10*1+rax]
624 or r11d,ebx
625 mov r10d,DWORD[44+rsi]
626 xor r11d,ecx
627 add eax,r11d
628 mov r11d,0xffffffff
629 rol eax,6
630 xor r11d,ecx
631 add eax,ebx
632 lea edx,[((-1120210379))+r10*1+rdx]
633 or r11d,eax
634 mov r10d,DWORD[8+rsi]
635 xor r11d,ebx
636 add edx,r11d
637 mov r11d,0xffffffff
638 rol edx,10
639 xor r11d,ebx
640 add edx,eax
641 lea ecx,[718787259+r10*1+rcx]
642 or r11d,edx
643 mov r10d,DWORD[36+rsi]
644 xor r11d,eax
645 add ecx,r11d
646 mov r11d,0xffffffff
647 rol ecx,15
648 xor r11d,eax
649 add ecx,edx
650 lea ebx,[((-343485551))+r10*1+rbx]
651 or r11d,ecx
652 mov r10d,DWORD[rsi]
653 xor r11d,edx
654 add ebx,r11d
655 mov r11d,0xffffffff
656 rol ebx,21
657 xor r11d,edx
658 add ebx,ecx
659
660 add eax,r8d
661 add ebx,r9d
662 add ecx,r14d
663 add edx,r15d
664
665
666 add rsi,64
667 cmp rsi,rdi
668 jb NEAR $L$loop
669
670
671$L$end:
672 mov DWORD[rbp],eax
673 mov DWORD[4+rbp],ebx
674 mov DWORD[8+rbp],ecx
675 mov DWORD[12+rbp],edx
676
677 mov r15,QWORD[rsp]
678
679 mov r14,QWORD[8+rsp]
680
681 mov r12,QWORD[16+rsp]
682
683 mov rbx,QWORD[24+rsp]
684
685 mov rbp,QWORD[32+rsp]
686
687 add rsp,40
688
689$L$epilogue:
690 mov rdi,QWORD[8+rsp] ;WIN64 epilogue
691 mov rsi,QWORD[16+rsp]
692 DB 0F3h,0C3h ;repret
693
694$L$SEH_end_md5_block_asm_data_order:
695EXTERN __imp_RtlVirtualUnwind
696
697ALIGN 16
698se_handler:
699 push rsi
700 push rdi
701 push rbx
702 push rbp
703 push r12
704 push r13
705 push r14
706 push r15
707 pushfq
708 sub rsp,64
709
710 mov rax,QWORD[120+r8]
711 mov rbx,QWORD[248+r8]
712
713 lea r10,[$L$prologue]
714 cmp rbx,r10
715 jb NEAR $L$in_prologue
716
717 mov rax,QWORD[152+r8]
718
719 lea r10,[$L$epilogue]
720 cmp rbx,r10
721 jae NEAR $L$in_prologue
722
723 lea rax,[40+rax]
724
725 mov rbp,QWORD[((-8))+rax]
726 mov rbx,QWORD[((-16))+rax]
727 mov r12,QWORD[((-24))+rax]
728 mov r14,QWORD[((-32))+rax]
729 mov r15,QWORD[((-40))+rax]
730 mov QWORD[144+r8],rbx
731 mov QWORD[160+r8],rbp
732 mov QWORD[216+r8],r12
733 mov QWORD[232+r8],r14
734 mov QWORD[240+r8],r15
735
736$L$in_prologue:
737 mov rdi,QWORD[8+rax]
738 mov rsi,QWORD[16+rax]
739 mov QWORD[152+r8],rax
740 mov QWORD[168+r8],rsi
741 mov QWORD[176+r8],rdi
742
743 mov rdi,QWORD[40+r9]
744 mov rsi,r8
745 mov ecx,154
746 DD 0xa548f3fc
747
748 mov rsi,r9
749 xor rcx,rcx
750 mov rdx,QWORD[8+rsi]
751 mov r8,QWORD[rsi]
752 mov r9,QWORD[16+rsi]
753 mov r10,QWORD[40+rsi]
754 lea r11,[56+rsi]
755 lea r12,[24+rsi]
756 mov QWORD[32+rsp],r10
757 mov QWORD[40+rsp],r11
758 mov QWORD[48+rsp],r12
759 mov QWORD[56+rsp],rcx
760 call QWORD[__imp_RtlVirtualUnwind]
761
762 mov eax,1
763 add rsp,64
764 popfq
765 pop r15
766 pop r14
767 pop r13
768 pop r12
769 pop rbp
770 pop rbx
771 pop rdi
772 pop rsi
773 DB 0F3h,0C3h ;repret
774
775
776section .pdata rdata align=4
777ALIGN 4
778 DD $L$SEH_begin_md5_block_asm_data_order wrt ..imagebase
779 DD $L$SEH_end_md5_block_asm_data_order wrt ..imagebase
780 DD $L$SEH_info_md5_block_asm_data_order wrt ..imagebase
781
782section .xdata rdata align=8
783ALIGN 8
784$L$SEH_info_md5_block_asm_data_order:
785DB 9,0,0,0
786 DD se_handler wrt ..imagebase
Note: See TracBrowser for help on using the repository browser.

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