1.text 2.globl _bn_mul_add_words 3.type _bn_mul_add_words,@function 4.align 4 5_bn_mul_add_words: 6L_bn_mul_add_words_begin: 7 %ifdef __CET__ 8 9.byte 243,15,30,251 10 %endif 11 12 call L000PIC_me_up 13L000PIC_me_up: 14 popl %eax 15 leal __GLOBAL_OFFSET_TABLE_+[.-L000PIC_me_up](%eax),%eax 16 movl _OPENSSL_ia32cap_P@GOT(%eax),%eax 17 btl $26,(%eax) 18 jnc L001maw_non_sse2 19 movl 4(%esp),%eax 20 movl 8(%esp),%edx 21 movl 12(%esp),%ecx 22 movd 16(%esp),%mm0 23 pxor %mm1,%mm1 24 jmp L002maw_sse2_entry 25.align 4,0x90 26L003maw_sse2_unrolled: 27 movd (%eax),%mm3 28 paddq %mm3,%mm1 29 movd (%edx),%mm2 30 pmuludq %mm0,%mm2 31 movd 4(%edx),%mm4 32 pmuludq %mm0,%mm4 33 movd 8(%edx),%mm6 34 pmuludq %mm0,%mm6 35 movd 12(%edx),%mm7 36 pmuludq %mm0,%mm7 37 paddq %mm2,%mm1 38 movd 4(%eax),%mm3 39 paddq %mm4,%mm3 40 movd 8(%eax),%mm5 41 paddq %mm6,%mm5 42 movd 12(%eax),%mm4 43 paddq %mm4,%mm7 44 movd %mm1,(%eax) 45 movd 16(%edx),%mm2 46 pmuludq %mm0,%mm2 47 psrlq $32,%mm1 48 movd 20(%edx),%mm4 49 pmuludq %mm0,%mm4 50 paddq %mm3,%mm1 51 movd 24(%edx),%mm6 52 pmuludq %mm0,%mm6 53 movd %mm1,4(%eax) 54 psrlq $32,%mm1 55 movd 28(%edx),%mm3 56 addl $32,%edx 57 pmuludq %mm0,%mm3 58 paddq %mm5,%mm1 59 movd 16(%eax),%mm5 60 paddq %mm5,%mm2 61 movd %mm1,8(%eax) 62 psrlq $32,%mm1 63 paddq %mm7,%mm1 64 movd 20(%eax),%mm5 65 paddq %mm5,%mm4 66 movd %mm1,12(%eax) 67 psrlq $32,%mm1 68 paddq %mm2,%mm1 69 movd 24(%eax),%mm5 70 paddq %mm5,%mm6 71 movd %mm1,16(%eax) 72 psrlq $32,%mm1 73 paddq %mm4,%mm1 74 movd 28(%eax),%mm5 75 paddq %mm5,%mm3 76 movd %mm1,20(%eax) 77 psrlq $32,%mm1 78 paddq %mm6,%mm1 79 movd %mm1,24(%eax) 80 psrlq $32,%mm1 81 paddq %mm3,%mm1 82 movd %mm1,28(%eax) 83 leal 32(%eax),%eax 84 psrlq $32,%mm1 85 subl $8,%ecx 86 jz L004maw_sse2_exit 87L002maw_sse2_entry: 88 testl $4294967288,%ecx 89 jnz L003maw_sse2_unrolled 90.align 2,0x90 91L005maw_sse2_loop: 92 movd (%edx),%mm2 93 movd (%eax),%mm3 94 pmuludq %mm0,%mm2 95 leal 4(%edx),%edx 96 paddq %mm3,%mm1 97 paddq %mm2,%mm1 98 movd %mm1,(%eax) 99 subl $1,%ecx 100 psrlq $32,%mm1 101 leal 4(%eax),%eax 102 jnz L005maw_sse2_loop 103L004maw_sse2_exit: 104 movd %mm1,%eax 105 emms 106 ret 107.align 4,0x90 108L001maw_non_sse2: 109 pushl %ebp 110 pushl %ebx 111 pushl %esi 112 pushl %edi 113 114 xorl %esi,%esi 115 movl 20(%esp),%edi 116 movl 28(%esp),%ecx 117 movl 24(%esp),%ebx 118 andl $4294967288,%ecx 119 movl 32(%esp),%ebp 120 pushl %ecx 121 jz L006maw_finish 122.align 4,0x90 123L007maw_loop: 124 # Round 0 125 movl (%ebx),%eax 126 mull %ebp 127 addl %esi,%eax 128 adcl $0,%edx 129 addl (%edi),%eax 130 adcl $0,%edx 131 movl %eax,(%edi) 132 movl %edx,%esi 133 # Round 4 134 movl 4(%ebx),%eax 135 mull %ebp 136 addl %esi,%eax 137 adcl $0,%edx 138 addl 4(%edi),%eax 139 adcl $0,%edx 140 movl %eax,4(%edi) 141 movl %edx,%esi 142 # Round 8 143 movl 8(%ebx),%eax 144 mull %ebp 145 addl %esi,%eax 146 adcl $0,%edx 147 addl 8(%edi),%eax 148 adcl $0,%edx 149 movl %eax,8(%edi) 150 movl %edx,%esi 151 # Round 12 152 movl 12(%ebx),%eax 153 mull %ebp 154 addl %esi,%eax 155 adcl $0,%edx 156 addl 12(%edi),%eax 157 adcl $0,%edx 158 movl %eax,12(%edi) 159 movl %edx,%esi 160 # Round 16 161 movl 16(%ebx),%eax 162 mull %ebp 163 addl %esi,%eax 164 adcl $0,%edx 165 addl 16(%edi),%eax 166 adcl $0,%edx 167 movl %eax,16(%edi) 168 movl %edx,%esi 169 # Round 20 170 movl 20(%ebx),%eax 171 mull %ebp 172 addl %esi,%eax 173 adcl $0,%edx 174 addl 20(%edi),%eax 175 adcl $0,%edx 176 movl %eax,20(%edi) 177 movl %edx,%esi 178 # Round 24 179 movl 24(%ebx),%eax 180 mull %ebp 181 addl %esi,%eax 182 adcl $0,%edx 183 addl 24(%edi),%eax 184 adcl $0,%edx 185 movl %eax,24(%edi) 186 movl %edx,%esi 187 # Round 28 188 movl 28(%ebx),%eax 189 mull %ebp 190 addl %esi,%eax 191 adcl $0,%edx 192 addl 28(%edi),%eax 193 adcl $0,%edx 194 movl %eax,28(%edi) 195 movl %edx,%esi 196 197 subl $8,%ecx 198 leal 32(%ebx),%ebx 199 leal 32(%edi),%edi 200 jnz L007maw_loop 201L006maw_finish: 202 movl 32(%esp),%ecx 203 andl $7,%ecx 204 jnz L008maw_finish2 205 jmp L009maw_end 206L008maw_finish2: 207 # Tail Round 0 208 movl (%ebx),%eax 209 mull %ebp 210 addl %esi,%eax 211 adcl $0,%edx 212 addl (%edi),%eax 213 adcl $0,%edx 214 decl %ecx 215 movl %eax,(%edi) 216 movl %edx,%esi 217 jz L009maw_end 218 # Tail Round 1 219 movl 4(%ebx),%eax 220 mull %ebp 221 addl %esi,%eax 222 adcl $0,%edx 223 addl 4(%edi),%eax 224 adcl $0,%edx 225 decl %ecx 226 movl %eax,4(%edi) 227 movl %edx,%esi 228 jz L009maw_end 229 # Tail Round 2 230 movl 8(%ebx),%eax 231 mull %ebp 232 addl %esi,%eax 233 adcl $0,%edx 234 addl 8(%edi),%eax 235 adcl $0,%edx 236 decl %ecx 237 movl %eax,8(%edi) 238 movl %edx,%esi 239 jz L009maw_end 240 # Tail Round 3 241 movl 12(%ebx),%eax 242 mull %ebp 243 addl %esi,%eax 244 adcl $0,%edx 245 addl 12(%edi),%eax 246 adcl $0,%edx 247 decl %ecx 248 movl %eax,12(%edi) 249 movl %edx,%esi 250 jz L009maw_end 251 # Tail Round 4 252 movl 16(%ebx),%eax 253 mull %ebp 254 addl %esi,%eax 255 adcl $0,%edx 256 addl 16(%edi),%eax 257 adcl $0,%edx 258 decl %ecx 259 movl %eax,16(%edi) 260 movl %edx,%esi 261 jz L009maw_end 262 # Tail Round 5 263 movl 20(%ebx),%eax 264 mull %ebp 265 addl %esi,%eax 266 adcl $0,%edx 267 addl 20(%edi),%eax 268 adcl $0,%edx 269 decl %ecx 270 movl %eax,20(%edi) 271 movl %edx,%esi 272 jz L009maw_end 273 # Tail Round 6 274 movl 24(%ebx),%eax 275 mull %ebp 276 addl %esi,%eax 277 adcl $0,%edx 278 addl 24(%edi),%eax 279 adcl $0,%edx 280 movl %eax,24(%edi) 281 movl %edx,%esi 282L009maw_end: 283 movl %esi,%eax 284 popl %ecx 285 popl %edi 286 popl %esi 287 popl %ebx 288 popl %ebp 289 ret 290.globl _bn_mul_words 291.type _bn_mul_words,@function 292.align 4 293_bn_mul_words: 294L_bn_mul_words_begin: 295 %ifdef __CET__ 296 297.byte 243,15,30,251 298 %endif 299 300 call L010PIC_me_up 301L010PIC_me_up: 302 popl %eax 303 leal __GLOBAL_OFFSET_TABLE_+[.-L010PIC_me_up](%eax),%eax 304 movl _OPENSSL_ia32cap_P@GOT(%eax),%eax 305 btl $26,(%eax) 306 jnc L011mw_non_sse2 307 movl 4(%esp),%eax 308 movl 8(%esp),%edx 309 movl 12(%esp),%ecx 310 movd 16(%esp),%mm0 311 pxor %mm1,%mm1 312.align 4,0x90 313L012mw_sse2_loop: 314 movd (%edx),%mm2 315 pmuludq %mm0,%mm2 316 leal 4(%edx),%edx 317 paddq %mm2,%mm1 318 movd %mm1,(%eax) 319 subl $1,%ecx 320 psrlq $32,%mm1 321 leal 4(%eax),%eax 322 jnz L012mw_sse2_loop 323 movd %mm1,%eax 324 emms 325 ret 326.align 4,0x90 327L011mw_non_sse2: 328 pushl %ebp 329 pushl %ebx 330 pushl %esi 331 pushl %edi 332 333 xorl %esi,%esi 334 movl 20(%esp),%edi 335 movl 24(%esp),%ebx 336 movl 28(%esp),%ebp 337 movl 32(%esp),%ecx 338 andl $4294967288,%ebp 339 jz L013mw_finish 340L014mw_loop: 341 # Round 0 342 movl (%ebx),%eax 343 mull %ecx 344 addl %esi,%eax 345 adcl $0,%edx 346 movl %eax,(%edi) 347 movl %edx,%esi 348 # Round 4 349 movl 4(%ebx),%eax 350 mull %ecx 351 addl %esi,%eax 352 adcl $0,%edx 353 movl %eax,4(%edi) 354 movl %edx,%esi 355 # Round 8 356 movl 8(%ebx),%eax 357 mull %ecx 358 addl %esi,%eax 359 adcl $0,%edx 360 movl %eax,8(%edi) 361 movl %edx,%esi 362 # Round 12 363 movl 12(%ebx),%eax 364 mull %ecx 365 addl %esi,%eax 366 adcl $0,%edx 367 movl %eax,12(%edi) 368 movl %edx,%esi 369 # Round 16 370 movl 16(%ebx),%eax 371 mull %ecx 372 addl %esi,%eax 373 adcl $0,%edx 374 movl %eax,16(%edi) 375 movl %edx,%esi 376 # Round 20 377 movl 20(%ebx),%eax 378 mull %ecx 379 addl %esi,%eax 380 adcl $0,%edx 381 movl %eax,20(%edi) 382 movl %edx,%esi 383 # Round 24 384 movl 24(%ebx),%eax 385 mull %ecx 386 addl %esi,%eax 387 adcl $0,%edx 388 movl %eax,24(%edi) 389 movl %edx,%esi 390 # Round 28 391 movl 28(%ebx),%eax 392 mull %ecx 393 addl %esi,%eax 394 adcl $0,%edx 395 movl %eax,28(%edi) 396 movl %edx,%esi 397 398 addl $32,%ebx 399 addl $32,%edi 400 subl $8,%ebp 401 jz L013mw_finish 402 jmp L014mw_loop 403L013mw_finish: 404 movl 28(%esp),%ebp 405 andl $7,%ebp 406 jnz L015mw_finish2 407 jmp L016mw_end 408L015mw_finish2: 409 # Tail Round 0 410 movl (%ebx),%eax 411 mull %ecx 412 addl %esi,%eax 413 adcl $0,%edx 414 movl %eax,(%edi) 415 movl %edx,%esi 416 decl %ebp 417 jz L016mw_end 418 # Tail Round 1 419 movl 4(%ebx),%eax 420 mull %ecx 421 addl %esi,%eax 422 adcl $0,%edx 423 movl %eax,4(%edi) 424 movl %edx,%esi 425 decl %ebp 426 jz L016mw_end 427 # Tail Round 2 428 movl 8(%ebx),%eax 429 mull %ecx 430 addl %esi,%eax 431 adcl $0,%edx 432 movl %eax,8(%edi) 433 movl %edx,%esi 434 decl %ebp 435 jz L016mw_end 436 # Tail Round 3 437 movl 12(%ebx),%eax 438 mull %ecx 439 addl %esi,%eax 440 adcl $0,%edx 441 movl %eax,12(%edi) 442 movl %edx,%esi 443 decl %ebp 444 jz L016mw_end 445 # Tail Round 4 446 movl 16(%ebx),%eax 447 mull %ecx 448 addl %esi,%eax 449 adcl $0,%edx 450 movl %eax,16(%edi) 451 movl %edx,%esi 452 decl %ebp 453 jz L016mw_end 454 # Tail Round 5 455 movl 20(%ebx),%eax 456 mull %ecx 457 addl %esi,%eax 458 adcl $0,%edx 459 movl %eax,20(%edi) 460 movl %edx,%esi 461 decl %ebp 462 jz L016mw_end 463 # Tail Round 6 464 movl 24(%ebx),%eax 465 mull %ecx 466 addl %esi,%eax 467 adcl $0,%edx 468 movl %eax,24(%edi) 469 movl %edx,%esi 470L016mw_end: 471 movl %esi,%eax 472 popl %edi 473 popl %esi 474 popl %ebx 475 popl %ebp 476 ret 477.globl _bn_sqr_words 478.type _bn_sqr_words,@function 479.align 4 480_bn_sqr_words: 481L_bn_sqr_words_begin: 482 %ifdef __CET__ 483 484.byte 243,15,30,251 485 %endif 486 487 call L017PIC_me_up 488L017PIC_me_up: 489 popl %eax 490 leal __GLOBAL_OFFSET_TABLE_+[.-L017PIC_me_up](%eax),%eax 491 movl _OPENSSL_ia32cap_P@GOT(%eax),%eax 492 btl $26,(%eax) 493 jnc L018sqr_non_sse2 494 movl 4(%esp),%eax 495 movl 8(%esp),%edx 496 movl 12(%esp),%ecx 497.align 4,0x90 498L019sqr_sse2_loop: 499 movd (%edx),%mm0 500 pmuludq %mm0,%mm0 501 leal 4(%edx),%edx 502 movq %mm0,(%eax) 503 subl $1,%ecx 504 leal 8(%eax),%eax 505 jnz L019sqr_sse2_loop 506 emms 507 ret 508.align 4,0x90 509L018sqr_non_sse2: 510 pushl %ebp 511 pushl %ebx 512 pushl %esi 513 pushl %edi 514 515 movl 20(%esp),%esi 516 movl 24(%esp),%edi 517 movl 28(%esp),%ebx 518 andl $4294967288,%ebx 519 jz L020sw_finish 520L021sw_loop: 521 # Round 0 522 movl (%edi),%eax 523 mull %eax 524 movl %eax,(%esi) 525 movl %edx,4(%esi) 526 # Round 4 527 movl 4(%edi),%eax 528 mull %eax 529 movl %eax,8(%esi) 530 movl %edx,12(%esi) 531 # Round 8 532 movl 8(%edi),%eax 533 mull %eax 534 movl %eax,16(%esi) 535 movl %edx,20(%esi) 536 # Round 12 537 movl 12(%edi),%eax 538 mull %eax 539 movl %eax,24(%esi) 540 movl %edx,28(%esi) 541 # Round 16 542 movl 16(%edi),%eax 543 mull %eax 544 movl %eax,32(%esi) 545 movl %edx,36(%esi) 546 # Round 20 547 movl 20(%edi),%eax 548 mull %eax 549 movl %eax,40(%esi) 550 movl %edx,44(%esi) 551 # Round 24 552 movl 24(%edi),%eax 553 mull %eax 554 movl %eax,48(%esi) 555 movl %edx,52(%esi) 556 # Round 28 557 movl 28(%edi),%eax 558 mull %eax 559 movl %eax,56(%esi) 560 movl %edx,60(%esi) 561 562 addl $32,%edi 563 addl $64,%esi 564 subl $8,%ebx 565 jnz L021sw_loop 566L020sw_finish: 567 movl 28(%esp),%ebx 568 andl $7,%ebx 569 jz L022sw_end 570 # Tail Round 0 571 movl (%edi),%eax 572 mull %eax 573 movl %eax,(%esi) 574 decl %ebx 575 movl %edx,4(%esi) 576 jz L022sw_end 577 # Tail Round 1 578 movl 4(%edi),%eax 579 mull %eax 580 movl %eax,8(%esi) 581 decl %ebx 582 movl %edx,12(%esi) 583 jz L022sw_end 584 # Tail Round 2 585 movl 8(%edi),%eax 586 mull %eax 587 movl %eax,16(%esi) 588 decl %ebx 589 movl %edx,20(%esi) 590 jz L022sw_end 591 # Tail Round 3 592 movl 12(%edi),%eax 593 mull %eax 594 movl %eax,24(%esi) 595 decl %ebx 596 movl %edx,28(%esi) 597 jz L022sw_end 598 # Tail Round 4 599 movl 16(%edi),%eax 600 mull %eax 601 movl %eax,32(%esi) 602 decl %ebx 603 movl %edx,36(%esi) 604 jz L022sw_end 605 # Tail Round 5 606 movl 20(%edi),%eax 607 mull %eax 608 movl %eax,40(%esi) 609 decl %ebx 610 movl %edx,44(%esi) 611 jz L022sw_end 612 # Tail Round 6 613 movl 24(%edi),%eax 614 mull %eax 615 movl %eax,48(%esi) 616 movl %edx,52(%esi) 617L022sw_end: 618 popl %edi 619 popl %esi 620 popl %ebx 621 popl %ebp 622 ret 623.globl _bn_div_words 624.type _bn_div_words,@function 625.align 4 626_bn_div_words: 627L_bn_div_words_begin: 628 %ifdef __CET__ 629 630.byte 243,15,30,251 631 %endif 632 633 movl 4(%esp),%edx 634 movl 8(%esp),%eax 635 movl 12(%esp),%ecx 636 divl %ecx 637 ret 638.globl _bn_add_words 639.type _bn_add_words,@function 640.align 4 641_bn_add_words: 642L_bn_add_words_begin: 643 %ifdef __CET__ 644 645.byte 243,15,30,251 646 %endif 647 648 pushl %ebp 649 pushl %ebx 650 pushl %esi 651 pushl %edi 652 653 movl 20(%esp),%ebx 654 movl 24(%esp),%esi 655 movl 28(%esp),%edi 656 movl 32(%esp),%ebp 657 xorl %eax,%eax 658 andl $4294967288,%ebp 659 jz L023aw_finish 660L024aw_loop: 661 # Round 0 662 movl (%esi),%ecx 663 movl (%edi),%edx 664 addl %eax,%ecx 665 movl $0,%eax 666 adcl %eax,%eax 667 addl %edx,%ecx 668 adcl $0,%eax 669 movl %ecx,(%ebx) 670 # Round 1 671 movl 4(%esi),%ecx 672 movl 4(%edi),%edx 673 addl %eax,%ecx 674 movl $0,%eax 675 adcl %eax,%eax 676 addl %edx,%ecx 677 adcl $0,%eax 678 movl %ecx,4(%ebx) 679 # Round 2 680 movl 8(%esi),%ecx 681 movl 8(%edi),%edx 682 addl %eax,%ecx 683 movl $0,%eax 684 adcl %eax,%eax 685 addl %edx,%ecx 686 adcl $0,%eax 687 movl %ecx,8(%ebx) 688 # Round 3 689 movl 12(%esi),%ecx 690 movl 12(%edi),%edx 691 addl %eax,%ecx 692 movl $0,%eax 693 adcl %eax,%eax 694 addl %edx,%ecx 695 adcl $0,%eax 696 movl %ecx,12(%ebx) 697 # Round 4 698 movl 16(%esi),%ecx 699 movl 16(%edi),%edx 700 addl %eax,%ecx 701 movl $0,%eax 702 adcl %eax,%eax 703 addl %edx,%ecx 704 adcl $0,%eax 705 movl %ecx,16(%ebx) 706 # Round 5 707 movl 20(%esi),%ecx 708 movl 20(%edi),%edx 709 addl %eax,%ecx 710 movl $0,%eax 711 adcl %eax,%eax 712 addl %edx,%ecx 713 adcl $0,%eax 714 movl %ecx,20(%ebx) 715 # Round 6 716 movl 24(%esi),%ecx 717 movl 24(%edi),%edx 718 addl %eax,%ecx 719 movl $0,%eax 720 adcl %eax,%eax 721 addl %edx,%ecx 722 adcl $0,%eax 723 movl %ecx,24(%ebx) 724 # Round 7 725 movl 28(%esi),%ecx 726 movl 28(%edi),%edx 727 addl %eax,%ecx 728 movl $0,%eax 729 adcl %eax,%eax 730 addl %edx,%ecx 731 adcl $0,%eax 732 movl %ecx,28(%ebx) 733 734 addl $32,%esi 735 addl $32,%edi 736 addl $32,%ebx 737 subl $8,%ebp 738 jnz L024aw_loop 739L023aw_finish: 740 movl 32(%esp),%ebp 741 andl $7,%ebp 742 jz L025aw_end 743 # Tail Round 0 744 movl (%esi),%ecx 745 movl (%edi),%edx 746 addl %eax,%ecx 747 movl $0,%eax 748 adcl %eax,%eax 749 addl %edx,%ecx 750 adcl $0,%eax 751 decl %ebp 752 movl %ecx,(%ebx) 753 jz L025aw_end 754 # Tail Round 1 755 movl 4(%esi),%ecx 756 movl 4(%edi),%edx 757 addl %eax,%ecx 758 movl $0,%eax 759 adcl %eax,%eax 760 addl %edx,%ecx 761 adcl $0,%eax 762 decl %ebp 763 movl %ecx,4(%ebx) 764 jz L025aw_end 765 # Tail Round 2 766 movl 8(%esi),%ecx 767 movl 8(%edi),%edx 768 addl %eax,%ecx 769 movl $0,%eax 770 adcl %eax,%eax 771 addl %edx,%ecx 772 adcl $0,%eax 773 decl %ebp 774 movl %ecx,8(%ebx) 775 jz L025aw_end 776 # Tail Round 3 777 movl 12(%esi),%ecx 778 movl 12(%edi),%edx 779 addl %eax,%ecx 780 movl $0,%eax 781 adcl %eax,%eax 782 addl %edx,%ecx 783 adcl $0,%eax 784 decl %ebp 785 movl %ecx,12(%ebx) 786 jz L025aw_end 787 # Tail Round 4 788 movl 16(%esi),%ecx 789 movl 16(%edi),%edx 790 addl %eax,%ecx 791 movl $0,%eax 792 adcl %eax,%eax 793 addl %edx,%ecx 794 adcl $0,%eax 795 decl %ebp 796 movl %ecx,16(%ebx) 797 jz L025aw_end 798 # Tail Round 5 799 movl 20(%esi),%ecx 800 movl 20(%edi),%edx 801 addl %eax,%ecx 802 movl $0,%eax 803 adcl %eax,%eax 804 addl %edx,%ecx 805 adcl $0,%eax 806 decl %ebp 807 movl %ecx,20(%ebx) 808 jz L025aw_end 809 # Tail Round 6 810 movl 24(%esi),%ecx 811 movl 24(%edi),%edx 812 addl %eax,%ecx 813 movl $0,%eax 814 adcl %eax,%eax 815 addl %edx,%ecx 816 adcl $0,%eax 817 movl %ecx,24(%ebx) 818L025aw_end: 819 popl %edi 820 popl %esi 821 popl %ebx 822 popl %ebp 823 ret 824.globl _bn_sub_words 825.type _bn_sub_words,@function 826.align 4 827_bn_sub_words: 828L_bn_sub_words_begin: 829 %ifdef __CET__ 830 831.byte 243,15,30,251 832 %endif 833 834 pushl %ebp 835 pushl %ebx 836 pushl %esi 837 pushl %edi 838 839 movl 20(%esp),%ebx 840 movl 24(%esp),%esi 841 movl 28(%esp),%edi 842 movl 32(%esp),%ebp 843 xorl %eax,%eax 844 andl $4294967288,%ebp 845 jz L026aw_finish 846L027aw_loop: 847 # Round 0 848 movl (%esi),%ecx 849 movl (%edi),%edx 850 subl %eax,%ecx 851 movl $0,%eax 852 adcl %eax,%eax 853 subl %edx,%ecx 854 adcl $0,%eax 855 movl %ecx,(%ebx) 856 # Round 1 857 movl 4(%esi),%ecx 858 movl 4(%edi),%edx 859 subl %eax,%ecx 860 movl $0,%eax 861 adcl %eax,%eax 862 subl %edx,%ecx 863 adcl $0,%eax 864 movl %ecx,4(%ebx) 865 # Round 2 866 movl 8(%esi),%ecx 867 movl 8(%edi),%edx 868 subl %eax,%ecx 869 movl $0,%eax 870 adcl %eax,%eax 871 subl %edx,%ecx 872 adcl $0,%eax 873 movl %ecx,8(%ebx) 874 # Round 3 875 movl 12(%esi),%ecx 876 movl 12(%edi),%edx 877 subl %eax,%ecx 878 movl $0,%eax 879 adcl %eax,%eax 880 subl %edx,%ecx 881 adcl $0,%eax 882 movl %ecx,12(%ebx) 883 # Round 4 884 movl 16(%esi),%ecx 885 movl 16(%edi),%edx 886 subl %eax,%ecx 887 movl $0,%eax 888 adcl %eax,%eax 889 subl %edx,%ecx 890 adcl $0,%eax 891 movl %ecx,16(%ebx) 892 # Round 5 893 movl 20(%esi),%ecx 894 movl 20(%edi),%edx 895 subl %eax,%ecx 896 movl $0,%eax 897 adcl %eax,%eax 898 subl %edx,%ecx 899 adcl $0,%eax 900 movl %ecx,20(%ebx) 901 # Round 6 902 movl 24(%esi),%ecx 903 movl 24(%edi),%edx 904 subl %eax,%ecx 905 movl $0,%eax 906 adcl %eax,%eax 907 subl %edx,%ecx 908 adcl $0,%eax 909 movl %ecx,24(%ebx) 910 # Round 7 911 movl 28(%esi),%ecx 912 movl 28(%edi),%edx 913 subl %eax,%ecx 914 movl $0,%eax 915 adcl %eax,%eax 916 subl %edx,%ecx 917 adcl $0,%eax 918 movl %ecx,28(%ebx) 919 920 addl $32,%esi 921 addl $32,%edi 922 addl $32,%ebx 923 subl $8,%ebp 924 jnz L027aw_loop 925L026aw_finish: 926 movl 32(%esp),%ebp 927 andl $7,%ebp 928 jz L028aw_end 929 # Tail Round 0 930 movl (%esi),%ecx 931 movl (%edi),%edx 932 subl %eax,%ecx 933 movl $0,%eax 934 adcl %eax,%eax 935 subl %edx,%ecx 936 adcl $0,%eax 937 decl %ebp 938 movl %ecx,(%ebx) 939 jz L028aw_end 940 # Tail Round 1 941 movl 4(%esi),%ecx 942 movl 4(%edi),%edx 943 subl %eax,%ecx 944 movl $0,%eax 945 adcl %eax,%eax 946 subl %edx,%ecx 947 adcl $0,%eax 948 decl %ebp 949 movl %ecx,4(%ebx) 950 jz L028aw_end 951 # Tail Round 2 952 movl 8(%esi),%ecx 953 movl 8(%edi),%edx 954 subl %eax,%ecx 955 movl $0,%eax 956 adcl %eax,%eax 957 subl %edx,%ecx 958 adcl $0,%eax 959 decl %ebp 960 movl %ecx,8(%ebx) 961 jz L028aw_end 962 # Tail Round 3 963 movl 12(%esi),%ecx 964 movl 12(%edi),%edx 965 subl %eax,%ecx 966 movl $0,%eax 967 adcl %eax,%eax 968 subl %edx,%ecx 969 adcl $0,%eax 970 decl %ebp 971 movl %ecx,12(%ebx) 972 jz L028aw_end 973 # Tail Round 4 974 movl 16(%esi),%ecx 975 movl 16(%edi),%edx 976 subl %eax,%ecx 977 movl $0,%eax 978 adcl %eax,%eax 979 subl %edx,%ecx 980 adcl $0,%eax 981 decl %ebp 982 movl %ecx,16(%ebx) 983 jz L028aw_end 984 # Tail Round 5 985 movl 20(%esi),%ecx 986 movl 20(%edi),%edx 987 subl %eax,%ecx 988 movl $0,%eax 989 adcl %eax,%eax 990 subl %edx,%ecx 991 adcl $0,%eax 992 decl %ebp 993 movl %ecx,20(%ebx) 994 jz L028aw_end 995 # Tail Round 6 996 movl 24(%esi),%ecx 997 movl 24(%edi),%edx 998 subl %eax,%ecx 999 movl $0,%eax 1000 adcl %eax,%eax 1001 subl %edx,%ecx 1002 adcl $0,%eax 1003 movl %ecx,24(%ebx) 1004L028aw_end: 1005 popl %edi 1006 popl %esi 1007 popl %ebx 1008 popl %ebp 1009 ret 1010.globl _bn_sub_part_words 1011.type _bn_sub_part_words,@function 1012.align 4 1013_bn_sub_part_words: 1014L_bn_sub_part_words_begin: 1015 %ifdef __CET__ 1016 1017.byte 243,15,30,251 1018 %endif 1019 1020 pushl %ebp 1021 pushl %ebx 1022 pushl %esi 1023 pushl %edi 1024 1025 movl 20(%esp),%ebx 1026 movl 24(%esp),%esi 1027 movl 28(%esp),%edi 1028 movl 32(%esp),%ebp 1029 xorl %eax,%eax 1030 andl $4294967288,%ebp 1031 jz L029aw_finish 1032L030aw_loop: 1033 # Round 0 1034 movl (%esi),%ecx 1035 movl (%edi),%edx 1036 subl %eax,%ecx 1037 movl $0,%eax 1038 adcl %eax,%eax 1039 subl %edx,%ecx 1040 adcl $0,%eax 1041 movl %ecx,(%ebx) 1042 # Round 1 1043 movl 4(%esi),%ecx 1044 movl 4(%edi),%edx 1045 subl %eax,%ecx 1046 movl $0,%eax 1047 adcl %eax,%eax 1048 subl %edx,%ecx 1049 adcl $0,%eax 1050 movl %ecx,4(%ebx) 1051 # Round 2 1052 movl 8(%esi),%ecx 1053 movl 8(%edi),%edx 1054 subl %eax,%ecx 1055 movl $0,%eax 1056 adcl %eax,%eax 1057 subl %edx,%ecx 1058 adcl $0,%eax 1059 movl %ecx,8(%ebx) 1060 # Round 3 1061 movl 12(%esi),%ecx 1062 movl 12(%edi),%edx 1063 subl %eax,%ecx 1064 movl $0,%eax 1065 adcl %eax,%eax 1066 subl %edx,%ecx 1067 adcl $0,%eax 1068 movl %ecx,12(%ebx) 1069 # Round 4 1070 movl 16(%esi),%ecx 1071 movl 16(%edi),%edx 1072 subl %eax,%ecx 1073 movl $0,%eax 1074 adcl %eax,%eax 1075 subl %edx,%ecx 1076 adcl $0,%eax 1077 movl %ecx,16(%ebx) 1078 # Round 5 1079 movl 20(%esi),%ecx 1080 movl 20(%edi),%edx 1081 subl %eax,%ecx 1082 movl $0,%eax 1083 adcl %eax,%eax 1084 subl %edx,%ecx 1085 adcl $0,%eax 1086 movl %ecx,20(%ebx) 1087 # Round 6 1088 movl 24(%esi),%ecx 1089 movl 24(%edi),%edx 1090 subl %eax,%ecx 1091 movl $0,%eax 1092 adcl %eax,%eax 1093 subl %edx,%ecx 1094 adcl $0,%eax 1095 movl %ecx,24(%ebx) 1096 # Round 7 1097 movl 28(%esi),%ecx 1098 movl 28(%edi),%edx 1099 subl %eax,%ecx 1100 movl $0,%eax 1101 adcl %eax,%eax 1102 subl %edx,%ecx 1103 adcl $0,%eax 1104 movl %ecx,28(%ebx) 1105 1106 addl $32,%esi 1107 addl $32,%edi 1108 addl $32,%ebx 1109 subl $8,%ebp 1110 jnz L030aw_loop 1111L029aw_finish: 1112 movl 32(%esp),%ebp 1113 andl $7,%ebp 1114 jz L031aw_end 1115 # Tail Round 0 1116 movl (%esi),%ecx 1117 movl (%edi),%edx 1118 subl %eax,%ecx 1119 movl $0,%eax 1120 adcl %eax,%eax 1121 subl %edx,%ecx 1122 adcl $0,%eax 1123 movl %ecx,(%ebx) 1124 addl $4,%esi 1125 addl $4,%edi 1126 addl $4,%ebx 1127 decl %ebp 1128 jz L031aw_end 1129 # Tail Round 1 1130 movl (%esi),%ecx 1131 movl (%edi),%edx 1132 subl %eax,%ecx 1133 movl $0,%eax 1134 adcl %eax,%eax 1135 subl %edx,%ecx 1136 adcl $0,%eax 1137 movl %ecx,(%ebx) 1138 addl $4,%esi 1139 addl $4,%edi 1140 addl $4,%ebx 1141 decl %ebp 1142 jz L031aw_end 1143 # Tail Round 2 1144 movl (%esi),%ecx 1145 movl (%edi),%edx 1146 subl %eax,%ecx 1147 movl $0,%eax 1148 adcl %eax,%eax 1149 subl %edx,%ecx 1150 adcl $0,%eax 1151 movl %ecx,(%ebx) 1152 addl $4,%esi 1153 addl $4,%edi 1154 addl $4,%ebx 1155 decl %ebp 1156 jz L031aw_end 1157 # Tail Round 3 1158 movl (%esi),%ecx 1159 movl (%edi),%edx 1160 subl %eax,%ecx 1161 movl $0,%eax 1162 adcl %eax,%eax 1163 subl %edx,%ecx 1164 adcl $0,%eax 1165 movl %ecx,(%ebx) 1166 addl $4,%esi 1167 addl $4,%edi 1168 addl $4,%ebx 1169 decl %ebp 1170 jz L031aw_end 1171 # Tail Round 4 1172 movl (%esi),%ecx 1173 movl (%edi),%edx 1174 subl %eax,%ecx 1175 movl $0,%eax 1176 adcl %eax,%eax 1177 subl %edx,%ecx 1178 adcl $0,%eax 1179 movl %ecx,(%ebx) 1180 addl $4,%esi 1181 addl $4,%edi 1182 addl $4,%ebx 1183 decl %ebp 1184 jz L031aw_end 1185 # Tail Round 5 1186 movl (%esi),%ecx 1187 movl (%edi),%edx 1188 subl %eax,%ecx 1189 movl $0,%eax 1190 adcl %eax,%eax 1191 subl %edx,%ecx 1192 adcl $0,%eax 1193 movl %ecx,(%ebx) 1194 addl $4,%esi 1195 addl $4,%edi 1196 addl $4,%ebx 1197 decl %ebp 1198 jz L031aw_end 1199 # Tail Round 6 1200 movl (%esi),%ecx 1201 movl (%edi),%edx 1202 subl %eax,%ecx 1203 movl $0,%eax 1204 adcl %eax,%eax 1205 subl %edx,%ecx 1206 adcl $0,%eax 1207 movl %ecx,(%ebx) 1208 addl $4,%esi 1209 addl $4,%edi 1210 addl $4,%ebx 1211L031aw_end: 1212 cmpl $0,36(%esp) 1213 je L032pw_end 1214 movl 36(%esp),%ebp 1215 cmpl $0,%ebp 1216 je L032pw_end 1217 jge L033pw_pos 1218 # pw_neg 1219 movl $0,%edx 1220 subl %ebp,%edx 1221 movl %edx,%ebp 1222 andl $4294967288,%ebp 1223 jz L034pw_neg_finish 1224L035pw_neg_loop: 1225 # dl<0 Round 0 1226 movl $0,%ecx 1227 movl (%edi),%edx 1228 subl %eax,%ecx 1229 movl $0,%eax 1230 adcl %eax,%eax 1231 subl %edx,%ecx 1232 adcl $0,%eax 1233 movl %ecx,(%ebx) 1234 # dl<0 Round 1 1235 movl $0,%ecx 1236 movl 4(%edi),%edx 1237 subl %eax,%ecx 1238 movl $0,%eax 1239 adcl %eax,%eax 1240 subl %edx,%ecx 1241 adcl $0,%eax 1242 movl %ecx,4(%ebx) 1243 # dl<0 Round 2 1244 movl $0,%ecx 1245 movl 8(%edi),%edx 1246 subl %eax,%ecx 1247 movl $0,%eax 1248 adcl %eax,%eax 1249 subl %edx,%ecx 1250 adcl $0,%eax 1251 movl %ecx,8(%ebx) 1252 # dl<0 Round 3 1253 movl $0,%ecx 1254 movl 12(%edi),%edx 1255 subl %eax,%ecx 1256 movl $0,%eax 1257 adcl %eax,%eax 1258 subl %edx,%ecx 1259 adcl $0,%eax 1260 movl %ecx,12(%ebx) 1261 # dl<0 Round 4 1262 movl $0,%ecx 1263 movl 16(%edi),%edx 1264 subl %eax,%ecx 1265 movl $0,%eax 1266 adcl %eax,%eax 1267 subl %edx,%ecx 1268 adcl $0,%eax 1269 movl %ecx,16(%ebx) 1270 # dl<0 Round 5 1271 movl $0,%ecx 1272 movl 20(%edi),%edx 1273 subl %eax,%ecx 1274 movl $0,%eax 1275 adcl %eax,%eax 1276 subl %edx,%ecx 1277 adcl $0,%eax 1278 movl %ecx,20(%ebx) 1279 # dl<0 Round 6 1280 movl $0,%ecx 1281 movl 24(%edi),%edx 1282 subl %eax,%ecx 1283 movl $0,%eax 1284 adcl %eax,%eax 1285 subl %edx,%ecx 1286 adcl $0,%eax 1287 movl %ecx,24(%ebx) 1288 # dl<0 Round 7 1289 movl $0,%ecx 1290 movl 28(%edi),%edx 1291 subl %eax,%ecx 1292 movl $0,%eax 1293 adcl %eax,%eax 1294 subl %edx,%ecx 1295 adcl $0,%eax 1296 movl %ecx,28(%ebx) 1297 1298 addl $32,%edi 1299 addl $32,%ebx 1300 subl $8,%ebp 1301 jnz L035pw_neg_loop 1302L034pw_neg_finish: 1303 movl 36(%esp),%edx 1304 movl $0,%ebp 1305 subl %edx,%ebp 1306 andl $7,%ebp 1307 jz L032pw_end 1308 # dl<0 Tail Round 0 1309 movl $0,%ecx 1310 movl (%edi),%edx 1311 subl %eax,%ecx 1312 movl $0,%eax 1313 adcl %eax,%eax 1314 subl %edx,%ecx 1315 adcl $0,%eax 1316 decl %ebp 1317 movl %ecx,(%ebx) 1318 jz L032pw_end 1319 # dl<0 Tail Round 1 1320 movl $0,%ecx 1321 movl 4(%edi),%edx 1322 subl %eax,%ecx 1323 movl $0,%eax 1324 adcl %eax,%eax 1325 subl %edx,%ecx 1326 adcl $0,%eax 1327 decl %ebp 1328 movl %ecx,4(%ebx) 1329 jz L032pw_end 1330 # dl<0 Tail Round 2 1331 movl $0,%ecx 1332 movl 8(%edi),%edx 1333 subl %eax,%ecx 1334 movl $0,%eax 1335 adcl %eax,%eax 1336 subl %edx,%ecx 1337 adcl $0,%eax 1338 decl %ebp 1339 movl %ecx,8(%ebx) 1340 jz L032pw_end 1341 # dl<0 Tail Round 3 1342 movl $0,%ecx 1343 movl 12(%edi),%edx 1344 subl %eax,%ecx 1345 movl $0,%eax 1346 adcl %eax,%eax 1347 subl %edx,%ecx 1348 adcl $0,%eax 1349 decl %ebp 1350 movl %ecx,12(%ebx) 1351 jz L032pw_end 1352 # dl<0 Tail Round 4 1353 movl $0,%ecx 1354 movl 16(%edi),%edx 1355 subl %eax,%ecx 1356 movl $0,%eax 1357 adcl %eax,%eax 1358 subl %edx,%ecx 1359 adcl $0,%eax 1360 decl %ebp 1361 movl %ecx,16(%ebx) 1362 jz L032pw_end 1363 # dl<0 Tail Round 5 1364 movl $0,%ecx 1365 movl 20(%edi),%edx 1366 subl %eax,%ecx 1367 movl $0,%eax 1368 adcl %eax,%eax 1369 subl %edx,%ecx 1370 adcl $0,%eax 1371 decl %ebp 1372 movl %ecx,20(%ebx) 1373 jz L032pw_end 1374 # dl<0 Tail Round 6 1375 movl $0,%ecx 1376 movl 24(%edi),%edx 1377 subl %eax,%ecx 1378 movl $0,%eax 1379 adcl %eax,%eax 1380 subl %edx,%ecx 1381 adcl $0,%eax 1382 movl %ecx,24(%ebx) 1383 jmp L032pw_end 1384L033pw_pos: 1385 andl $4294967288,%ebp 1386 jz L036pw_pos_finish 1387L037pw_pos_loop: 1388 # dl>0 Round 0 1389 movl (%esi),%ecx 1390 subl %eax,%ecx 1391 movl %ecx,(%ebx) 1392 jnc L038pw_nc0 1393 # dl>0 Round 1 1394 movl 4(%esi),%ecx 1395 subl %eax,%ecx 1396 movl %ecx,4(%ebx) 1397 jnc L039pw_nc1 1398 # dl>0 Round 2 1399 movl 8(%esi),%ecx 1400 subl %eax,%ecx 1401 movl %ecx,8(%ebx) 1402 jnc L040pw_nc2 1403 # dl>0 Round 3 1404 movl 12(%esi),%ecx 1405 subl %eax,%ecx 1406 movl %ecx,12(%ebx) 1407 jnc L041pw_nc3 1408 # dl>0 Round 4 1409 movl 16(%esi),%ecx 1410 subl %eax,%ecx 1411 movl %ecx,16(%ebx) 1412 jnc L042pw_nc4 1413 # dl>0 Round 5 1414 movl 20(%esi),%ecx 1415 subl %eax,%ecx 1416 movl %ecx,20(%ebx) 1417 jnc L043pw_nc5 1418 # dl>0 Round 6 1419 movl 24(%esi),%ecx 1420 subl %eax,%ecx 1421 movl %ecx,24(%ebx) 1422 jnc L044pw_nc6 1423 # dl>0 Round 7 1424 movl 28(%esi),%ecx 1425 subl %eax,%ecx 1426 movl %ecx,28(%ebx) 1427 jnc L045pw_nc7 1428 1429 addl $32,%esi 1430 addl $32,%ebx 1431 subl $8,%ebp 1432 jnz L037pw_pos_loop 1433L036pw_pos_finish: 1434 movl 36(%esp),%ebp 1435 andl $7,%ebp 1436 jz L032pw_end 1437 # dl>0 Tail Round 0 1438 movl (%esi),%ecx 1439 subl %eax,%ecx 1440 movl %ecx,(%ebx) 1441 jnc L046pw_tail_nc0 1442 decl %ebp 1443 jz L032pw_end 1444 # dl>0 Tail Round 1 1445 movl 4(%esi),%ecx 1446 subl %eax,%ecx 1447 movl %ecx,4(%ebx) 1448 jnc L047pw_tail_nc1 1449 decl %ebp 1450 jz L032pw_end 1451 # dl>0 Tail Round 2 1452 movl 8(%esi),%ecx 1453 subl %eax,%ecx 1454 movl %ecx,8(%ebx) 1455 jnc L048pw_tail_nc2 1456 decl %ebp 1457 jz L032pw_end 1458 # dl>0 Tail Round 3 1459 movl 12(%esi),%ecx 1460 subl %eax,%ecx 1461 movl %ecx,12(%ebx) 1462 jnc L049pw_tail_nc3 1463 decl %ebp 1464 jz L032pw_end 1465 # dl>0 Tail Round 4 1466 movl 16(%esi),%ecx 1467 subl %eax,%ecx 1468 movl %ecx,16(%ebx) 1469 jnc L050pw_tail_nc4 1470 decl %ebp 1471 jz L032pw_end 1472 # dl>0 Tail Round 5 1473 movl 20(%esi),%ecx 1474 subl %eax,%ecx 1475 movl %ecx,20(%ebx) 1476 jnc L051pw_tail_nc5 1477 decl %ebp 1478 jz L032pw_end 1479 # dl>0 Tail Round 6 1480 movl 24(%esi),%ecx 1481 subl %eax,%ecx 1482 movl %ecx,24(%ebx) 1483 jnc L052pw_tail_nc6 1484 movl $1,%eax 1485 jmp L032pw_end 1486L053pw_nc_loop: 1487 movl (%esi),%ecx 1488 movl %ecx,(%ebx) 1489L038pw_nc0: 1490 movl 4(%esi),%ecx 1491 movl %ecx,4(%ebx) 1492L039pw_nc1: 1493 movl 8(%esi),%ecx 1494 movl %ecx,8(%ebx) 1495L040pw_nc2: 1496 movl 12(%esi),%ecx 1497 movl %ecx,12(%ebx) 1498L041pw_nc3: 1499 movl 16(%esi),%ecx 1500 movl %ecx,16(%ebx) 1501L042pw_nc4: 1502 movl 20(%esi),%ecx 1503 movl %ecx,20(%ebx) 1504L043pw_nc5: 1505 movl 24(%esi),%ecx 1506 movl %ecx,24(%ebx) 1507L044pw_nc6: 1508 movl 28(%esi),%ecx 1509 movl %ecx,28(%ebx) 1510L045pw_nc7: 1511 1512 addl $32,%esi 1513 addl $32,%ebx 1514 subl $8,%ebp 1515 jnz L053pw_nc_loop 1516 movl 36(%esp),%ebp 1517 andl $7,%ebp 1518 jz L054pw_nc_end 1519 movl (%esi),%ecx 1520 movl %ecx,(%ebx) 1521L046pw_tail_nc0: 1522 decl %ebp 1523 jz L054pw_nc_end 1524 movl 4(%esi),%ecx 1525 movl %ecx,4(%ebx) 1526L047pw_tail_nc1: 1527 decl %ebp 1528 jz L054pw_nc_end 1529 movl 8(%esi),%ecx 1530 movl %ecx,8(%ebx) 1531L048pw_tail_nc2: 1532 decl %ebp 1533 jz L054pw_nc_end 1534 movl 12(%esi),%ecx 1535 movl %ecx,12(%ebx) 1536L049pw_tail_nc3: 1537 decl %ebp 1538 jz L054pw_nc_end 1539 movl 16(%esi),%ecx 1540 movl %ecx,16(%ebx) 1541L050pw_tail_nc4: 1542 decl %ebp 1543 jz L054pw_nc_end 1544 movl 20(%esi),%ecx 1545 movl %ecx,20(%ebx) 1546L051pw_tail_nc5: 1547 decl %ebp 1548 jz L054pw_nc_end 1549 movl 24(%esi),%ecx 1550 movl %ecx,24(%ebx) 1551L052pw_tail_nc6: 1552L054pw_nc_end: 1553 movl $0,%eax 1554L032pw_end: 1555 popl %edi 1556 popl %esi 1557 popl %ebx 1558 popl %ebp 1559 ret 1560.comm _OPENSSL_ia32cap_P,16 1561