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