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