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