1/* Do not modify. This file is auto-generated from e_padlock-x86.pl. */ 2#ifdef PIC 3.text 4.globl padlock_capability 5.type padlock_capability,@function 6.align 16 7padlock_capability: 8.L_padlock_capability_begin: 9 pushl %ebx 10 pushfl 11 popl %eax 12 movl %eax,%ecx 13 xorl $2097152,%eax 14 pushl %eax 15 popfl 16 pushfl 17 popl %eax 18 xorl %eax,%ecx 19 xorl %eax,%eax 20 btl $21,%ecx 21 jnc .L000noluck 22 .byte 0x0f,0xa2 23 xorl %eax,%eax 24 cmpl $0x746e6543,%ebx 25 jne .L001zhaoxin 26 cmpl $0x48727561,%edx 27 jne .L000noluck 28 cmpl $0x736c7561,%ecx 29 jne .L000noluck 30 jmp .L002zhaoxinEnd 31.L001zhaoxin: 32 cmpl $0x68532020,%ebx 33 jne .L000noluck 34 cmpl $0x68676e61,%edx 35 jne .L000noluck 36 cmpl $0x20206961,%ecx 37 jne .L000noluck 38.L002zhaoxinEnd: 39 movl $3221225472,%eax 40 .byte 0x0f,0xa2 41 movl %eax,%edx 42 xorl %eax,%eax 43 cmpl $3221225473,%edx 44 jb .L000noluck 45 movl $1,%eax 46 .byte 0x0f,0xa2 47 orl $15,%eax 48 xorl %ebx,%ebx 49 andl $4095,%eax 50 cmpl $1791,%eax 51 sete %bl 52 movl $3221225473,%eax 53 pushl %ebx 54 .byte 0x0f,0xa2 55 popl %ebx 56 movl %edx,%eax 57 shll $4,%ebx 58 andl $4294967279,%eax 59 orl %ebx,%eax 60.L000noluck: 61 popl %ebx 62 ret 63.size padlock_capability,.-.L_padlock_capability_begin 64.globl padlock_key_bswap 65.type padlock_key_bswap,@function 66.align 16 67padlock_key_bswap: 68.L_padlock_key_bswap_begin: 69 movl 4(%esp),%edx 70 movl 240(%edx),%ecx 71 incl %ecx 72 shll $2,%ecx 73.L003bswap_loop: 74 movl (%edx),%eax 75 bswap %eax 76 movl %eax,(%edx) 77 leal 4(%edx),%edx 78 subl $1,%ecx 79 jnz .L003bswap_loop 80 ret 81.size padlock_key_bswap,.-.L_padlock_key_bswap_begin 82.globl padlock_verify_context 83.type padlock_verify_context,@function 84.align 16 85padlock_verify_context: 86.L_padlock_verify_context_begin: 87 movl 4(%esp),%edx 88 leal .Lpadlock_saved_context-.L004verify_pic_point,%eax 89 pushfl 90 call _padlock_verify_ctx 91.L004verify_pic_point: 92 leal 4(%esp),%esp 93 ret 94.size padlock_verify_context,.-.L_padlock_verify_context_begin 95.type _padlock_verify_ctx,@function 96.align 16 97_padlock_verify_ctx: 98 addl (%esp),%eax 99 btl $30,4(%esp) 100 jnc .L005verified 101 cmpl (%eax),%edx 102 je .L005verified 103 pushfl 104 popfl 105.L005verified: 106 movl %edx,(%eax) 107 ret 108.size _padlock_verify_ctx,.-_padlock_verify_ctx 109.globl padlock_reload_key 110.type padlock_reload_key,@function 111.align 16 112padlock_reload_key: 113.L_padlock_reload_key_begin: 114 pushfl 115 popfl 116 ret 117.size padlock_reload_key,.-.L_padlock_reload_key_begin 118.globl padlock_aes_block 119.type padlock_aes_block,@function 120.align 16 121padlock_aes_block: 122.L_padlock_aes_block_begin: 123 pushl %edi 124 pushl %esi 125 pushl %ebx 126 movl 16(%esp),%edi 127 movl 20(%esp),%esi 128 movl 24(%esp),%edx 129 movl $1,%ecx 130 leal 32(%edx),%ebx 131 leal 16(%edx),%edx 132.byte 243,15,167,200 133 popl %ebx 134 popl %esi 135 popl %edi 136 ret 137.size padlock_aes_block,.-.L_padlock_aes_block_begin 138.globl padlock_ecb_encrypt 139.type padlock_ecb_encrypt,@function 140.align 16 141padlock_ecb_encrypt: 142.L_padlock_ecb_encrypt_begin: 143 pushl %ebp 144 pushl %ebx 145 pushl %esi 146 pushl %edi 147 movl 20(%esp),%edi 148 movl 24(%esp),%esi 149 movl 28(%esp),%edx 150 movl 32(%esp),%ecx 151 testl $15,%edx 152 jnz .L006ecb_abort 153 testl $15,%ecx 154 jnz .L006ecb_abort 155 leal .Lpadlock_saved_context-.L007ecb_pic_point,%eax 156 pushfl 157 cld 158 call _padlock_verify_ctx 159.L007ecb_pic_point: 160 leal 16(%edx),%edx 161 xorl %eax,%eax 162 xorl %ebx,%ebx 163 testl $32,(%edx) 164 jnz .L008ecb_aligned 165 testl $15,%edi 166 setz %al 167 testl $15,%esi 168 setz %bl 169 testl %ebx,%eax 170 jnz .L008ecb_aligned 171 negl %eax 172 movl $512,%ebx 173 notl %eax 174 leal -24(%esp),%ebp 175 cmpl %ebx,%ecx 176 cmovcl %ecx,%ebx 177 andl %ebx,%eax 178 movl %ecx,%ebx 179 negl %eax 180 andl $511,%ebx 181 leal (%eax,%ebp,1),%esp 182 movl $512,%eax 183 cmovzl %eax,%ebx 184 movl %ebp,%eax 185 andl $-16,%ebp 186 andl $-16,%esp 187 movl %eax,16(%ebp) 188 cmpl %ebx,%ecx 189 ja .L009ecb_loop 190 movl %esi,%eax 191 cmpl %esp,%ebp 192 cmovel %edi,%eax 193 addl %ecx,%eax 194 negl %eax 195 andl $4095,%eax 196 cmpl $128,%eax 197 movl $-128,%eax 198 cmovael %ebx,%eax 199 andl %eax,%ebx 200 jz .L010ecb_unaligned_tail 201 jmp .L009ecb_loop 202.align 16 203.L009ecb_loop: 204 movl %edi,(%ebp) 205 movl %esi,4(%ebp) 206 movl %ecx,8(%ebp) 207 movl %ebx,%ecx 208 movl %ebx,12(%ebp) 209 testl $15,%edi 210 cmovnzl %esp,%edi 211 testl $15,%esi 212 jz .L011ecb_inp_aligned 213 shrl $2,%ecx 214.byte 243,165 215 subl %ebx,%edi 216 movl %ebx,%ecx 217 movl %edi,%esi 218.L011ecb_inp_aligned: 219 leal -16(%edx),%eax 220 leal 16(%edx),%ebx 221 shrl $4,%ecx 222.byte 243,15,167,200 223 movl (%ebp),%edi 224 movl 12(%ebp),%ebx 225 testl $15,%edi 226 jz .L012ecb_out_aligned 227 movl %ebx,%ecx 228 leal (%esp),%esi 229 shrl $2,%ecx 230.byte 243,165 231 subl %ebx,%edi 232.L012ecb_out_aligned: 233 movl 4(%ebp),%esi 234 movl 8(%ebp),%ecx 235 addl %ebx,%edi 236 addl %ebx,%esi 237 subl %ebx,%ecx 238 movl $512,%ebx 239 jz .L013ecb_break 240 cmpl %ebx,%ecx 241 jae .L009ecb_loop 242.L010ecb_unaligned_tail: 243 xorl %eax,%eax 244 cmpl %ebp,%esp 245 cmovel %ecx,%eax 246 subl %eax,%esp 247 movl %edi,%eax 248 movl %ecx,%ebx 249 shrl $2,%ecx 250 leal (%esp),%edi 251.byte 243,165 252 movl %esp,%esi 253 movl %eax,%edi 254 movl %ebx,%ecx 255 jmp .L009ecb_loop 256.align 16 257.L013ecb_break: 258 cmpl %ebp,%esp 259 je .L014ecb_done 260 pxor %xmm0,%xmm0 261 leal (%esp),%eax 262.L015ecb_bzero: 263 movaps %xmm0,(%eax) 264 leal 16(%eax),%eax 265 cmpl %eax,%ebp 266 ja .L015ecb_bzero 267.L014ecb_done: 268 movl 16(%ebp),%ebp 269 leal 24(%ebp),%esp 270 jmp .L016ecb_exit 271.align 16 272.L008ecb_aligned: 273 leal (%esi,%ecx,1),%ebp 274 negl %ebp 275 andl $4095,%ebp 276 xorl %eax,%eax 277 cmpl $128,%ebp 278 movl $127,%ebp 279 cmovael %eax,%ebp 280 andl %ecx,%ebp 281 subl %ebp,%ecx 282 jz .L017ecb_aligned_tail 283 leal -16(%edx),%eax 284 leal 16(%edx),%ebx 285 shrl $4,%ecx 286.byte 243,15,167,200 287 testl %ebp,%ebp 288 jz .L016ecb_exit 289.L017ecb_aligned_tail: 290 movl %ebp,%ecx 291 leal -24(%esp),%ebp 292 movl %ebp,%esp 293 movl %ebp,%eax 294 subl %ecx,%esp 295 andl $-16,%ebp 296 andl $-16,%esp 297 movl %eax,16(%ebp) 298 movl %edi,%eax 299 movl %ecx,%ebx 300 shrl $2,%ecx 301 leal (%esp),%edi 302.byte 243,165 303 movl %esp,%esi 304 movl %eax,%edi 305 movl %ebx,%ecx 306 jmp .L009ecb_loop 307.L016ecb_exit: 308 movl $1,%eax 309 leal 4(%esp),%esp 310.L006ecb_abort: 311 popl %edi 312 popl %esi 313 popl %ebx 314 popl %ebp 315 ret 316.size padlock_ecb_encrypt,.-.L_padlock_ecb_encrypt_begin 317.globl padlock_cbc_encrypt 318.type padlock_cbc_encrypt,@function 319.align 16 320padlock_cbc_encrypt: 321.L_padlock_cbc_encrypt_begin: 322 pushl %ebp 323 pushl %ebx 324 pushl %esi 325 pushl %edi 326 movl 20(%esp),%edi 327 movl 24(%esp),%esi 328 movl 28(%esp),%edx 329 movl 32(%esp),%ecx 330 testl $15,%edx 331 jnz .L018cbc_abort 332 testl $15,%ecx 333 jnz .L018cbc_abort 334 leal .Lpadlock_saved_context-.L019cbc_pic_point,%eax 335 pushfl 336 cld 337 call _padlock_verify_ctx 338.L019cbc_pic_point: 339 leal 16(%edx),%edx 340 xorl %eax,%eax 341 xorl %ebx,%ebx 342 testl $32,(%edx) 343 jnz .L020cbc_aligned 344 testl $15,%edi 345 setz %al 346 testl $15,%esi 347 setz %bl 348 testl %ebx,%eax 349 jnz .L020cbc_aligned 350 negl %eax 351 movl $512,%ebx 352 notl %eax 353 leal -24(%esp),%ebp 354 cmpl %ebx,%ecx 355 cmovcl %ecx,%ebx 356 andl %ebx,%eax 357 movl %ecx,%ebx 358 negl %eax 359 andl $511,%ebx 360 leal (%eax,%ebp,1),%esp 361 movl $512,%eax 362 cmovzl %eax,%ebx 363 movl %ebp,%eax 364 andl $-16,%ebp 365 andl $-16,%esp 366 movl %eax,16(%ebp) 367 cmpl %ebx,%ecx 368 ja .L021cbc_loop 369 movl %esi,%eax 370 cmpl %esp,%ebp 371 cmovel %edi,%eax 372 addl %ecx,%eax 373 negl %eax 374 andl $4095,%eax 375 cmpl $64,%eax 376 movl $-64,%eax 377 cmovael %ebx,%eax 378 andl %eax,%ebx 379 jz .L022cbc_unaligned_tail 380 jmp .L021cbc_loop 381.align 16 382.L021cbc_loop: 383 movl %edi,(%ebp) 384 movl %esi,4(%ebp) 385 movl %ecx,8(%ebp) 386 movl %ebx,%ecx 387 movl %ebx,12(%ebp) 388 testl $15,%edi 389 cmovnzl %esp,%edi 390 testl $15,%esi 391 jz .L023cbc_inp_aligned 392 shrl $2,%ecx 393.byte 243,165 394 subl %ebx,%edi 395 movl %ebx,%ecx 396 movl %edi,%esi 397.L023cbc_inp_aligned: 398 leal -16(%edx),%eax 399 leal 16(%edx),%ebx 400 shrl $4,%ecx 401.byte 243,15,167,208 402 movaps (%eax),%xmm0 403 movaps %xmm0,-16(%edx) 404 movl (%ebp),%edi 405 movl 12(%ebp),%ebx 406 testl $15,%edi 407 jz .L024cbc_out_aligned 408 movl %ebx,%ecx 409 leal (%esp),%esi 410 shrl $2,%ecx 411.byte 243,165 412 subl %ebx,%edi 413.L024cbc_out_aligned: 414 movl 4(%ebp),%esi 415 movl 8(%ebp),%ecx 416 addl %ebx,%edi 417 addl %ebx,%esi 418 subl %ebx,%ecx 419 movl $512,%ebx 420 jz .L025cbc_break 421 cmpl %ebx,%ecx 422 jae .L021cbc_loop 423.L022cbc_unaligned_tail: 424 xorl %eax,%eax 425 cmpl %ebp,%esp 426 cmovel %ecx,%eax 427 subl %eax,%esp 428 movl %edi,%eax 429 movl %ecx,%ebx 430 shrl $2,%ecx 431 leal (%esp),%edi 432.byte 243,165 433 movl %esp,%esi 434 movl %eax,%edi 435 movl %ebx,%ecx 436 jmp .L021cbc_loop 437.align 16 438.L025cbc_break: 439 cmpl %ebp,%esp 440 je .L026cbc_done 441 pxor %xmm0,%xmm0 442 leal (%esp),%eax 443.L027cbc_bzero: 444 movaps %xmm0,(%eax) 445 leal 16(%eax),%eax 446 cmpl %eax,%ebp 447 ja .L027cbc_bzero 448.L026cbc_done: 449 movl 16(%ebp),%ebp 450 leal 24(%ebp),%esp 451 jmp .L028cbc_exit 452.align 16 453.L020cbc_aligned: 454 leal (%esi,%ecx,1),%ebp 455 negl %ebp 456 andl $4095,%ebp 457 xorl %eax,%eax 458 cmpl $64,%ebp 459 movl $63,%ebp 460 cmovael %eax,%ebp 461 andl %ecx,%ebp 462 subl %ebp,%ecx 463 jz .L029cbc_aligned_tail 464 leal -16(%edx),%eax 465 leal 16(%edx),%ebx 466 shrl $4,%ecx 467.byte 243,15,167,208 468 movaps (%eax),%xmm0 469 movaps %xmm0,-16(%edx) 470 testl %ebp,%ebp 471 jz .L028cbc_exit 472.L029cbc_aligned_tail: 473 movl %ebp,%ecx 474 leal -24(%esp),%ebp 475 movl %ebp,%esp 476 movl %ebp,%eax 477 subl %ecx,%esp 478 andl $-16,%ebp 479 andl $-16,%esp 480 movl %eax,16(%ebp) 481 movl %edi,%eax 482 movl %ecx,%ebx 483 shrl $2,%ecx 484 leal (%esp),%edi 485.byte 243,165 486 movl %esp,%esi 487 movl %eax,%edi 488 movl %ebx,%ecx 489 jmp .L021cbc_loop 490.L028cbc_exit: 491 movl $1,%eax 492 leal 4(%esp),%esp 493.L018cbc_abort: 494 popl %edi 495 popl %esi 496 popl %ebx 497 popl %ebp 498 ret 499.size padlock_cbc_encrypt,.-.L_padlock_cbc_encrypt_begin 500.globl padlock_cfb_encrypt 501.type padlock_cfb_encrypt,@function 502.align 16 503padlock_cfb_encrypt: 504.L_padlock_cfb_encrypt_begin: 505 pushl %ebp 506 pushl %ebx 507 pushl %esi 508 pushl %edi 509 movl 20(%esp),%edi 510 movl 24(%esp),%esi 511 movl 28(%esp),%edx 512 movl 32(%esp),%ecx 513 testl $15,%edx 514 jnz .L030cfb_abort 515 testl $15,%ecx 516 jnz .L030cfb_abort 517 leal .Lpadlock_saved_context-.L031cfb_pic_point,%eax 518 pushfl 519 cld 520 call _padlock_verify_ctx 521.L031cfb_pic_point: 522 leal 16(%edx),%edx 523 xorl %eax,%eax 524 xorl %ebx,%ebx 525 testl $32,(%edx) 526 jnz .L032cfb_aligned 527 testl $15,%edi 528 setz %al 529 testl $15,%esi 530 setz %bl 531 testl %ebx,%eax 532 jnz .L032cfb_aligned 533 negl %eax 534 movl $512,%ebx 535 notl %eax 536 leal -24(%esp),%ebp 537 cmpl %ebx,%ecx 538 cmovcl %ecx,%ebx 539 andl %ebx,%eax 540 movl %ecx,%ebx 541 negl %eax 542 andl $511,%ebx 543 leal (%eax,%ebp,1),%esp 544 movl $512,%eax 545 cmovzl %eax,%ebx 546 movl %ebp,%eax 547 andl $-16,%ebp 548 andl $-16,%esp 549 movl %eax,16(%ebp) 550 jmp .L033cfb_loop 551.align 16 552.L033cfb_loop: 553 movl %edi,(%ebp) 554 movl %esi,4(%ebp) 555 movl %ecx,8(%ebp) 556 movl %ebx,%ecx 557 movl %ebx,12(%ebp) 558 testl $15,%edi 559 cmovnzl %esp,%edi 560 testl $15,%esi 561 jz .L034cfb_inp_aligned 562 shrl $2,%ecx 563.byte 243,165 564 subl %ebx,%edi 565 movl %ebx,%ecx 566 movl %edi,%esi 567.L034cfb_inp_aligned: 568 leal -16(%edx),%eax 569 leal 16(%edx),%ebx 570 shrl $4,%ecx 571.byte 243,15,167,224 572 movaps (%eax),%xmm0 573 movaps %xmm0,-16(%edx) 574 movl (%ebp),%edi 575 movl 12(%ebp),%ebx 576 testl $15,%edi 577 jz .L035cfb_out_aligned 578 movl %ebx,%ecx 579 leal (%esp),%esi 580 shrl $2,%ecx 581.byte 243,165 582 subl %ebx,%edi 583.L035cfb_out_aligned: 584 movl 4(%ebp),%esi 585 movl 8(%ebp),%ecx 586 addl %ebx,%edi 587 addl %ebx,%esi 588 subl %ebx,%ecx 589 movl $512,%ebx 590 jnz .L033cfb_loop 591 cmpl %ebp,%esp 592 je .L036cfb_done 593 pxor %xmm0,%xmm0 594 leal (%esp),%eax 595.L037cfb_bzero: 596 movaps %xmm0,(%eax) 597 leal 16(%eax),%eax 598 cmpl %eax,%ebp 599 ja .L037cfb_bzero 600.L036cfb_done: 601 movl 16(%ebp),%ebp 602 leal 24(%ebp),%esp 603 jmp .L038cfb_exit 604.align 16 605.L032cfb_aligned: 606 leal -16(%edx),%eax 607 leal 16(%edx),%ebx 608 shrl $4,%ecx 609.byte 243,15,167,224 610 movaps (%eax),%xmm0 611 movaps %xmm0,-16(%edx) 612.L038cfb_exit: 613 movl $1,%eax 614 leal 4(%esp),%esp 615.L030cfb_abort: 616 popl %edi 617 popl %esi 618 popl %ebx 619 popl %ebp 620 ret 621.size padlock_cfb_encrypt,.-.L_padlock_cfb_encrypt_begin 622.globl padlock_ofb_encrypt 623.type padlock_ofb_encrypt,@function 624.align 16 625padlock_ofb_encrypt: 626.L_padlock_ofb_encrypt_begin: 627 pushl %ebp 628 pushl %ebx 629 pushl %esi 630 pushl %edi 631 movl 20(%esp),%edi 632 movl 24(%esp),%esi 633 movl 28(%esp),%edx 634 movl 32(%esp),%ecx 635 testl $15,%edx 636 jnz .L039ofb_abort 637 testl $15,%ecx 638 jnz .L039ofb_abort 639 leal .Lpadlock_saved_context-.L040ofb_pic_point,%eax 640 pushfl 641 cld 642 call _padlock_verify_ctx 643.L040ofb_pic_point: 644 leal 16(%edx),%edx 645 xorl %eax,%eax 646 xorl %ebx,%ebx 647 testl $32,(%edx) 648 jnz .L041ofb_aligned 649 testl $15,%edi 650 setz %al 651 testl $15,%esi 652 setz %bl 653 testl %ebx,%eax 654 jnz .L041ofb_aligned 655 negl %eax 656 movl $512,%ebx 657 notl %eax 658 leal -24(%esp),%ebp 659 cmpl %ebx,%ecx 660 cmovcl %ecx,%ebx 661 andl %ebx,%eax 662 movl %ecx,%ebx 663 negl %eax 664 andl $511,%ebx 665 leal (%eax,%ebp,1),%esp 666 movl $512,%eax 667 cmovzl %eax,%ebx 668 movl %ebp,%eax 669 andl $-16,%ebp 670 andl $-16,%esp 671 movl %eax,16(%ebp) 672 jmp .L042ofb_loop 673.align 16 674.L042ofb_loop: 675 movl %edi,(%ebp) 676 movl %esi,4(%ebp) 677 movl %ecx,8(%ebp) 678 movl %ebx,%ecx 679 movl %ebx,12(%ebp) 680 testl $15,%edi 681 cmovnzl %esp,%edi 682 testl $15,%esi 683 jz .L043ofb_inp_aligned 684 shrl $2,%ecx 685.byte 243,165 686 subl %ebx,%edi 687 movl %ebx,%ecx 688 movl %edi,%esi 689.L043ofb_inp_aligned: 690 leal -16(%edx),%eax 691 leal 16(%edx),%ebx 692 shrl $4,%ecx 693.byte 243,15,167,232 694 movaps (%eax),%xmm0 695 movaps %xmm0,-16(%edx) 696 movl (%ebp),%edi 697 movl 12(%ebp),%ebx 698 testl $15,%edi 699 jz .L044ofb_out_aligned 700 movl %ebx,%ecx 701 leal (%esp),%esi 702 shrl $2,%ecx 703.byte 243,165 704 subl %ebx,%edi 705.L044ofb_out_aligned: 706 movl 4(%ebp),%esi 707 movl 8(%ebp),%ecx 708 addl %ebx,%edi 709 addl %ebx,%esi 710 subl %ebx,%ecx 711 movl $512,%ebx 712 jnz .L042ofb_loop 713 cmpl %ebp,%esp 714 je .L045ofb_done 715 pxor %xmm0,%xmm0 716 leal (%esp),%eax 717.L046ofb_bzero: 718 movaps %xmm0,(%eax) 719 leal 16(%eax),%eax 720 cmpl %eax,%ebp 721 ja .L046ofb_bzero 722.L045ofb_done: 723 movl 16(%ebp),%ebp 724 leal 24(%ebp),%esp 725 jmp .L047ofb_exit 726.align 16 727.L041ofb_aligned: 728 leal -16(%edx),%eax 729 leal 16(%edx),%ebx 730 shrl $4,%ecx 731.byte 243,15,167,232 732 movaps (%eax),%xmm0 733 movaps %xmm0,-16(%edx) 734.L047ofb_exit: 735 movl $1,%eax 736 leal 4(%esp),%esp 737.L039ofb_abort: 738 popl %edi 739 popl %esi 740 popl %ebx 741 popl %ebp 742 ret 743.size padlock_ofb_encrypt,.-.L_padlock_ofb_encrypt_begin 744.globl padlock_ctr32_encrypt 745.type padlock_ctr32_encrypt,@function 746.align 16 747padlock_ctr32_encrypt: 748.L_padlock_ctr32_encrypt_begin: 749 pushl %ebp 750 pushl %ebx 751 pushl %esi 752 pushl %edi 753 movl 20(%esp),%edi 754 movl 24(%esp),%esi 755 movl 28(%esp),%edx 756 movl 32(%esp),%ecx 757 testl $15,%edx 758 jnz .L048ctr32_abort 759 testl $15,%ecx 760 jnz .L048ctr32_abort 761 leal .Lpadlock_saved_context-.L049ctr32_pic_point,%eax 762 pushfl 763 cld 764 call _padlock_verify_ctx 765.L049ctr32_pic_point: 766 leal 16(%edx),%edx 767 xorl %eax,%eax 768 movq -16(%edx),%mm0 769 movl $512,%ebx 770 notl %eax 771 leal -24(%esp),%ebp 772 cmpl %ebx,%ecx 773 cmovcl %ecx,%ebx 774 andl %ebx,%eax 775 movl %ecx,%ebx 776 negl %eax 777 andl $511,%ebx 778 leal (%eax,%ebp,1),%esp 779 movl $512,%eax 780 cmovzl %eax,%ebx 781 movl %ebp,%eax 782 andl $-16,%ebp 783 andl $-16,%esp 784 movl %eax,16(%ebp) 785 jmp .L050ctr32_loop 786.align 16 787.L050ctr32_loop: 788 movl %edi,(%ebp) 789 movl %esi,4(%ebp) 790 movl %ecx,8(%ebp) 791 movl %ebx,%ecx 792 movl %ebx,12(%ebp) 793 movl -4(%edx),%ecx 794 xorl %edi,%edi 795 movl -8(%edx),%eax 796.L051ctr32_prepare: 797 movl %ecx,12(%esp,%edi,1) 798 bswap %ecx 799 movq %mm0,(%esp,%edi,1) 800 incl %ecx 801 movl %eax,8(%esp,%edi,1) 802 bswap %ecx 803 leal 16(%edi),%edi 804 cmpl %ebx,%edi 805 jb .L051ctr32_prepare 806 movl %ecx,-4(%edx) 807 leal (%esp),%esi 808 leal (%esp),%edi 809 movl %ebx,%ecx 810 leal -16(%edx),%eax 811 leal 16(%edx),%ebx 812 shrl $4,%ecx 813.byte 243,15,167,200 814 movl (%ebp),%edi 815 movl 12(%ebp),%ebx 816 movl 4(%ebp),%esi 817 xorl %ecx,%ecx 818.L052ctr32_xor: 819 movups (%esi,%ecx,1),%xmm1 820 leal 16(%ecx),%ecx 821 pxor -16(%esp,%ecx,1),%xmm1 822 movups %xmm1,-16(%edi,%ecx,1) 823 cmpl %ebx,%ecx 824 jb .L052ctr32_xor 825 movl 8(%ebp),%ecx 826 addl %ebx,%edi 827 addl %ebx,%esi 828 subl %ebx,%ecx 829 movl $512,%ebx 830 jnz .L050ctr32_loop 831 pxor %xmm0,%xmm0 832 leal (%esp),%eax 833.L053ctr32_bzero: 834 movaps %xmm0,(%eax) 835 leal 16(%eax),%eax 836 cmpl %eax,%ebp 837 ja .L053ctr32_bzero 838.L054ctr32_done: 839 movl 16(%ebp),%ebp 840 leal 24(%ebp),%esp 841 movl $1,%eax 842 leal 4(%esp),%esp 843 emms 844.L048ctr32_abort: 845 popl %edi 846 popl %esi 847 popl %ebx 848 popl %ebp 849 ret 850.size padlock_ctr32_encrypt,.-.L_padlock_ctr32_encrypt_begin 851.globl padlock_xstore 852.type padlock_xstore,@function 853.align 16 854padlock_xstore: 855.L_padlock_xstore_begin: 856 pushl %edi 857 movl 8(%esp),%edi 858 movl 12(%esp),%edx 859.byte 15,167,192 860 popl %edi 861 ret 862.size padlock_xstore,.-.L_padlock_xstore_begin 863.type _win32_segv_handler,@function 864.align 16 865_win32_segv_handler: 866 movl $1,%eax 867 movl 4(%esp),%edx 868 movl 12(%esp),%ecx 869 cmpl $3221225477,(%edx) 870 jne .L055ret 871 addl $4,184(%ecx) 872 movl $0,%eax 873.L055ret: 874 ret 875.size _win32_segv_handler,.-_win32_segv_handler 876.globl padlock_sha1_oneshot 877.type padlock_sha1_oneshot,@function 878.align 16 879padlock_sha1_oneshot: 880.L_padlock_sha1_oneshot_begin: 881 pushl %edi 882 pushl %esi 883 xorl %eax,%eax 884 movl 12(%esp),%edi 885 movl 16(%esp),%esi 886 movl 20(%esp),%ecx 887 movl %esp,%edx 888 addl $-128,%esp 889 movups (%edi),%xmm0 890 andl $-16,%esp 891 movl 16(%edi),%eax 892 movaps %xmm0,(%esp) 893 movl %esp,%edi 894 movl %eax,16(%esp) 895 xorl %eax,%eax 896.byte 243,15,166,200 897 movaps (%esp),%xmm0 898 movl 16(%esp),%eax 899 movl %edx,%esp 900 movl 12(%esp),%edi 901 movups %xmm0,(%edi) 902 movl %eax,16(%edi) 903 popl %esi 904 popl %edi 905 ret 906.size padlock_sha1_oneshot,.-.L_padlock_sha1_oneshot_begin 907.globl padlock_sha1_blocks 908.type padlock_sha1_blocks,@function 909.align 16 910padlock_sha1_blocks: 911.L_padlock_sha1_blocks_begin: 912 pushl %edi 913 pushl %esi 914 movl 12(%esp),%edi 915 movl 16(%esp),%esi 916 movl %esp,%edx 917 movl 20(%esp),%ecx 918 addl $-128,%esp 919 movups (%edi),%xmm0 920 andl $-16,%esp 921 movl 16(%edi),%eax 922 movaps %xmm0,(%esp) 923 movl %esp,%edi 924 movl %eax,16(%esp) 925 movl $-1,%eax 926.byte 243,15,166,200 927 movaps (%esp),%xmm0 928 movl 16(%esp),%eax 929 movl %edx,%esp 930 movl 12(%esp),%edi 931 movups %xmm0,(%edi) 932 movl %eax,16(%edi) 933 popl %esi 934 popl %edi 935 ret 936.size padlock_sha1_blocks,.-.L_padlock_sha1_blocks_begin 937.globl padlock_sha256_oneshot 938.type padlock_sha256_oneshot,@function 939.align 16 940padlock_sha256_oneshot: 941.L_padlock_sha256_oneshot_begin: 942 pushl %edi 943 pushl %esi 944 xorl %eax,%eax 945 movl 12(%esp),%edi 946 movl 16(%esp),%esi 947 movl 20(%esp),%ecx 948 movl %esp,%edx 949 addl $-128,%esp 950 movups (%edi),%xmm0 951 andl $-16,%esp 952 movups 16(%edi),%xmm1 953 movaps %xmm0,(%esp) 954 movl %esp,%edi 955 movaps %xmm1,16(%esp) 956 xorl %eax,%eax 957.byte 243,15,166,208 958 movaps (%esp),%xmm0 959 movaps 16(%esp),%xmm1 960 movl %edx,%esp 961 movl 12(%esp),%edi 962 movups %xmm0,(%edi) 963 movups %xmm1,16(%edi) 964 popl %esi 965 popl %edi 966 ret 967.size padlock_sha256_oneshot,.-.L_padlock_sha256_oneshot_begin 968.globl padlock_sha256_blocks 969.type padlock_sha256_blocks,@function 970.align 16 971padlock_sha256_blocks: 972.L_padlock_sha256_blocks_begin: 973 pushl %edi 974 pushl %esi 975 movl 12(%esp),%edi 976 movl 16(%esp),%esi 977 movl 20(%esp),%ecx 978 movl %esp,%edx 979 addl $-128,%esp 980 movups (%edi),%xmm0 981 andl $-16,%esp 982 movups 16(%edi),%xmm1 983 movaps %xmm0,(%esp) 984 movl %esp,%edi 985 movaps %xmm1,16(%esp) 986 movl $-1,%eax 987.byte 243,15,166,208 988 movaps (%esp),%xmm0 989 movaps 16(%esp),%xmm1 990 movl %edx,%esp 991 movl 12(%esp),%edi 992 movups %xmm0,(%edi) 993 movups %xmm1,16(%edi) 994 popl %esi 995 popl %edi 996 ret 997.size padlock_sha256_blocks,.-.L_padlock_sha256_blocks_begin 998.globl padlock_sha512_blocks 999.type padlock_sha512_blocks,@function 1000.align 16 1001padlock_sha512_blocks: 1002.L_padlock_sha512_blocks_begin: 1003 pushl %edi 1004 pushl %esi 1005 movl 12(%esp),%edi 1006 movl 16(%esp),%esi 1007 movl 20(%esp),%ecx 1008 movl %esp,%edx 1009 addl $-128,%esp 1010 movups (%edi),%xmm0 1011 andl $-16,%esp 1012 movups 16(%edi),%xmm1 1013 movups 32(%edi),%xmm2 1014 movups 48(%edi),%xmm3 1015 movaps %xmm0,(%esp) 1016 movl %esp,%edi 1017 movaps %xmm1,16(%esp) 1018 movaps %xmm2,32(%esp) 1019 movaps %xmm3,48(%esp) 1020.byte 243,15,166,224 1021 movaps (%esp),%xmm0 1022 movaps 16(%esp),%xmm1 1023 movaps 32(%esp),%xmm2 1024 movaps 48(%esp),%xmm3 1025 movl %edx,%esp 1026 movl 12(%esp),%edi 1027 movups %xmm0,(%edi) 1028 movups %xmm1,16(%edi) 1029 movups %xmm2,32(%edi) 1030 movups %xmm3,48(%edi) 1031 popl %esi 1032 popl %edi 1033 ret 1034.size padlock_sha512_blocks,.-.L_padlock_sha512_blocks_begin 1035.byte 86,73,65,32,80,97,100,108,111,99,107,32,120,56,54,32 1036.byte 109,111,100,117,108,101,44,32,67,82,89,80,84,79,71,65 1037.byte 77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101 1038.byte 110,115,115,108,46,111,114,103,62,0 1039.align 16 1040.data 1041.align 4 1042.Lpadlock_saved_context: 1043.long 0 1044#else 1045.text 1046.globl padlock_capability 1047.type padlock_capability,@function 1048.align 16 1049padlock_capability: 1050.L_padlock_capability_begin: 1051 pushl %ebx 1052 pushfl 1053 popl %eax 1054 movl %eax,%ecx 1055 xorl $2097152,%eax 1056 pushl %eax 1057 popfl 1058 pushfl 1059 popl %eax 1060 xorl %eax,%ecx 1061 xorl %eax,%eax 1062 btl $21,%ecx 1063 jnc .L000noluck 1064 .byte 0x0f,0xa2 1065 xorl %eax,%eax 1066 cmpl $0x746e6543,%ebx 1067 jne .L001zhaoxin 1068 cmpl $0x48727561,%edx 1069 jne .L000noluck 1070 cmpl $0x736c7561,%ecx 1071 jne .L000noluck 1072 jmp .L002zhaoxinEnd 1073.L001zhaoxin: 1074 cmpl $0x68532020,%ebx 1075 jne .L000noluck 1076 cmpl $0x68676e61,%edx 1077 jne .L000noluck 1078 cmpl $0x20206961,%ecx 1079 jne .L000noluck 1080.L002zhaoxinEnd: 1081 movl $3221225472,%eax 1082 .byte 0x0f,0xa2 1083 movl %eax,%edx 1084 xorl %eax,%eax 1085 cmpl $3221225473,%edx 1086 jb .L000noluck 1087 movl $1,%eax 1088 .byte 0x0f,0xa2 1089 orl $15,%eax 1090 xorl %ebx,%ebx 1091 andl $4095,%eax 1092 cmpl $1791,%eax 1093 sete %bl 1094 movl $3221225473,%eax 1095 pushl %ebx 1096 .byte 0x0f,0xa2 1097 popl %ebx 1098 movl %edx,%eax 1099 shll $4,%ebx 1100 andl $4294967279,%eax 1101 orl %ebx,%eax 1102.L000noluck: 1103 popl %ebx 1104 ret 1105.size padlock_capability,.-.L_padlock_capability_begin 1106.globl padlock_key_bswap 1107.type padlock_key_bswap,@function 1108.align 16 1109padlock_key_bswap: 1110.L_padlock_key_bswap_begin: 1111 movl 4(%esp),%edx 1112 movl 240(%edx),%ecx 1113 incl %ecx 1114 shll $2,%ecx 1115.L003bswap_loop: 1116 movl (%edx),%eax 1117 bswap %eax 1118 movl %eax,(%edx) 1119 leal 4(%edx),%edx 1120 subl $1,%ecx 1121 jnz .L003bswap_loop 1122 ret 1123.size padlock_key_bswap,.-.L_padlock_key_bswap_begin 1124.globl padlock_verify_context 1125.type padlock_verify_context,@function 1126.align 16 1127padlock_verify_context: 1128.L_padlock_verify_context_begin: 1129 movl 4(%esp),%edx 1130 leal .Lpadlock_saved_context-.L004verify_pic_point,%eax 1131 pushfl 1132 call _padlock_verify_ctx 1133.L004verify_pic_point: 1134 leal 4(%esp),%esp 1135 ret 1136.size padlock_verify_context,.-.L_padlock_verify_context_begin 1137.type _padlock_verify_ctx,@function 1138.align 16 1139_padlock_verify_ctx: 1140 addl (%esp),%eax 1141 btl $30,4(%esp) 1142 jnc .L005verified 1143 cmpl (%eax),%edx 1144 je .L005verified 1145 pushfl 1146 popfl 1147.L005verified: 1148 movl %edx,(%eax) 1149 ret 1150.size _padlock_verify_ctx,.-_padlock_verify_ctx 1151.globl padlock_reload_key 1152.type padlock_reload_key,@function 1153.align 16 1154padlock_reload_key: 1155.L_padlock_reload_key_begin: 1156 pushfl 1157 popfl 1158 ret 1159.size padlock_reload_key,.-.L_padlock_reload_key_begin 1160.globl padlock_aes_block 1161.type padlock_aes_block,@function 1162.align 16 1163padlock_aes_block: 1164.L_padlock_aes_block_begin: 1165 pushl %edi 1166 pushl %esi 1167 pushl %ebx 1168 movl 16(%esp),%edi 1169 movl 20(%esp),%esi 1170 movl 24(%esp),%edx 1171 movl $1,%ecx 1172 leal 32(%edx),%ebx 1173 leal 16(%edx),%edx 1174.byte 243,15,167,200 1175 popl %ebx 1176 popl %esi 1177 popl %edi 1178 ret 1179.size padlock_aes_block,.-.L_padlock_aes_block_begin 1180.globl padlock_ecb_encrypt 1181.type padlock_ecb_encrypt,@function 1182.align 16 1183padlock_ecb_encrypt: 1184.L_padlock_ecb_encrypt_begin: 1185 pushl %ebp 1186 pushl %ebx 1187 pushl %esi 1188 pushl %edi 1189 movl 20(%esp),%edi 1190 movl 24(%esp),%esi 1191 movl 28(%esp),%edx 1192 movl 32(%esp),%ecx 1193 testl $15,%edx 1194 jnz .L006ecb_abort 1195 testl $15,%ecx 1196 jnz .L006ecb_abort 1197 leal .Lpadlock_saved_context-.L007ecb_pic_point,%eax 1198 pushfl 1199 cld 1200 call _padlock_verify_ctx 1201.L007ecb_pic_point: 1202 leal 16(%edx),%edx 1203 xorl %eax,%eax 1204 xorl %ebx,%ebx 1205 testl $32,(%edx) 1206 jnz .L008ecb_aligned 1207 testl $15,%edi 1208 setz %al 1209 testl $15,%esi 1210 setz %bl 1211 testl %ebx,%eax 1212 jnz .L008ecb_aligned 1213 negl %eax 1214 movl $512,%ebx 1215 notl %eax 1216 leal -24(%esp),%ebp 1217 cmpl %ebx,%ecx 1218 cmovcl %ecx,%ebx 1219 andl %ebx,%eax 1220 movl %ecx,%ebx 1221 negl %eax 1222 andl $511,%ebx 1223 leal (%eax,%ebp,1),%esp 1224 movl $512,%eax 1225 cmovzl %eax,%ebx 1226 movl %ebp,%eax 1227 andl $-16,%ebp 1228 andl $-16,%esp 1229 movl %eax,16(%ebp) 1230 cmpl %ebx,%ecx 1231 ja .L009ecb_loop 1232 movl %esi,%eax 1233 cmpl %esp,%ebp 1234 cmovel %edi,%eax 1235 addl %ecx,%eax 1236 negl %eax 1237 andl $4095,%eax 1238 cmpl $128,%eax 1239 movl $-128,%eax 1240 cmovael %ebx,%eax 1241 andl %eax,%ebx 1242 jz .L010ecb_unaligned_tail 1243 jmp .L009ecb_loop 1244.align 16 1245.L009ecb_loop: 1246 movl %edi,(%ebp) 1247 movl %esi,4(%ebp) 1248 movl %ecx,8(%ebp) 1249 movl %ebx,%ecx 1250 movl %ebx,12(%ebp) 1251 testl $15,%edi 1252 cmovnzl %esp,%edi 1253 testl $15,%esi 1254 jz .L011ecb_inp_aligned 1255 shrl $2,%ecx 1256.byte 243,165 1257 subl %ebx,%edi 1258 movl %ebx,%ecx 1259 movl %edi,%esi 1260.L011ecb_inp_aligned: 1261 leal -16(%edx),%eax 1262 leal 16(%edx),%ebx 1263 shrl $4,%ecx 1264.byte 243,15,167,200 1265 movl (%ebp),%edi 1266 movl 12(%ebp),%ebx 1267 testl $15,%edi 1268 jz .L012ecb_out_aligned 1269 movl %ebx,%ecx 1270 leal (%esp),%esi 1271 shrl $2,%ecx 1272.byte 243,165 1273 subl %ebx,%edi 1274.L012ecb_out_aligned: 1275 movl 4(%ebp),%esi 1276 movl 8(%ebp),%ecx 1277 addl %ebx,%edi 1278 addl %ebx,%esi 1279 subl %ebx,%ecx 1280 movl $512,%ebx 1281 jz .L013ecb_break 1282 cmpl %ebx,%ecx 1283 jae .L009ecb_loop 1284.L010ecb_unaligned_tail: 1285 xorl %eax,%eax 1286 cmpl %ebp,%esp 1287 cmovel %ecx,%eax 1288 subl %eax,%esp 1289 movl %edi,%eax 1290 movl %ecx,%ebx 1291 shrl $2,%ecx 1292 leal (%esp),%edi 1293.byte 243,165 1294 movl %esp,%esi 1295 movl %eax,%edi 1296 movl %ebx,%ecx 1297 jmp .L009ecb_loop 1298.align 16 1299.L013ecb_break: 1300 cmpl %ebp,%esp 1301 je .L014ecb_done 1302 pxor %xmm0,%xmm0 1303 leal (%esp),%eax 1304.L015ecb_bzero: 1305 movaps %xmm0,(%eax) 1306 leal 16(%eax),%eax 1307 cmpl %eax,%ebp 1308 ja .L015ecb_bzero 1309.L014ecb_done: 1310 movl 16(%ebp),%ebp 1311 leal 24(%ebp),%esp 1312 jmp .L016ecb_exit 1313.align 16 1314.L008ecb_aligned: 1315 leal (%esi,%ecx,1),%ebp 1316 negl %ebp 1317 andl $4095,%ebp 1318 xorl %eax,%eax 1319 cmpl $128,%ebp 1320 movl $127,%ebp 1321 cmovael %eax,%ebp 1322 andl %ecx,%ebp 1323 subl %ebp,%ecx 1324 jz .L017ecb_aligned_tail 1325 leal -16(%edx),%eax 1326 leal 16(%edx),%ebx 1327 shrl $4,%ecx 1328.byte 243,15,167,200 1329 testl %ebp,%ebp 1330 jz .L016ecb_exit 1331.L017ecb_aligned_tail: 1332 movl %ebp,%ecx 1333 leal -24(%esp),%ebp 1334 movl %ebp,%esp 1335 movl %ebp,%eax 1336 subl %ecx,%esp 1337 andl $-16,%ebp 1338 andl $-16,%esp 1339 movl %eax,16(%ebp) 1340 movl %edi,%eax 1341 movl %ecx,%ebx 1342 shrl $2,%ecx 1343 leal (%esp),%edi 1344.byte 243,165 1345 movl %esp,%esi 1346 movl %eax,%edi 1347 movl %ebx,%ecx 1348 jmp .L009ecb_loop 1349.L016ecb_exit: 1350 movl $1,%eax 1351 leal 4(%esp),%esp 1352.L006ecb_abort: 1353 popl %edi 1354 popl %esi 1355 popl %ebx 1356 popl %ebp 1357 ret 1358.size padlock_ecb_encrypt,.-.L_padlock_ecb_encrypt_begin 1359.globl padlock_cbc_encrypt 1360.type padlock_cbc_encrypt,@function 1361.align 16 1362padlock_cbc_encrypt: 1363.L_padlock_cbc_encrypt_begin: 1364 pushl %ebp 1365 pushl %ebx 1366 pushl %esi 1367 pushl %edi 1368 movl 20(%esp),%edi 1369 movl 24(%esp),%esi 1370 movl 28(%esp),%edx 1371 movl 32(%esp),%ecx 1372 testl $15,%edx 1373 jnz .L018cbc_abort 1374 testl $15,%ecx 1375 jnz .L018cbc_abort 1376 leal .Lpadlock_saved_context-.L019cbc_pic_point,%eax 1377 pushfl 1378 cld 1379 call _padlock_verify_ctx 1380.L019cbc_pic_point: 1381 leal 16(%edx),%edx 1382 xorl %eax,%eax 1383 xorl %ebx,%ebx 1384 testl $32,(%edx) 1385 jnz .L020cbc_aligned 1386 testl $15,%edi 1387 setz %al 1388 testl $15,%esi 1389 setz %bl 1390 testl %ebx,%eax 1391 jnz .L020cbc_aligned 1392 negl %eax 1393 movl $512,%ebx 1394 notl %eax 1395 leal -24(%esp),%ebp 1396 cmpl %ebx,%ecx 1397 cmovcl %ecx,%ebx 1398 andl %ebx,%eax 1399 movl %ecx,%ebx 1400 negl %eax 1401 andl $511,%ebx 1402 leal (%eax,%ebp,1),%esp 1403 movl $512,%eax 1404 cmovzl %eax,%ebx 1405 movl %ebp,%eax 1406 andl $-16,%ebp 1407 andl $-16,%esp 1408 movl %eax,16(%ebp) 1409 cmpl %ebx,%ecx 1410 ja .L021cbc_loop 1411 movl %esi,%eax 1412 cmpl %esp,%ebp 1413 cmovel %edi,%eax 1414 addl %ecx,%eax 1415 negl %eax 1416 andl $4095,%eax 1417 cmpl $64,%eax 1418 movl $-64,%eax 1419 cmovael %ebx,%eax 1420 andl %eax,%ebx 1421 jz .L022cbc_unaligned_tail 1422 jmp .L021cbc_loop 1423.align 16 1424.L021cbc_loop: 1425 movl %edi,(%ebp) 1426 movl %esi,4(%ebp) 1427 movl %ecx,8(%ebp) 1428 movl %ebx,%ecx 1429 movl %ebx,12(%ebp) 1430 testl $15,%edi 1431 cmovnzl %esp,%edi 1432 testl $15,%esi 1433 jz .L023cbc_inp_aligned 1434 shrl $2,%ecx 1435.byte 243,165 1436 subl %ebx,%edi 1437 movl %ebx,%ecx 1438 movl %edi,%esi 1439.L023cbc_inp_aligned: 1440 leal -16(%edx),%eax 1441 leal 16(%edx),%ebx 1442 shrl $4,%ecx 1443.byte 243,15,167,208 1444 movaps (%eax),%xmm0 1445 movaps %xmm0,-16(%edx) 1446 movl (%ebp),%edi 1447 movl 12(%ebp),%ebx 1448 testl $15,%edi 1449 jz .L024cbc_out_aligned 1450 movl %ebx,%ecx 1451 leal (%esp),%esi 1452 shrl $2,%ecx 1453.byte 243,165 1454 subl %ebx,%edi 1455.L024cbc_out_aligned: 1456 movl 4(%ebp),%esi 1457 movl 8(%ebp),%ecx 1458 addl %ebx,%edi 1459 addl %ebx,%esi 1460 subl %ebx,%ecx 1461 movl $512,%ebx 1462 jz .L025cbc_break 1463 cmpl %ebx,%ecx 1464 jae .L021cbc_loop 1465.L022cbc_unaligned_tail: 1466 xorl %eax,%eax 1467 cmpl %ebp,%esp 1468 cmovel %ecx,%eax 1469 subl %eax,%esp 1470 movl %edi,%eax 1471 movl %ecx,%ebx 1472 shrl $2,%ecx 1473 leal (%esp),%edi 1474.byte 243,165 1475 movl %esp,%esi 1476 movl %eax,%edi 1477 movl %ebx,%ecx 1478 jmp .L021cbc_loop 1479.align 16 1480.L025cbc_break: 1481 cmpl %ebp,%esp 1482 je .L026cbc_done 1483 pxor %xmm0,%xmm0 1484 leal (%esp),%eax 1485.L027cbc_bzero: 1486 movaps %xmm0,(%eax) 1487 leal 16(%eax),%eax 1488 cmpl %eax,%ebp 1489 ja .L027cbc_bzero 1490.L026cbc_done: 1491 movl 16(%ebp),%ebp 1492 leal 24(%ebp),%esp 1493 jmp .L028cbc_exit 1494.align 16 1495.L020cbc_aligned: 1496 leal (%esi,%ecx,1),%ebp 1497 negl %ebp 1498 andl $4095,%ebp 1499 xorl %eax,%eax 1500 cmpl $64,%ebp 1501 movl $63,%ebp 1502 cmovael %eax,%ebp 1503 andl %ecx,%ebp 1504 subl %ebp,%ecx 1505 jz .L029cbc_aligned_tail 1506 leal -16(%edx),%eax 1507 leal 16(%edx),%ebx 1508 shrl $4,%ecx 1509.byte 243,15,167,208 1510 movaps (%eax),%xmm0 1511 movaps %xmm0,-16(%edx) 1512 testl %ebp,%ebp 1513 jz .L028cbc_exit 1514.L029cbc_aligned_tail: 1515 movl %ebp,%ecx 1516 leal -24(%esp),%ebp 1517 movl %ebp,%esp 1518 movl %ebp,%eax 1519 subl %ecx,%esp 1520 andl $-16,%ebp 1521 andl $-16,%esp 1522 movl %eax,16(%ebp) 1523 movl %edi,%eax 1524 movl %ecx,%ebx 1525 shrl $2,%ecx 1526 leal (%esp),%edi 1527.byte 243,165 1528 movl %esp,%esi 1529 movl %eax,%edi 1530 movl %ebx,%ecx 1531 jmp .L021cbc_loop 1532.L028cbc_exit: 1533 movl $1,%eax 1534 leal 4(%esp),%esp 1535.L018cbc_abort: 1536 popl %edi 1537 popl %esi 1538 popl %ebx 1539 popl %ebp 1540 ret 1541.size padlock_cbc_encrypt,.-.L_padlock_cbc_encrypt_begin 1542.globl padlock_cfb_encrypt 1543.type padlock_cfb_encrypt,@function 1544.align 16 1545padlock_cfb_encrypt: 1546.L_padlock_cfb_encrypt_begin: 1547 pushl %ebp 1548 pushl %ebx 1549 pushl %esi 1550 pushl %edi 1551 movl 20(%esp),%edi 1552 movl 24(%esp),%esi 1553 movl 28(%esp),%edx 1554 movl 32(%esp),%ecx 1555 testl $15,%edx 1556 jnz .L030cfb_abort 1557 testl $15,%ecx 1558 jnz .L030cfb_abort 1559 leal .Lpadlock_saved_context-.L031cfb_pic_point,%eax 1560 pushfl 1561 cld 1562 call _padlock_verify_ctx 1563.L031cfb_pic_point: 1564 leal 16(%edx),%edx 1565 xorl %eax,%eax 1566 xorl %ebx,%ebx 1567 testl $32,(%edx) 1568 jnz .L032cfb_aligned 1569 testl $15,%edi 1570 setz %al 1571 testl $15,%esi 1572 setz %bl 1573 testl %ebx,%eax 1574 jnz .L032cfb_aligned 1575 negl %eax 1576 movl $512,%ebx 1577 notl %eax 1578 leal -24(%esp),%ebp 1579 cmpl %ebx,%ecx 1580 cmovcl %ecx,%ebx 1581 andl %ebx,%eax 1582 movl %ecx,%ebx 1583 negl %eax 1584 andl $511,%ebx 1585 leal (%eax,%ebp,1),%esp 1586 movl $512,%eax 1587 cmovzl %eax,%ebx 1588 movl %ebp,%eax 1589 andl $-16,%ebp 1590 andl $-16,%esp 1591 movl %eax,16(%ebp) 1592 jmp .L033cfb_loop 1593.align 16 1594.L033cfb_loop: 1595 movl %edi,(%ebp) 1596 movl %esi,4(%ebp) 1597 movl %ecx,8(%ebp) 1598 movl %ebx,%ecx 1599 movl %ebx,12(%ebp) 1600 testl $15,%edi 1601 cmovnzl %esp,%edi 1602 testl $15,%esi 1603 jz .L034cfb_inp_aligned 1604 shrl $2,%ecx 1605.byte 243,165 1606 subl %ebx,%edi 1607 movl %ebx,%ecx 1608 movl %edi,%esi 1609.L034cfb_inp_aligned: 1610 leal -16(%edx),%eax 1611 leal 16(%edx),%ebx 1612 shrl $4,%ecx 1613.byte 243,15,167,224 1614 movaps (%eax),%xmm0 1615 movaps %xmm0,-16(%edx) 1616 movl (%ebp),%edi 1617 movl 12(%ebp),%ebx 1618 testl $15,%edi 1619 jz .L035cfb_out_aligned 1620 movl %ebx,%ecx 1621 leal (%esp),%esi 1622 shrl $2,%ecx 1623.byte 243,165 1624 subl %ebx,%edi 1625.L035cfb_out_aligned: 1626 movl 4(%ebp),%esi 1627 movl 8(%ebp),%ecx 1628 addl %ebx,%edi 1629 addl %ebx,%esi 1630 subl %ebx,%ecx 1631 movl $512,%ebx 1632 jnz .L033cfb_loop 1633 cmpl %ebp,%esp 1634 je .L036cfb_done 1635 pxor %xmm0,%xmm0 1636 leal (%esp),%eax 1637.L037cfb_bzero: 1638 movaps %xmm0,(%eax) 1639 leal 16(%eax),%eax 1640 cmpl %eax,%ebp 1641 ja .L037cfb_bzero 1642.L036cfb_done: 1643 movl 16(%ebp),%ebp 1644 leal 24(%ebp),%esp 1645 jmp .L038cfb_exit 1646.align 16 1647.L032cfb_aligned: 1648 leal -16(%edx),%eax 1649 leal 16(%edx),%ebx 1650 shrl $4,%ecx 1651.byte 243,15,167,224 1652 movaps (%eax),%xmm0 1653 movaps %xmm0,-16(%edx) 1654.L038cfb_exit: 1655 movl $1,%eax 1656 leal 4(%esp),%esp 1657.L030cfb_abort: 1658 popl %edi 1659 popl %esi 1660 popl %ebx 1661 popl %ebp 1662 ret 1663.size padlock_cfb_encrypt,.-.L_padlock_cfb_encrypt_begin 1664.globl padlock_ofb_encrypt 1665.type padlock_ofb_encrypt,@function 1666.align 16 1667padlock_ofb_encrypt: 1668.L_padlock_ofb_encrypt_begin: 1669 pushl %ebp 1670 pushl %ebx 1671 pushl %esi 1672 pushl %edi 1673 movl 20(%esp),%edi 1674 movl 24(%esp),%esi 1675 movl 28(%esp),%edx 1676 movl 32(%esp),%ecx 1677 testl $15,%edx 1678 jnz .L039ofb_abort 1679 testl $15,%ecx 1680 jnz .L039ofb_abort 1681 leal .Lpadlock_saved_context-.L040ofb_pic_point,%eax 1682 pushfl 1683 cld 1684 call _padlock_verify_ctx 1685.L040ofb_pic_point: 1686 leal 16(%edx),%edx 1687 xorl %eax,%eax 1688 xorl %ebx,%ebx 1689 testl $32,(%edx) 1690 jnz .L041ofb_aligned 1691 testl $15,%edi 1692 setz %al 1693 testl $15,%esi 1694 setz %bl 1695 testl %ebx,%eax 1696 jnz .L041ofb_aligned 1697 negl %eax 1698 movl $512,%ebx 1699 notl %eax 1700 leal -24(%esp),%ebp 1701 cmpl %ebx,%ecx 1702 cmovcl %ecx,%ebx 1703 andl %ebx,%eax 1704 movl %ecx,%ebx 1705 negl %eax 1706 andl $511,%ebx 1707 leal (%eax,%ebp,1),%esp 1708 movl $512,%eax 1709 cmovzl %eax,%ebx 1710 movl %ebp,%eax 1711 andl $-16,%ebp 1712 andl $-16,%esp 1713 movl %eax,16(%ebp) 1714 jmp .L042ofb_loop 1715.align 16 1716.L042ofb_loop: 1717 movl %edi,(%ebp) 1718 movl %esi,4(%ebp) 1719 movl %ecx,8(%ebp) 1720 movl %ebx,%ecx 1721 movl %ebx,12(%ebp) 1722 testl $15,%edi 1723 cmovnzl %esp,%edi 1724 testl $15,%esi 1725 jz .L043ofb_inp_aligned 1726 shrl $2,%ecx 1727.byte 243,165 1728 subl %ebx,%edi 1729 movl %ebx,%ecx 1730 movl %edi,%esi 1731.L043ofb_inp_aligned: 1732 leal -16(%edx),%eax 1733 leal 16(%edx),%ebx 1734 shrl $4,%ecx 1735.byte 243,15,167,232 1736 movaps (%eax),%xmm0 1737 movaps %xmm0,-16(%edx) 1738 movl (%ebp),%edi 1739 movl 12(%ebp),%ebx 1740 testl $15,%edi 1741 jz .L044ofb_out_aligned 1742 movl %ebx,%ecx 1743 leal (%esp),%esi 1744 shrl $2,%ecx 1745.byte 243,165 1746 subl %ebx,%edi 1747.L044ofb_out_aligned: 1748 movl 4(%ebp),%esi 1749 movl 8(%ebp),%ecx 1750 addl %ebx,%edi 1751 addl %ebx,%esi 1752 subl %ebx,%ecx 1753 movl $512,%ebx 1754 jnz .L042ofb_loop 1755 cmpl %ebp,%esp 1756 je .L045ofb_done 1757 pxor %xmm0,%xmm0 1758 leal (%esp),%eax 1759.L046ofb_bzero: 1760 movaps %xmm0,(%eax) 1761 leal 16(%eax),%eax 1762 cmpl %eax,%ebp 1763 ja .L046ofb_bzero 1764.L045ofb_done: 1765 movl 16(%ebp),%ebp 1766 leal 24(%ebp),%esp 1767 jmp .L047ofb_exit 1768.align 16 1769.L041ofb_aligned: 1770 leal -16(%edx),%eax 1771 leal 16(%edx),%ebx 1772 shrl $4,%ecx 1773.byte 243,15,167,232 1774 movaps (%eax),%xmm0 1775 movaps %xmm0,-16(%edx) 1776.L047ofb_exit: 1777 movl $1,%eax 1778 leal 4(%esp),%esp 1779.L039ofb_abort: 1780 popl %edi 1781 popl %esi 1782 popl %ebx 1783 popl %ebp 1784 ret 1785.size padlock_ofb_encrypt,.-.L_padlock_ofb_encrypt_begin 1786.globl padlock_ctr32_encrypt 1787.type padlock_ctr32_encrypt,@function 1788.align 16 1789padlock_ctr32_encrypt: 1790.L_padlock_ctr32_encrypt_begin: 1791 pushl %ebp 1792 pushl %ebx 1793 pushl %esi 1794 pushl %edi 1795 movl 20(%esp),%edi 1796 movl 24(%esp),%esi 1797 movl 28(%esp),%edx 1798 movl 32(%esp),%ecx 1799 testl $15,%edx 1800 jnz .L048ctr32_abort 1801 testl $15,%ecx 1802 jnz .L048ctr32_abort 1803 leal .Lpadlock_saved_context-.L049ctr32_pic_point,%eax 1804 pushfl 1805 cld 1806 call _padlock_verify_ctx 1807.L049ctr32_pic_point: 1808 leal 16(%edx),%edx 1809 xorl %eax,%eax 1810 movq -16(%edx),%mm0 1811 movl $512,%ebx 1812 notl %eax 1813 leal -24(%esp),%ebp 1814 cmpl %ebx,%ecx 1815 cmovcl %ecx,%ebx 1816 andl %ebx,%eax 1817 movl %ecx,%ebx 1818 negl %eax 1819 andl $511,%ebx 1820 leal (%eax,%ebp,1),%esp 1821 movl $512,%eax 1822 cmovzl %eax,%ebx 1823 movl %ebp,%eax 1824 andl $-16,%ebp 1825 andl $-16,%esp 1826 movl %eax,16(%ebp) 1827 jmp .L050ctr32_loop 1828.align 16 1829.L050ctr32_loop: 1830 movl %edi,(%ebp) 1831 movl %esi,4(%ebp) 1832 movl %ecx,8(%ebp) 1833 movl %ebx,%ecx 1834 movl %ebx,12(%ebp) 1835 movl -4(%edx),%ecx 1836 xorl %edi,%edi 1837 movl -8(%edx),%eax 1838.L051ctr32_prepare: 1839 movl %ecx,12(%esp,%edi,1) 1840 bswap %ecx 1841 movq %mm0,(%esp,%edi,1) 1842 incl %ecx 1843 movl %eax,8(%esp,%edi,1) 1844 bswap %ecx 1845 leal 16(%edi),%edi 1846 cmpl %ebx,%edi 1847 jb .L051ctr32_prepare 1848 movl %ecx,-4(%edx) 1849 leal (%esp),%esi 1850 leal (%esp),%edi 1851 movl %ebx,%ecx 1852 leal -16(%edx),%eax 1853 leal 16(%edx),%ebx 1854 shrl $4,%ecx 1855.byte 243,15,167,200 1856 movl (%ebp),%edi 1857 movl 12(%ebp),%ebx 1858 movl 4(%ebp),%esi 1859 xorl %ecx,%ecx 1860.L052ctr32_xor: 1861 movups (%esi,%ecx,1),%xmm1 1862 leal 16(%ecx),%ecx 1863 pxor -16(%esp,%ecx,1),%xmm1 1864 movups %xmm1,-16(%edi,%ecx,1) 1865 cmpl %ebx,%ecx 1866 jb .L052ctr32_xor 1867 movl 8(%ebp),%ecx 1868 addl %ebx,%edi 1869 addl %ebx,%esi 1870 subl %ebx,%ecx 1871 movl $512,%ebx 1872 jnz .L050ctr32_loop 1873 pxor %xmm0,%xmm0 1874 leal (%esp),%eax 1875.L053ctr32_bzero: 1876 movaps %xmm0,(%eax) 1877 leal 16(%eax),%eax 1878 cmpl %eax,%ebp 1879 ja .L053ctr32_bzero 1880.L054ctr32_done: 1881 movl 16(%ebp),%ebp 1882 leal 24(%ebp),%esp 1883 movl $1,%eax 1884 leal 4(%esp),%esp 1885 emms 1886.L048ctr32_abort: 1887 popl %edi 1888 popl %esi 1889 popl %ebx 1890 popl %ebp 1891 ret 1892.size padlock_ctr32_encrypt,.-.L_padlock_ctr32_encrypt_begin 1893.globl padlock_xstore 1894.type padlock_xstore,@function 1895.align 16 1896padlock_xstore: 1897.L_padlock_xstore_begin: 1898 pushl %edi 1899 movl 8(%esp),%edi 1900 movl 12(%esp),%edx 1901.byte 15,167,192 1902 popl %edi 1903 ret 1904.size padlock_xstore,.-.L_padlock_xstore_begin 1905.type _win32_segv_handler,@function 1906.align 16 1907_win32_segv_handler: 1908 movl $1,%eax 1909 movl 4(%esp),%edx 1910 movl 12(%esp),%ecx 1911 cmpl $3221225477,(%edx) 1912 jne .L055ret 1913 addl $4,184(%ecx) 1914 movl $0,%eax 1915.L055ret: 1916 ret 1917.size _win32_segv_handler,.-_win32_segv_handler 1918.globl padlock_sha1_oneshot 1919.type padlock_sha1_oneshot,@function 1920.align 16 1921padlock_sha1_oneshot: 1922.L_padlock_sha1_oneshot_begin: 1923 pushl %edi 1924 pushl %esi 1925 xorl %eax,%eax 1926 movl 12(%esp),%edi 1927 movl 16(%esp),%esi 1928 movl 20(%esp),%ecx 1929 movl %esp,%edx 1930 addl $-128,%esp 1931 movups (%edi),%xmm0 1932 andl $-16,%esp 1933 movl 16(%edi),%eax 1934 movaps %xmm0,(%esp) 1935 movl %esp,%edi 1936 movl %eax,16(%esp) 1937 xorl %eax,%eax 1938.byte 243,15,166,200 1939 movaps (%esp),%xmm0 1940 movl 16(%esp),%eax 1941 movl %edx,%esp 1942 movl 12(%esp),%edi 1943 movups %xmm0,(%edi) 1944 movl %eax,16(%edi) 1945 popl %esi 1946 popl %edi 1947 ret 1948.size padlock_sha1_oneshot,.-.L_padlock_sha1_oneshot_begin 1949.globl padlock_sha1_blocks 1950.type padlock_sha1_blocks,@function 1951.align 16 1952padlock_sha1_blocks: 1953.L_padlock_sha1_blocks_begin: 1954 pushl %edi 1955 pushl %esi 1956 movl 12(%esp),%edi 1957 movl 16(%esp),%esi 1958 movl %esp,%edx 1959 movl 20(%esp),%ecx 1960 addl $-128,%esp 1961 movups (%edi),%xmm0 1962 andl $-16,%esp 1963 movl 16(%edi),%eax 1964 movaps %xmm0,(%esp) 1965 movl %esp,%edi 1966 movl %eax,16(%esp) 1967 movl $-1,%eax 1968.byte 243,15,166,200 1969 movaps (%esp),%xmm0 1970 movl 16(%esp),%eax 1971 movl %edx,%esp 1972 movl 12(%esp),%edi 1973 movups %xmm0,(%edi) 1974 movl %eax,16(%edi) 1975 popl %esi 1976 popl %edi 1977 ret 1978.size padlock_sha1_blocks,.-.L_padlock_sha1_blocks_begin 1979.globl padlock_sha256_oneshot 1980.type padlock_sha256_oneshot,@function 1981.align 16 1982padlock_sha256_oneshot: 1983.L_padlock_sha256_oneshot_begin: 1984 pushl %edi 1985 pushl %esi 1986 xorl %eax,%eax 1987 movl 12(%esp),%edi 1988 movl 16(%esp),%esi 1989 movl 20(%esp),%ecx 1990 movl %esp,%edx 1991 addl $-128,%esp 1992 movups (%edi),%xmm0 1993 andl $-16,%esp 1994 movups 16(%edi),%xmm1 1995 movaps %xmm0,(%esp) 1996 movl %esp,%edi 1997 movaps %xmm1,16(%esp) 1998 xorl %eax,%eax 1999.byte 243,15,166,208 2000 movaps (%esp),%xmm0 2001 movaps 16(%esp),%xmm1 2002 movl %edx,%esp 2003 movl 12(%esp),%edi 2004 movups %xmm0,(%edi) 2005 movups %xmm1,16(%edi) 2006 popl %esi 2007 popl %edi 2008 ret 2009.size padlock_sha256_oneshot,.-.L_padlock_sha256_oneshot_begin 2010.globl padlock_sha256_blocks 2011.type padlock_sha256_blocks,@function 2012.align 16 2013padlock_sha256_blocks: 2014.L_padlock_sha256_blocks_begin: 2015 pushl %edi 2016 pushl %esi 2017 movl 12(%esp),%edi 2018 movl 16(%esp),%esi 2019 movl 20(%esp),%ecx 2020 movl %esp,%edx 2021 addl $-128,%esp 2022 movups (%edi),%xmm0 2023 andl $-16,%esp 2024 movups 16(%edi),%xmm1 2025 movaps %xmm0,(%esp) 2026 movl %esp,%edi 2027 movaps %xmm1,16(%esp) 2028 movl $-1,%eax 2029.byte 243,15,166,208 2030 movaps (%esp),%xmm0 2031 movaps 16(%esp),%xmm1 2032 movl %edx,%esp 2033 movl 12(%esp),%edi 2034 movups %xmm0,(%edi) 2035 movups %xmm1,16(%edi) 2036 popl %esi 2037 popl %edi 2038 ret 2039.size padlock_sha256_blocks,.-.L_padlock_sha256_blocks_begin 2040.globl padlock_sha512_blocks 2041.type padlock_sha512_blocks,@function 2042.align 16 2043padlock_sha512_blocks: 2044.L_padlock_sha512_blocks_begin: 2045 pushl %edi 2046 pushl %esi 2047 movl 12(%esp),%edi 2048 movl 16(%esp),%esi 2049 movl 20(%esp),%ecx 2050 movl %esp,%edx 2051 addl $-128,%esp 2052 movups (%edi),%xmm0 2053 andl $-16,%esp 2054 movups 16(%edi),%xmm1 2055 movups 32(%edi),%xmm2 2056 movups 48(%edi),%xmm3 2057 movaps %xmm0,(%esp) 2058 movl %esp,%edi 2059 movaps %xmm1,16(%esp) 2060 movaps %xmm2,32(%esp) 2061 movaps %xmm3,48(%esp) 2062.byte 243,15,166,224 2063 movaps (%esp),%xmm0 2064 movaps 16(%esp),%xmm1 2065 movaps 32(%esp),%xmm2 2066 movaps 48(%esp),%xmm3 2067 movl %edx,%esp 2068 movl 12(%esp),%edi 2069 movups %xmm0,(%edi) 2070 movups %xmm1,16(%edi) 2071 movups %xmm2,32(%edi) 2072 movups %xmm3,48(%edi) 2073 popl %esi 2074 popl %edi 2075 ret 2076.size padlock_sha512_blocks,.-.L_padlock_sha512_blocks_begin 2077.byte 86,73,65,32,80,97,100,108,111,99,107,32,120,56,54,32 2078.byte 109,111,100,117,108,101,44,32,67,82,89,80,84,79,71,65 2079.byte 77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101 2080.byte 110,115,115,108,46,111,114,103,62,0 2081.align 16 2082.data 2083.align 4 2084.Lpadlock_saved_context: 2085.long 0 2086#endif 2087