1/* Do not modify. This file is auto-generated from aesp8-ppc.pl. */ 2.machine "any" 3 4.text 5 6.align 7 7rcon: 8.byte 0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00 9.byte 0x1b,0x00,0x00,0x00,0x1b,0x00,0x00,0x00,0x1b,0x00,0x00,0x00,0x1b,0x00,0x00,0x00 10.byte 0x0d,0x0e,0x0f,0x0c,0x0d,0x0e,0x0f,0x0c,0x0d,0x0e,0x0f,0x0c,0x0d,0x0e,0x0f,0x0c 11.byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 12.long 0x0f102132, 0x43546576, 0x8798a9ba, 0xcbdcedfe 13.Lconsts: 14 mflr 0 15 bcl 20,31,$+4 16 mflr 6 17 addi 6,6,-0x58 18 mtlr 0 19 blr 20.long 0 21.byte 0,12,0x14,0,0,0,0,0 22.byte 65,69,83,32,102,111,114,32,80,111,119,101,114,73,83,65,32,50,46,48,55,44,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 23.align 2 24 25.globl aes_p8_set_encrypt_key 26.type aes_p8_set_encrypt_key,@function 27.align 5 28aes_p8_set_encrypt_key: 29.Lset_encrypt_key: 30 mflr 11 31 stw 11,4(1) 32 33 li 6,-1 34 cmplwi 3,0 35 beq- .Lenc_key_abort 36 cmplwi 5,0 37 beq- .Lenc_key_abort 38 li 6,-2 39 cmpwi 4,128 40 blt- .Lenc_key_abort 41 cmpwi 4,256 42 bgt- .Lenc_key_abort 43 andi. 0,4,0x3f 44 bne- .Lenc_key_abort 45 46 lis 0,0xfff0 47 mfspr 12,256 48 mtspr 256,0 49 50 bl .Lconsts 51 mtlr 11 52 53 neg 9,3 54 lvx 1,0,3 55 addi 3,3,15 56 lvsr 3,0,9 57 li 8,0x20 58 cmpwi 4,192 59 lvx 2,0,3 60 61 lvx 4,0,6 62 63 lvx 5,8,6 64 addi 6,6,0x10 65 vperm 1,1,2,3 66 li 7,8 67 vxor 0,0,0 68 mtctr 7 69 70 lvsr 8,0,5 71 vspltisb 9,-1 72 lvx 10,0,5 73 vperm 9,0,9,8 74 75 blt .Loop128 76 addi 3,3,8 77 beq .L192 78 addi 3,3,8 79 b .L256 80 81.align 4 82.Loop128: 83 vperm 3,1,1,5 84 vsldoi 6,0,1,12 85 vperm 11,1,1,8 86 vsel 7,10,11,9 87 vor 10,11,11 88 .long 0x10632509 89 stvx 7,0,5 90 addi 5,5,16 91 92 vxor 1,1,6 93 vsldoi 6,0,6,12 94 vxor 1,1,6 95 vsldoi 6,0,6,12 96 vxor 1,1,6 97 vadduwm 4,4,4 98 vxor 1,1,3 99 bdnz .Loop128 100 101 lvx 4,0,6 102 103 vperm 3,1,1,5 104 vsldoi 6,0,1,12 105 vperm 11,1,1,8 106 vsel 7,10,11,9 107 vor 10,11,11 108 .long 0x10632509 109 stvx 7,0,5 110 addi 5,5,16 111 112 vxor 1,1,6 113 vsldoi 6,0,6,12 114 vxor 1,1,6 115 vsldoi 6,0,6,12 116 vxor 1,1,6 117 vadduwm 4,4,4 118 vxor 1,1,3 119 120 vperm 3,1,1,5 121 vsldoi 6,0,1,12 122 vperm 11,1,1,8 123 vsel 7,10,11,9 124 vor 10,11,11 125 .long 0x10632509 126 stvx 7,0,5 127 addi 5,5,16 128 129 vxor 1,1,6 130 vsldoi 6,0,6,12 131 vxor 1,1,6 132 vsldoi 6,0,6,12 133 vxor 1,1,6 134 vxor 1,1,3 135 vperm 11,1,1,8 136 vsel 7,10,11,9 137 vor 10,11,11 138 stvx 7,0,5 139 140 addi 3,5,15 141 addi 5,5,0x50 142 143 li 8,10 144 b .Ldone 145 146.align 4 147.L192: 148 lvx 6,0,3 149 li 7,4 150 vperm 11,1,1,8 151 vsel 7,10,11,9 152 vor 10,11,11 153 stvx 7,0,5 154 addi 5,5,16 155 vperm 2,2,6,3 156 vspltisb 3,8 157 mtctr 7 158 vsububm 5,5,3 159 160.Loop192: 161 vperm 3,2,2,5 162 vsldoi 6,0,1,12 163 .long 0x10632509 164 165 vxor 1,1,6 166 vsldoi 6,0,6,12 167 vxor 1,1,6 168 vsldoi 6,0,6,12 169 vxor 1,1,6 170 171 vsldoi 7,0,2,8 172 vspltw 6,1,3 173 vxor 6,6,2 174 vsldoi 2,0,2,12 175 vadduwm 4,4,4 176 vxor 2,2,6 177 vxor 1,1,3 178 vxor 2,2,3 179 vsldoi 7,7,1,8 180 181 vperm 3,2,2,5 182 vsldoi 6,0,1,12 183 vperm 11,7,7,8 184 vsel 7,10,11,9 185 vor 10,11,11 186 .long 0x10632509 187 stvx 7,0,5 188 addi 5,5,16 189 190 vsldoi 7,1,2,8 191 vxor 1,1,6 192 vsldoi 6,0,6,12 193 vperm 11,7,7,8 194 vsel 7,10,11,9 195 vor 10,11,11 196 vxor 1,1,6 197 vsldoi 6,0,6,12 198 vxor 1,1,6 199 stvx 7,0,5 200 addi 5,5,16 201 202 vspltw 6,1,3 203 vxor 6,6,2 204 vsldoi 2,0,2,12 205 vadduwm 4,4,4 206 vxor 2,2,6 207 vxor 1,1,3 208 vxor 2,2,3 209 vperm 11,1,1,8 210 vsel 7,10,11,9 211 vor 10,11,11 212 stvx 7,0,5 213 addi 3,5,15 214 addi 5,5,16 215 bdnz .Loop192 216 217 li 8,12 218 addi 5,5,0x20 219 b .Ldone 220 221.align 4 222.L256: 223 lvx 6,0,3 224 li 7,7 225 li 8,14 226 vperm 11,1,1,8 227 vsel 7,10,11,9 228 vor 10,11,11 229 stvx 7,0,5 230 addi 5,5,16 231 vperm 2,2,6,3 232 mtctr 7 233 234.Loop256: 235 vperm 3,2,2,5 236 vsldoi 6,0,1,12 237 vperm 11,2,2,8 238 vsel 7,10,11,9 239 vor 10,11,11 240 .long 0x10632509 241 stvx 7,0,5 242 addi 5,5,16 243 244 vxor 1,1,6 245 vsldoi 6,0,6,12 246 vxor 1,1,6 247 vsldoi 6,0,6,12 248 vxor 1,1,6 249 vadduwm 4,4,4 250 vxor 1,1,3 251 vperm 11,1,1,8 252 vsel 7,10,11,9 253 vor 10,11,11 254 stvx 7,0,5 255 addi 3,5,15 256 addi 5,5,16 257 bdz .Ldone 258 259 vspltw 3,1,3 260 vsldoi 6,0,2,12 261 .long 0x106305C8 262 263 vxor 2,2,6 264 vsldoi 6,0,6,12 265 vxor 2,2,6 266 vsldoi 6,0,6,12 267 vxor 2,2,6 268 269 vxor 2,2,3 270 b .Loop256 271 272.align 4 273.Ldone: 274 lvx 2,0,3 275 vsel 2,10,2,9 276 stvx 2,0,3 277 li 6,0 278 mtspr 256,12 279 stw 8,0(5) 280 281.Lenc_key_abort: 282 mr 3,6 283 blr 284.long 0 285.byte 0,12,0x14,1,0,0,3,0 286.long 0 287.size aes_p8_set_encrypt_key,.-aes_p8_set_encrypt_key 288 289.globl aes_p8_set_decrypt_key 290.type aes_p8_set_decrypt_key,@function 291.align 5 292aes_p8_set_decrypt_key: 293 stwu 1,-32(1) 294 mflr 10 295 stw 10,32+4(1) 296 bl .Lset_encrypt_key 297 mtlr 10 298 299 cmpwi 3,0 300 bne- .Ldec_key_abort 301 302 slwi 7,8,4 303 subi 3,5,240 304 srwi 8,8,1 305 add 5,3,7 306 mtctr 8 307 308.Ldeckey: 309 lwz 0, 0(3) 310 lwz 6, 4(3) 311 lwz 7, 8(3) 312 lwz 8, 12(3) 313 addi 3,3,16 314 lwz 9, 0(5) 315 lwz 10,4(5) 316 lwz 11,8(5) 317 lwz 12,12(5) 318 stw 0, 0(5) 319 stw 6, 4(5) 320 stw 7, 8(5) 321 stw 8, 12(5) 322 subi 5,5,16 323 stw 9, -16(3) 324 stw 10,-12(3) 325 stw 11,-8(3) 326 stw 12,-4(3) 327 bdnz .Ldeckey 328 329 xor 3,3,3 330.Ldec_key_abort: 331 addi 1,1,32 332 blr 333.long 0 334.byte 0,12,4,1,0x80,0,3,0 335.long 0 336.size aes_p8_set_decrypt_key,.-aes_p8_set_decrypt_key 337.globl aes_p8_encrypt 338.type aes_p8_encrypt,@function 339.align 5 340aes_p8_encrypt: 341 lwz 6,240(5) 342 lis 0,0xfc00 343 mfspr 12,256 344 li 7,15 345 mtspr 256,0 346 347 lvx 0,0,3 348 neg 11,4 349 lvx 1,7,3 350 lvsl 2,0,3 351 352 lvsl 3,0,11 353 354 li 7,16 355 vperm 0,0,1,2 356 lvx 1,0,5 357 lvsl 5,0,5 358 srwi 6,6,1 359 lvx 2,7,5 360 addi 7,7,16 361 subi 6,6,1 362 vperm 1,1,2,5 363 364 vxor 0,0,1 365 lvx 1,7,5 366 addi 7,7,16 367 mtctr 6 368 369.Loop_enc: 370 vperm 2,2,1,5 371 .long 0x10001508 372 lvx 2,7,5 373 addi 7,7,16 374 vperm 1,1,2,5 375 .long 0x10000D08 376 lvx 1,7,5 377 addi 7,7,16 378 bdnz .Loop_enc 379 380 vperm 2,2,1,5 381 .long 0x10001508 382 lvx 2,7,5 383 vperm 1,1,2,5 384 .long 0x10000D09 385 386 vspltisb 2,-1 387 vxor 1,1,1 388 li 7,15 389 vperm 2,1,2,3 390 391 lvx 1,0,4 392 vperm 0,0,0,3 393 vsel 1,1,0,2 394 lvx 4,7,4 395 stvx 1,0,4 396 vsel 0,0,4,2 397 stvx 0,7,4 398 399 mtspr 256,12 400 blr 401.long 0 402.byte 0,12,0x14,0,0,0,3,0 403.long 0 404.size aes_p8_encrypt,.-aes_p8_encrypt 405.globl aes_p8_decrypt 406.type aes_p8_decrypt,@function 407.align 5 408aes_p8_decrypt: 409 lwz 6,240(5) 410 lis 0,0xfc00 411 mfspr 12,256 412 li 7,15 413 mtspr 256,0 414 415 lvx 0,0,3 416 neg 11,4 417 lvx 1,7,3 418 lvsl 2,0,3 419 420 lvsl 3,0,11 421 422 li 7,16 423 vperm 0,0,1,2 424 lvx 1,0,5 425 lvsl 5,0,5 426 srwi 6,6,1 427 lvx 2,7,5 428 addi 7,7,16 429 subi 6,6,1 430 vperm 1,1,2,5 431 432 vxor 0,0,1 433 lvx 1,7,5 434 addi 7,7,16 435 mtctr 6 436 437.Loop_dec: 438 vperm 2,2,1,5 439 .long 0x10001548 440 lvx 2,7,5 441 addi 7,7,16 442 vperm 1,1,2,5 443 .long 0x10000D48 444 lvx 1,7,5 445 addi 7,7,16 446 bdnz .Loop_dec 447 448 vperm 2,2,1,5 449 .long 0x10001548 450 lvx 2,7,5 451 vperm 1,1,2,5 452 .long 0x10000D49 453 454 vspltisb 2,-1 455 vxor 1,1,1 456 li 7,15 457 vperm 2,1,2,3 458 459 lvx 1,0,4 460 vperm 0,0,0,3 461 vsel 1,1,0,2 462 lvx 4,7,4 463 stvx 1,0,4 464 vsel 0,0,4,2 465 stvx 0,7,4 466 467 mtspr 256,12 468 blr 469.long 0 470.byte 0,12,0x14,0,0,0,3,0 471.long 0 472.size aes_p8_decrypt,.-aes_p8_decrypt 473.globl aes_p8_cbc_encrypt 474.type aes_p8_cbc_encrypt,@function 475.align 5 476aes_p8_cbc_encrypt: 477 cmplwi 5,16 478 .long 0x4dc00020 479 480 cmpwi 8,0 481 lis 0,0xffe0 482 mfspr 12,256 483 mtspr 256,0 484 485 li 10,15 486 vxor 0,0,0 487 488 489 lvx 4,0,7 490 lvsl 6,0,7 491 lvx 5,10,7 492 493 vperm 4,4,5,6 494 495 neg 11,3 496 lvsl 10,0,6 497 lwz 9,240(6) 498 499 lvsr 6,0,11 500 lvx 5,0,3 501 addi 3,3,15 502 503 504 lvsr 8,0,4 505 vspltisb 9,-1 506 lvx 7,0,4 507 vperm 9,0,9,8 508 509 510 srwi 9,9,1 511 li 10,16 512 subi 9,9,1 513 beq .Lcbc_dec 514 515.Lcbc_enc: 516 vor 2,5,5 517 lvx 5,0,3 518 addi 3,3,16 519 mtctr 9 520 subi 5,5,16 521 522 lvx 0,0,6 523 vperm 2,2,5,6 524 lvx 1,10,6 525 addi 10,10,16 526 vperm 0,0,1,10 527 vxor 2,2,0 528 lvx 0,10,6 529 addi 10,10,16 530 vxor 2,2,4 531 532.Loop_cbc_enc: 533 vperm 1,1,0,10 534 .long 0x10420D08 535 lvx 1,10,6 536 addi 10,10,16 537 vperm 0,0,1,10 538 .long 0x10420508 539 lvx 0,10,6 540 addi 10,10,16 541 bdnz .Loop_cbc_enc 542 543 vperm 1,1,0,10 544 .long 0x10420D08 545 lvx 1,10,6 546 li 10,16 547 vperm 0,0,1,10 548 .long 0x10820509 549 cmplwi 5,16 550 551 vperm 3,4,4,8 552 vsel 2,7,3,9 553 vor 7,3,3 554 stvx 2,0,4 555 addi 4,4,16 556 bge .Lcbc_enc 557 558 b .Lcbc_done 559 560.align 4 561.Lcbc_dec: 562 cmplwi 5,128 563 bge _aesp8_cbc_decrypt8x 564 vor 3,5,5 565 lvx 5,0,3 566 addi 3,3,16 567 mtctr 9 568 subi 5,5,16 569 570 lvx 0,0,6 571 vperm 3,3,5,6 572 lvx 1,10,6 573 addi 10,10,16 574 vperm 0,0,1,10 575 vxor 2,3,0 576 lvx 0,10,6 577 addi 10,10,16 578 579.Loop_cbc_dec: 580 vperm 1,1,0,10 581 .long 0x10420D48 582 lvx 1,10,6 583 addi 10,10,16 584 vperm 0,0,1,10 585 .long 0x10420548 586 lvx 0,10,6 587 addi 10,10,16 588 bdnz .Loop_cbc_dec 589 590 vperm 1,1,0,10 591 .long 0x10420D48 592 lvx 1,10,6 593 li 10,16 594 vperm 0,0,1,10 595 .long 0x10420549 596 cmplwi 5,16 597 598 vxor 2,2,4 599 vor 4,3,3 600 vperm 3,2,2,8 601 vsel 2,7,3,9 602 vor 7,3,3 603 stvx 2,0,4 604 addi 4,4,16 605 bge .Lcbc_dec 606 607.Lcbc_done: 608 addi 4,4,-1 609 lvx 2,0,4 610 vsel 2,7,2,9 611 stvx 2,0,4 612 613 neg 8,7 614 li 10,15 615 vxor 0,0,0 616 vspltisb 9,-1 617 618 lvsl 8,0,8 619 vperm 9,0,9,8 620 621 lvx 7,0,7 622 vperm 4,4,4,8 623 vsel 2,7,4,9 624 lvx 5,10,7 625 stvx 2,0,7 626 vsel 2,4,5,9 627 stvx 2,10,7 628 629 mtspr 256,12 630 blr 631.long 0 632.byte 0,12,0x14,0,0,0,6,0 633.long 0 634.align 5 635_aesp8_cbc_decrypt8x: 636 stwu 1,-392(1) 637 li 10,175 638 li 11,191 639 stvx 20,10,1 640 addi 10,10,32 641 stvx 21,11,1 642 addi 11,11,32 643 stvx 22,10,1 644 addi 10,10,32 645 stvx 23,11,1 646 addi 11,11,32 647 stvx 24,10,1 648 addi 10,10,32 649 stvx 25,11,1 650 addi 11,11,32 651 stvx 26,10,1 652 addi 10,10,32 653 stvx 27,11,1 654 addi 11,11,32 655 stvx 28,10,1 656 addi 10,10,32 657 stvx 29,11,1 658 addi 11,11,32 659 stvx 30,10,1 660 stvx 31,11,1 661 li 0,-1 662 stw 12,364(1) 663 li 8,0x10 664 stw 26,368(1) 665 li 26,0x20 666 stw 27,372(1) 667 li 27,0x30 668 stw 28,376(1) 669 li 28,0x40 670 stw 29,380(1) 671 li 29,0x50 672 stw 30,384(1) 673 li 30,0x60 674 stw 31,388(1) 675 li 31,0x70 676 mtspr 256,0 677 678 subi 9,9,3 679 subi 5,5,128 680 681 lvx 23,0,6 682 lvx 30,8,6 683 addi 6,6,0x20 684 lvx 31,0,6 685 vperm 23,23,30,10 686 addi 11,1,32+15 687 mtctr 9 688 689.Load_cbc_dec_key: 690 vperm 24,30,31,10 691 lvx 30,8,6 692 addi 6,6,0x20 693 stvx 24,0,11 694 vperm 25,31,30,10 695 lvx 31,0,6 696 stvx 25,8,11 697 addi 11,11,0x20 698 bdnz .Load_cbc_dec_key 699 700 lvx 26,8,6 701 vperm 24,30,31,10 702 lvx 27,26,6 703 stvx 24,0,11 704 vperm 25,31,26,10 705 lvx 28,27,6 706 stvx 25,8,11 707 addi 11,1,32+15 708 vperm 26,26,27,10 709 lvx 29,28,6 710 vperm 27,27,28,10 711 lvx 30,29,6 712 vperm 28,28,29,10 713 lvx 31,30,6 714 vperm 29,29,30,10 715 lvx 14,31,6 716 vperm 30,30,31,10 717 lvx 24,0,11 718 vperm 31,31,14,10 719 lvx 25,8,11 720 721 722 723 subi 3,3,15 724 725 726 .long 0x7C001E99 727 728 729 .long 0x7C281E99 730 731 .long 0x7C5A1E99 732 733 .long 0x7C7B1E99 734 735 .long 0x7D5C1E99 736 737 vxor 14,0,23 738 .long 0x7D7D1E99 739 740 vxor 15,1,23 741 .long 0x7D9E1E99 742 743 vxor 16,2,23 744 .long 0x7DBF1E99 745 addi 3,3,0x80 746 747 vxor 17,3,23 748 749 vxor 18,10,23 750 751 vxor 19,11,23 752 vxor 20,12,23 753 vxor 21,13,23 754 755 mtctr 9 756 b .Loop_cbc_dec8x 757.align 5 758.Loop_cbc_dec8x: 759 .long 0x11CEC548 760 .long 0x11EFC548 761 .long 0x1210C548 762 .long 0x1231C548 763 .long 0x1252C548 764 .long 0x1273C548 765 .long 0x1294C548 766 .long 0x12B5C548 767 lvx 24,26,11 768 addi 11,11,0x20 769 770 .long 0x11CECD48 771 .long 0x11EFCD48 772 .long 0x1210CD48 773 .long 0x1231CD48 774 .long 0x1252CD48 775 .long 0x1273CD48 776 .long 0x1294CD48 777 .long 0x12B5CD48 778 lvx 25,8,11 779 bdnz .Loop_cbc_dec8x 780 781 subic 5,5,128 782 .long 0x11CEC548 783 .long 0x11EFC548 784 .long 0x1210C548 785 .long 0x1231C548 786 .long 0x1252C548 787 .long 0x1273C548 788 .long 0x1294C548 789 .long 0x12B5C548 790 791 subfe. 0,0,0 792 .long 0x11CECD48 793 .long 0x11EFCD48 794 .long 0x1210CD48 795 .long 0x1231CD48 796 .long 0x1252CD48 797 .long 0x1273CD48 798 .long 0x1294CD48 799 .long 0x12B5CD48 800 801 and 0,0,5 802 .long 0x11CED548 803 .long 0x11EFD548 804 .long 0x1210D548 805 .long 0x1231D548 806 .long 0x1252D548 807 .long 0x1273D548 808 .long 0x1294D548 809 .long 0x12B5D548 810 811 add 3,3,0 812 813 814 815 .long 0x11CEDD48 816 .long 0x11EFDD48 817 .long 0x1210DD48 818 .long 0x1231DD48 819 .long 0x1252DD48 820 .long 0x1273DD48 821 .long 0x1294DD48 822 .long 0x12B5DD48 823 824 addi 11,1,32+15 825 .long 0x11CEE548 826 .long 0x11EFE548 827 .long 0x1210E548 828 .long 0x1231E548 829 .long 0x1252E548 830 .long 0x1273E548 831 .long 0x1294E548 832 .long 0x12B5E548 833 lvx 24,0,11 834 835 .long 0x11CEED48 836 .long 0x11EFED48 837 .long 0x1210ED48 838 .long 0x1231ED48 839 .long 0x1252ED48 840 .long 0x1273ED48 841 .long 0x1294ED48 842 .long 0x12B5ED48 843 lvx 25,8,11 844 845 .long 0x11CEF548 846 vxor 4,4,31 847 .long 0x11EFF548 848 vxor 0,0,31 849 .long 0x1210F548 850 vxor 1,1,31 851 .long 0x1231F548 852 vxor 2,2,31 853 .long 0x1252F548 854 vxor 3,3,31 855 .long 0x1273F548 856 vxor 10,10,31 857 .long 0x1294F548 858 vxor 11,11,31 859 .long 0x12B5F548 860 vxor 12,12,31 861 862 .long 0x11CE2549 863 .long 0x11EF0549 864 .long 0x7C001E99 865 .long 0x12100D49 866 .long 0x7C281E99 867 .long 0x12311549 868 869 .long 0x7C5A1E99 870 .long 0x12521D49 871 872 .long 0x7C7B1E99 873 .long 0x12735549 874 875 .long 0x7D5C1E99 876 .long 0x12945D49 877 878 .long 0x7D7D1E99 879 .long 0x12B56549 880 881 .long 0x7D9E1E99 882 vor 4,13,13 883 884 .long 0x7DBF1E99 885 addi 3,3,0x80 886 887 888 889 .long 0x7DC02799 890 891 vxor 14,0,23 892 893 .long 0x7DE82799 894 895 vxor 15,1,23 896 897 .long 0x7E1A2799 898 vxor 16,2,23 899 900 .long 0x7E3B2799 901 vxor 17,3,23 902 903 .long 0x7E5C2799 904 vxor 18,10,23 905 906 .long 0x7E7D2799 907 vxor 19,11,23 908 909 .long 0x7E9E2799 910 vxor 20,12,23 911 .long 0x7EBF2799 912 addi 4,4,0x80 913 vxor 21,13,23 914 915 mtctr 9 916 beq .Loop_cbc_dec8x 917 918 addic. 5,5,128 919 beq .Lcbc_dec8x_done 920 nop 921 nop 922 923.Loop_cbc_dec8x_tail: 924 .long 0x11EFC548 925 .long 0x1210C548 926 .long 0x1231C548 927 .long 0x1252C548 928 .long 0x1273C548 929 .long 0x1294C548 930 .long 0x12B5C548 931 lvx 24,26,11 932 addi 11,11,0x20 933 934 .long 0x11EFCD48 935 .long 0x1210CD48 936 .long 0x1231CD48 937 .long 0x1252CD48 938 .long 0x1273CD48 939 .long 0x1294CD48 940 .long 0x12B5CD48 941 lvx 25,8,11 942 bdnz .Loop_cbc_dec8x_tail 943 944 .long 0x11EFC548 945 .long 0x1210C548 946 .long 0x1231C548 947 .long 0x1252C548 948 .long 0x1273C548 949 .long 0x1294C548 950 .long 0x12B5C548 951 952 .long 0x11EFCD48 953 .long 0x1210CD48 954 .long 0x1231CD48 955 .long 0x1252CD48 956 .long 0x1273CD48 957 .long 0x1294CD48 958 .long 0x12B5CD48 959 960 .long 0x11EFD548 961 .long 0x1210D548 962 .long 0x1231D548 963 .long 0x1252D548 964 .long 0x1273D548 965 .long 0x1294D548 966 .long 0x12B5D548 967 968 .long 0x11EFDD48 969 .long 0x1210DD48 970 .long 0x1231DD48 971 .long 0x1252DD48 972 .long 0x1273DD48 973 .long 0x1294DD48 974 .long 0x12B5DD48 975 976 .long 0x11EFE548 977 .long 0x1210E548 978 .long 0x1231E548 979 .long 0x1252E548 980 .long 0x1273E548 981 .long 0x1294E548 982 .long 0x12B5E548 983 984 .long 0x11EFED48 985 .long 0x1210ED48 986 .long 0x1231ED48 987 .long 0x1252ED48 988 .long 0x1273ED48 989 .long 0x1294ED48 990 .long 0x12B5ED48 991 992 .long 0x11EFF548 993 vxor 4,4,31 994 .long 0x1210F548 995 vxor 1,1,31 996 .long 0x1231F548 997 vxor 2,2,31 998 .long 0x1252F548 999 vxor 3,3,31 1000 .long 0x1273F548 1001 vxor 10,10,31 1002 .long 0x1294F548 1003 vxor 11,11,31 1004 .long 0x12B5F548 1005 vxor 12,12,31 1006 1007 cmplwi 5,32 1008 blt .Lcbc_dec8x_one 1009 nop 1010 beq .Lcbc_dec8x_two 1011 cmplwi 5,64 1012 blt .Lcbc_dec8x_three 1013 nop 1014 beq .Lcbc_dec8x_four 1015 cmplwi 5,96 1016 blt .Lcbc_dec8x_five 1017 nop 1018 beq .Lcbc_dec8x_six 1019 1020.Lcbc_dec8x_seven: 1021 .long 0x11EF2549 1022 .long 0x12100D49 1023 .long 0x12311549 1024 .long 0x12521D49 1025 .long 0x12735549 1026 .long 0x12945D49 1027 .long 0x12B56549 1028 vor 4,13,13 1029 1030 1031 1032 .long 0x7DE02799 1033 1034 .long 0x7E082799 1035 1036 .long 0x7E3A2799 1037 1038 .long 0x7E5B2799 1039 1040 .long 0x7E7C2799 1041 1042 .long 0x7E9D2799 1043 .long 0x7EBE2799 1044 addi 4,4,0x70 1045 b .Lcbc_dec8x_done 1046 1047.align 5 1048.Lcbc_dec8x_six: 1049 .long 0x12102549 1050 .long 0x12311549 1051 .long 0x12521D49 1052 .long 0x12735549 1053 .long 0x12945D49 1054 .long 0x12B56549 1055 vor 4,13,13 1056 1057 1058 1059 .long 0x7E002799 1060 1061 .long 0x7E282799 1062 1063 .long 0x7E5A2799 1064 1065 .long 0x7E7B2799 1066 1067 .long 0x7E9C2799 1068 .long 0x7EBD2799 1069 addi 4,4,0x60 1070 b .Lcbc_dec8x_done 1071 1072.align 5 1073.Lcbc_dec8x_five: 1074 .long 0x12312549 1075 .long 0x12521D49 1076 .long 0x12735549 1077 .long 0x12945D49 1078 .long 0x12B56549 1079 vor 4,13,13 1080 1081 1082 1083 .long 0x7E202799 1084 1085 .long 0x7E482799 1086 1087 .long 0x7E7A2799 1088 1089 .long 0x7E9B2799 1090 .long 0x7EBC2799 1091 addi 4,4,0x50 1092 b .Lcbc_dec8x_done 1093 1094.align 5 1095.Lcbc_dec8x_four: 1096 .long 0x12522549 1097 .long 0x12735549 1098 .long 0x12945D49 1099 .long 0x12B56549 1100 vor 4,13,13 1101 1102 1103 1104 .long 0x7E402799 1105 1106 .long 0x7E682799 1107 1108 .long 0x7E9A2799 1109 .long 0x7EBB2799 1110 addi 4,4,0x40 1111 b .Lcbc_dec8x_done 1112 1113.align 5 1114.Lcbc_dec8x_three: 1115 .long 0x12732549 1116 .long 0x12945D49 1117 .long 0x12B56549 1118 vor 4,13,13 1119 1120 1121 1122 .long 0x7E602799 1123 1124 .long 0x7E882799 1125 .long 0x7EBA2799 1126 addi 4,4,0x30 1127 b .Lcbc_dec8x_done 1128 1129.align 5 1130.Lcbc_dec8x_two: 1131 .long 0x12942549 1132 .long 0x12B56549 1133 vor 4,13,13 1134 1135 1136 1137 .long 0x7E802799 1138 .long 0x7EA82799 1139 addi 4,4,0x20 1140 b .Lcbc_dec8x_done 1141 1142.align 5 1143.Lcbc_dec8x_one: 1144 .long 0x12B52549 1145 vor 4,13,13 1146 1147 1148 .long 0x7EA02799 1149 addi 4,4,0x10 1150 1151.Lcbc_dec8x_done: 1152 1153 .long 0x7C803F99 1154 1155 li 10,47 1156 li 11,63 1157 stvx 6,10,1 1158 addi 10,10,32 1159 stvx 6,11,1 1160 addi 11,11,32 1161 stvx 6,10,1 1162 addi 10,10,32 1163 stvx 6,11,1 1164 addi 11,11,32 1165 stvx 6,10,1 1166 addi 10,10,32 1167 stvx 6,11,1 1168 addi 11,11,32 1169 stvx 6,10,1 1170 addi 10,10,32 1171 stvx 6,11,1 1172 addi 11,11,32 1173 1174 mtspr 256,12 1175 lvx 20,10,1 1176 addi 10,10,32 1177 lvx 21,11,1 1178 addi 11,11,32 1179 lvx 22,10,1 1180 addi 10,10,32 1181 lvx 23,11,1 1182 addi 11,11,32 1183 lvx 24,10,1 1184 addi 10,10,32 1185 lvx 25,11,1 1186 addi 11,11,32 1187 lvx 26,10,1 1188 addi 10,10,32 1189 lvx 27,11,1 1190 addi 11,11,32 1191 lvx 28,10,1 1192 addi 10,10,32 1193 lvx 29,11,1 1194 addi 11,11,32 1195 lvx 30,10,1 1196 lvx 31,11,1 1197 lwz 26,368(1) 1198 lwz 27,372(1) 1199 lwz 28,376(1) 1200 lwz 29,380(1) 1201 lwz 30,384(1) 1202 lwz 31,388(1) 1203 addi 1,1,392 1204 blr 1205.long 0 1206.byte 0,12,0x04,0,0x80,6,6,0 1207.long 0 1208.size aes_p8_cbc_encrypt,.-aes_p8_cbc_encrypt 1209.globl aes_p8_ctr32_encrypt_blocks 1210.type aes_p8_ctr32_encrypt_blocks,@function 1211.align 5 1212aes_p8_ctr32_encrypt_blocks: 1213 cmplwi 5,1 1214 .long 0x4dc00020 1215 1216 lis 0,0xfff0 1217 mfspr 12,256 1218 mtspr 256,0 1219 1220 li 10,15 1221 vxor 0,0,0 1222 1223 1224 lvx 4,0,7 1225 lvsl 6,0,7 1226 lvx 5,10,7 1227 vspltisb 11,1 1228 1229 vperm 4,4,5,6 1230 vsldoi 11,0,11,1 1231 1232 neg 11,3 1233 lvsl 10,0,6 1234 lwz 9,240(6) 1235 1236 lvsr 6,0,11 1237 lvx 5,0,3 1238 addi 3,3,15 1239 1240 1241 srwi 9,9,1 1242 li 10,16 1243 subi 9,9,1 1244 1245 cmplwi 5,8 1246 bge _aesp8_ctr32_encrypt8x 1247 1248 lvsr 8,0,4 1249 vspltisb 9,-1 1250 lvx 7,0,4 1251 vperm 9,0,9,8 1252 1253 1254 lvx 0,0,6 1255 mtctr 9 1256 lvx 1,10,6 1257 addi 10,10,16 1258 vperm 0,0,1,10 1259 vxor 2,4,0 1260 lvx 0,10,6 1261 addi 10,10,16 1262 b .Loop_ctr32_enc 1263 1264.align 5 1265.Loop_ctr32_enc: 1266 vperm 1,1,0,10 1267 .long 0x10420D08 1268 lvx 1,10,6 1269 addi 10,10,16 1270 vperm 0,0,1,10 1271 .long 0x10420508 1272 lvx 0,10,6 1273 addi 10,10,16 1274 bdnz .Loop_ctr32_enc 1275 1276 vadduwm 4,4,11 1277 vor 3,5,5 1278 lvx 5,0,3 1279 addi 3,3,16 1280 subic. 5,5,1 1281 1282 vperm 1,1,0,10 1283 .long 0x10420D08 1284 lvx 1,10,6 1285 vperm 3,3,5,6 1286 li 10,16 1287 vperm 1,0,1,10 1288 lvx 0,0,6 1289 vxor 3,3,1 1290 .long 0x10421D09 1291 1292 lvx 1,10,6 1293 addi 10,10,16 1294 vperm 2,2,2,8 1295 vsel 3,7,2,9 1296 mtctr 9 1297 vperm 0,0,1,10 1298 vor 7,2,2 1299 vxor 2,4,0 1300 lvx 0,10,6 1301 addi 10,10,16 1302 stvx 3,0,4 1303 addi 4,4,16 1304 bne .Loop_ctr32_enc 1305 1306 addi 4,4,-1 1307 lvx 2,0,4 1308 vsel 2,7,2,9 1309 stvx 2,0,4 1310 1311 mtspr 256,12 1312 blr 1313.long 0 1314.byte 0,12,0x14,0,0,0,6,0 1315.long 0 1316.align 5 1317_aesp8_ctr32_encrypt8x: 1318 stwu 1,-392(1) 1319 li 10,175 1320 li 11,191 1321 stvx 20,10,1 1322 addi 10,10,32 1323 stvx 21,11,1 1324 addi 11,11,32 1325 stvx 22,10,1 1326 addi 10,10,32 1327 stvx 23,11,1 1328 addi 11,11,32 1329 stvx 24,10,1 1330 addi 10,10,32 1331 stvx 25,11,1 1332 addi 11,11,32 1333 stvx 26,10,1 1334 addi 10,10,32 1335 stvx 27,11,1 1336 addi 11,11,32 1337 stvx 28,10,1 1338 addi 10,10,32 1339 stvx 29,11,1 1340 addi 11,11,32 1341 stvx 30,10,1 1342 stvx 31,11,1 1343 li 0,-1 1344 stw 12,364(1) 1345 li 8,0x10 1346 stw 26,368(1) 1347 li 26,0x20 1348 stw 27,372(1) 1349 li 27,0x30 1350 stw 28,376(1) 1351 li 28,0x40 1352 stw 29,380(1) 1353 li 29,0x50 1354 stw 30,384(1) 1355 li 30,0x60 1356 stw 31,388(1) 1357 li 31,0x70 1358 mtspr 256,0 1359 1360 subi 9,9,3 1361 1362 lvx 23,0,6 1363 lvx 30,8,6 1364 addi 6,6,0x20 1365 lvx 31,0,6 1366 vperm 23,23,30,10 1367 addi 11,1,32+15 1368 mtctr 9 1369 1370.Load_ctr32_enc_key: 1371 vperm 24,30,31,10 1372 lvx 30,8,6 1373 addi 6,6,0x20 1374 stvx 24,0,11 1375 vperm 25,31,30,10 1376 lvx 31,0,6 1377 stvx 25,8,11 1378 addi 11,11,0x20 1379 bdnz .Load_ctr32_enc_key 1380 1381 lvx 26,8,6 1382 vperm 24,30,31,10 1383 lvx 27,26,6 1384 stvx 24,0,11 1385 vperm 25,31,26,10 1386 lvx 28,27,6 1387 stvx 25,8,11 1388 addi 11,1,32+15 1389 vperm 26,26,27,10 1390 lvx 29,28,6 1391 vperm 27,27,28,10 1392 lvx 30,29,6 1393 vperm 28,28,29,10 1394 lvx 31,30,6 1395 vperm 29,29,30,10 1396 lvx 15,31,6 1397 vperm 30,30,31,10 1398 lvx 24,0,11 1399 vperm 31,31,15,10 1400 lvx 25,8,11 1401 1402 vadduwm 7,11,11 1403 subi 3,3,15 1404 slwi 5,5,4 1405 1406 vadduwm 16,4,11 1407 vadduwm 17,4,7 1408 vxor 15,4,23 1409 1410 vadduwm 18,16,7 1411 vxor 16,16,23 1412 1413 vadduwm 19,17,7 1414 vxor 17,17,23 1415 1416 vadduwm 20,18,7 1417 vxor 18,18,23 1418 1419 vadduwm 21,19,7 1420 vxor 19,19,23 1421 vadduwm 22,20,7 1422 vxor 20,20,23 1423 vadduwm 4,21,7 1424 vxor 21,21,23 1425 vxor 22,22,23 1426 1427 mtctr 9 1428 b .Loop_ctr32_enc8x 1429.align 5 1430.Loop_ctr32_enc8x: 1431 .long 0x11EFC508 1432 .long 0x1210C508 1433 .long 0x1231C508 1434 .long 0x1252C508 1435 .long 0x1273C508 1436 .long 0x1294C508 1437 .long 0x12B5C508 1438 .long 0x12D6C508 1439.Loop_ctr32_enc8x_middle: 1440 lvx 24,26,11 1441 addi 11,11,0x20 1442 1443 .long 0x11EFCD08 1444 .long 0x1210CD08 1445 .long 0x1231CD08 1446 .long 0x1252CD08 1447 .long 0x1273CD08 1448 .long 0x1294CD08 1449 .long 0x12B5CD08 1450 .long 0x12D6CD08 1451 lvx 25,8,11 1452 bdnz .Loop_ctr32_enc8x 1453 1454 subic 11,5,256 1455 .long 0x11EFC508 1456 .long 0x1210C508 1457 .long 0x1231C508 1458 .long 0x1252C508 1459 .long 0x1273C508 1460 .long 0x1294C508 1461 .long 0x12B5C508 1462 .long 0x12D6C508 1463 1464 subfe 0,0,0 1465 .long 0x11EFCD08 1466 .long 0x1210CD08 1467 .long 0x1231CD08 1468 .long 0x1252CD08 1469 .long 0x1273CD08 1470 .long 0x1294CD08 1471 .long 0x12B5CD08 1472 .long 0x12D6CD08 1473 1474 and 0,0,11 1475 addi 11,1,32+15 1476 .long 0x11EFD508 1477 .long 0x1210D508 1478 .long 0x1231D508 1479 .long 0x1252D508 1480 .long 0x1273D508 1481 .long 0x1294D508 1482 .long 0x12B5D508 1483 .long 0x12D6D508 1484 lvx 24,0,11 1485 1486 subic 5,5,129 1487 .long 0x11EFDD08 1488 addi 5,5,1 1489 .long 0x1210DD08 1490 .long 0x1231DD08 1491 .long 0x1252DD08 1492 .long 0x1273DD08 1493 .long 0x1294DD08 1494 .long 0x12B5DD08 1495 .long 0x12D6DD08 1496 lvx 25,8,11 1497 1498 .long 0x11EFE508 1499 .long 0x7C001E99 1500 .long 0x1210E508 1501 .long 0x7C281E99 1502 .long 0x1231E508 1503 .long 0x7C5A1E99 1504 .long 0x1252E508 1505 .long 0x7C7B1E99 1506 .long 0x1273E508 1507 .long 0x7D5C1E99 1508 .long 0x1294E508 1509 .long 0x7D9D1E99 1510 .long 0x12B5E508 1511 .long 0x7DBE1E99 1512 .long 0x12D6E508 1513 .long 0x7DDF1E99 1514 addi 3,3,0x80 1515 1516 .long 0x11EFED08 1517 1518 .long 0x1210ED08 1519 1520 .long 0x1231ED08 1521 1522 .long 0x1252ED08 1523 1524 .long 0x1273ED08 1525 1526 .long 0x1294ED08 1527 1528 .long 0x12B5ED08 1529 1530 .long 0x12D6ED08 1531 1532 1533 add 3,3,0 1534 1535 1536 1537 subfe. 0,0,0 1538 .long 0x11EFF508 1539 vxor 0,0,31 1540 .long 0x1210F508 1541 vxor 1,1,31 1542 .long 0x1231F508 1543 vxor 2,2,31 1544 .long 0x1252F508 1545 vxor 3,3,31 1546 .long 0x1273F508 1547 vxor 10,10,31 1548 .long 0x1294F508 1549 vxor 12,12,31 1550 .long 0x12B5F508 1551 vxor 13,13,31 1552 .long 0x12D6F508 1553 vxor 14,14,31 1554 1555 bne .Lctr32_enc8x_break 1556 1557 .long 0x100F0509 1558 .long 0x10300D09 1559 vadduwm 16,4,11 1560 .long 0x10511509 1561 vadduwm 17,4,7 1562 vxor 15,4,23 1563 .long 0x10721D09 1564 vadduwm 18,16,7 1565 vxor 16,16,23 1566 .long 0x11535509 1567 vadduwm 19,17,7 1568 vxor 17,17,23 1569 .long 0x11946509 1570 vadduwm 20,18,7 1571 vxor 18,18,23 1572 .long 0x11B56D09 1573 vadduwm 21,19,7 1574 vxor 19,19,23 1575 .long 0x11D67509 1576 vadduwm 22,20,7 1577 vxor 20,20,23 1578 1579 vadduwm 4,21,7 1580 vxor 21,21,23 1581 1582 vxor 22,22,23 1583 mtctr 9 1584 1585 .long 0x11EFC508 1586 .long 0x7C002799 1587 1588 .long 0x1210C508 1589 .long 0x7C282799 1590 1591 .long 0x1231C508 1592 .long 0x7C5A2799 1593 1594 .long 0x1252C508 1595 .long 0x7C7B2799 1596 1597 .long 0x1273C508 1598 .long 0x7D5C2799 1599 1600 .long 0x1294C508 1601 .long 0x7D9D2799 1602 1603 .long 0x12B5C508 1604 .long 0x7DBE2799 1605 .long 0x12D6C508 1606 .long 0x7DDF2799 1607 addi 4,4,0x80 1608 1609 b .Loop_ctr32_enc8x_middle 1610 1611.align 5 1612.Lctr32_enc8x_break: 1613 cmpwi 5,-0x60 1614 blt .Lctr32_enc8x_one 1615 nop 1616 beq .Lctr32_enc8x_two 1617 cmpwi 5,-0x40 1618 blt .Lctr32_enc8x_three 1619 nop 1620 beq .Lctr32_enc8x_four 1621 cmpwi 5,-0x20 1622 blt .Lctr32_enc8x_five 1623 nop 1624 beq .Lctr32_enc8x_six 1625 cmpwi 5,0x00 1626 blt .Lctr32_enc8x_seven 1627 1628.Lctr32_enc8x_eight: 1629 .long 0x11EF0509 1630 .long 0x12100D09 1631 .long 0x12311509 1632 .long 0x12521D09 1633 .long 0x12735509 1634 .long 0x12946509 1635 .long 0x12B56D09 1636 .long 0x12D67509 1637 1638 1639 1640 .long 0x7DE02799 1641 1642 .long 0x7E082799 1643 1644 .long 0x7E3A2799 1645 1646 .long 0x7E5B2799 1647 1648 .long 0x7E7C2799 1649 1650 .long 0x7E9D2799 1651 1652 .long 0x7EBE2799 1653 .long 0x7EDF2799 1654 addi 4,4,0x80 1655 b .Lctr32_enc8x_done 1656 1657.align 5 1658.Lctr32_enc8x_seven: 1659 .long 0x11EF0D09 1660 .long 0x12101509 1661 .long 0x12311D09 1662 .long 0x12525509 1663 .long 0x12736509 1664 .long 0x12946D09 1665 .long 0x12B57509 1666 1667 1668 1669 .long 0x7DE02799 1670 1671 .long 0x7E082799 1672 1673 .long 0x7E3A2799 1674 1675 .long 0x7E5B2799 1676 1677 .long 0x7E7C2799 1678 1679 .long 0x7E9D2799 1680 .long 0x7EBE2799 1681 addi 4,4,0x70 1682 b .Lctr32_enc8x_done 1683 1684.align 5 1685.Lctr32_enc8x_six: 1686 .long 0x11EF1509 1687 .long 0x12101D09 1688 .long 0x12315509 1689 .long 0x12526509 1690 .long 0x12736D09 1691 .long 0x12947509 1692 1693 1694 1695 .long 0x7DE02799 1696 1697 .long 0x7E082799 1698 1699 .long 0x7E3A2799 1700 1701 .long 0x7E5B2799 1702 1703 .long 0x7E7C2799 1704 .long 0x7E9D2799 1705 addi 4,4,0x60 1706 b .Lctr32_enc8x_done 1707 1708.align 5 1709.Lctr32_enc8x_five: 1710 .long 0x11EF1D09 1711 .long 0x12105509 1712 .long 0x12316509 1713 .long 0x12526D09 1714 .long 0x12737509 1715 1716 1717 1718 .long 0x7DE02799 1719 1720 .long 0x7E082799 1721 1722 .long 0x7E3A2799 1723 1724 .long 0x7E5B2799 1725 .long 0x7E7C2799 1726 addi 4,4,0x50 1727 b .Lctr32_enc8x_done 1728 1729.align 5 1730.Lctr32_enc8x_four: 1731 .long 0x11EF5509 1732 .long 0x12106509 1733 .long 0x12316D09 1734 .long 0x12527509 1735 1736 1737 1738 .long 0x7DE02799 1739 1740 .long 0x7E082799 1741 1742 .long 0x7E3A2799 1743 .long 0x7E5B2799 1744 addi 4,4,0x40 1745 b .Lctr32_enc8x_done 1746 1747.align 5 1748.Lctr32_enc8x_three: 1749 .long 0x11EF6509 1750 .long 0x12106D09 1751 .long 0x12317509 1752 1753 1754 1755 .long 0x7DE02799 1756 1757 .long 0x7E082799 1758 .long 0x7E3A2799 1759 addi 4,4,0x30 1760 b .Lctr32_enc8x_done 1761 1762.align 5 1763.Lctr32_enc8x_two: 1764 .long 0x11EF6D09 1765 .long 0x12107509 1766 1767 1768 1769 .long 0x7DE02799 1770 .long 0x7E082799 1771 addi 4,4,0x20 1772 b .Lctr32_enc8x_done 1773 1774.align 5 1775.Lctr32_enc8x_one: 1776 .long 0x11EF7509 1777 1778 1779 .long 0x7DE02799 1780 addi 4,4,0x10 1781 1782.Lctr32_enc8x_done: 1783 li 10,47 1784 li 11,63 1785 stvx 6,10,1 1786 addi 10,10,32 1787 stvx 6,11,1 1788 addi 11,11,32 1789 stvx 6,10,1 1790 addi 10,10,32 1791 stvx 6,11,1 1792 addi 11,11,32 1793 stvx 6,10,1 1794 addi 10,10,32 1795 stvx 6,11,1 1796 addi 11,11,32 1797 stvx 6,10,1 1798 addi 10,10,32 1799 stvx 6,11,1 1800 addi 11,11,32 1801 1802 mtspr 256,12 1803 lvx 20,10,1 1804 addi 10,10,32 1805 lvx 21,11,1 1806 addi 11,11,32 1807 lvx 22,10,1 1808 addi 10,10,32 1809 lvx 23,11,1 1810 addi 11,11,32 1811 lvx 24,10,1 1812 addi 10,10,32 1813 lvx 25,11,1 1814 addi 11,11,32 1815 lvx 26,10,1 1816 addi 10,10,32 1817 lvx 27,11,1 1818 addi 11,11,32 1819 lvx 28,10,1 1820 addi 10,10,32 1821 lvx 29,11,1 1822 addi 11,11,32 1823 lvx 30,10,1 1824 lvx 31,11,1 1825 lwz 26,368(1) 1826 lwz 27,372(1) 1827 lwz 28,376(1) 1828 lwz 29,380(1) 1829 lwz 30,384(1) 1830 lwz 31,388(1) 1831 addi 1,1,392 1832 blr 1833.long 0 1834.byte 0,12,0x04,0,0x80,6,6,0 1835.long 0 1836.size aes_p8_ctr32_encrypt_blocks,.-aes_p8_ctr32_encrypt_blocks 1837.globl aes_p8_xts_encrypt 1838.type aes_p8_xts_encrypt,@function 1839.align 5 1840aes_p8_xts_encrypt: 1841 mr 10,3 1842 li 3,-1 1843 cmplwi 5,16 1844 .long 0x4dc00020 1845 1846 lis 0,0xfff0 1847 mfspr 12,256 1848 li 11,0 1849 mtspr 256,0 1850 1851 vspltisb 9,0x07 1852 1853 1854 1855 1856 li 3,15 1857 lvx 8,0,8 1858 lvsl 5,0,8 1859 lvx 4,3,8 1860 1861 vperm 8,8,4,5 1862 1863 neg 11,10 1864 lvsr 5,0,11 1865 lvx 2,0,10 1866 addi 10,10,15 1867 1868 1869 cmplwi 7,0 1870 beq .Lxts_enc_no_key2 1871 1872 lvsl 7,0,7 1873 lwz 9,240(7) 1874 srwi 9,9,1 1875 subi 9,9,1 1876 li 3,16 1877 1878 lvx 0,0,7 1879 lvx 1,3,7 1880 addi 3,3,16 1881 vperm 0,0,1,7 1882 vxor 8,8,0 1883 lvx 0,3,7 1884 addi 3,3,16 1885 mtctr 9 1886 1887.Ltweak_xts_enc: 1888 vperm 1,1,0,7 1889 .long 0x11080D08 1890 lvx 1,3,7 1891 addi 3,3,16 1892 vperm 0,0,1,7 1893 .long 0x11080508 1894 lvx 0,3,7 1895 addi 3,3,16 1896 bdnz .Ltweak_xts_enc 1897 1898 vperm 1,1,0,7 1899 .long 0x11080D08 1900 lvx 1,3,7 1901 vperm 0,0,1,7 1902 .long 0x11080509 1903 1904 li 8,0 1905 b .Lxts_enc 1906 1907.Lxts_enc_no_key2: 1908 li 3,-16 1909 and 5,5,3 1910 1911 1912.Lxts_enc: 1913 lvx 4,0,10 1914 addi 10,10,16 1915 1916 lvsl 7,0,6 1917 lwz 9,240(6) 1918 srwi 9,9,1 1919 subi 9,9,1 1920 li 3,16 1921 1922 vslb 10,9,9 1923 vor 10,10,9 1924 vspltisb 11,1 1925 vsldoi 10,10,11,15 1926 1927 cmplwi 5,96 1928 bge _aesp8_xts_encrypt6x 1929 1930 andi. 7,5,15 1931 subic 0,5,32 1932 subi 7,7,16 1933 subfe 0,0,0 1934 and 0,0,7 1935 add 10,10,0 1936 1937 lvx 0,0,6 1938 lvx 1,3,6 1939 addi 3,3,16 1940 vperm 2,2,4,5 1941 vperm 0,0,1,7 1942 vxor 2,2,8 1943 vxor 2,2,0 1944 lvx 0,3,6 1945 addi 3,3,16 1946 mtctr 9 1947 b .Loop_xts_enc 1948 1949.align 5 1950.Loop_xts_enc: 1951 vperm 1,1,0,7 1952 .long 0x10420D08 1953 lvx 1,3,6 1954 addi 3,3,16 1955 vperm 0,0,1,7 1956 .long 0x10420508 1957 lvx 0,3,6 1958 addi 3,3,16 1959 bdnz .Loop_xts_enc 1960 1961 vperm 1,1,0,7 1962 .long 0x10420D08 1963 lvx 1,3,6 1964 li 3,16 1965 vperm 0,0,1,7 1966 vxor 0,0,8 1967 .long 0x10620509 1968 1969 1970 nop 1971 1972 .long 0x7C602799 1973 addi 4,4,16 1974 1975 subic. 5,5,16 1976 beq .Lxts_enc_done 1977 1978 vor 2,4,4 1979 lvx 4,0,10 1980 addi 10,10,16 1981 lvx 0,0,6 1982 lvx 1,3,6 1983 addi 3,3,16 1984 1985 subic 0,5,32 1986 subfe 0,0,0 1987 and 0,0,7 1988 add 10,10,0 1989 1990 vsrab 11,8,9 1991 vaddubm 8,8,8 1992 vsldoi 11,11,11,15 1993 vand 11,11,10 1994 vxor 8,8,11 1995 1996 vperm 2,2,4,5 1997 vperm 0,0,1,7 1998 vxor 2,2,8 1999 vxor 3,3,0 2000 vxor 2,2,0 2001 lvx 0,3,6 2002 addi 3,3,16 2003 2004 mtctr 9 2005 cmplwi 5,16 2006 bge .Loop_xts_enc 2007 2008 vxor 3,3,8 2009 lvsr 5,0,5 2010 vxor 4,4,4 2011 vspltisb 11,-1 2012 vperm 4,4,11,5 2013 vsel 2,2,3,4 2014 2015 subi 11,4,17 2016 subi 4,4,16 2017 mtctr 5 2018 li 5,16 2019.Loop_xts_enc_steal: 2020 lbzu 0,1(11) 2021 stb 0,16(11) 2022 bdnz .Loop_xts_enc_steal 2023 2024 mtctr 9 2025 b .Loop_xts_enc 2026 2027.Lxts_enc_done: 2028 cmplwi 8,0 2029 beq .Lxts_enc_ret 2030 2031 vsrab 11,8,9 2032 vaddubm 8,8,8 2033 vsldoi 11,11,11,15 2034 vand 11,11,10 2035 vxor 8,8,11 2036 2037 2038 .long 0x7D004799 2039 2040.Lxts_enc_ret: 2041 mtspr 256,12 2042 li 3,0 2043 blr 2044.long 0 2045.byte 0,12,0x04,0,0x80,6,6,0 2046.long 0 2047.size aes_p8_xts_encrypt,.-aes_p8_xts_encrypt 2048 2049.globl aes_p8_xts_decrypt 2050.type aes_p8_xts_decrypt,@function 2051.align 5 2052aes_p8_xts_decrypt: 2053 mr 10,3 2054 li 3,-1 2055 cmplwi 5,16 2056 .long 0x4dc00020 2057 2058 lis 0,0xfff8 2059 mfspr 12,256 2060 li 11,0 2061 mtspr 256,0 2062 2063 andi. 0,5,15 2064 neg 0,0 2065 andi. 0,0,16 2066 sub 5,5,0 2067 2068 vspltisb 9,0x07 2069 2070 2071 2072 2073 li 3,15 2074 lvx 8,0,8 2075 lvsl 5,0,8 2076 lvx 4,3,8 2077 2078 vperm 8,8,4,5 2079 2080 neg 11,10 2081 lvsr 5,0,11 2082 lvx 2,0,10 2083 addi 10,10,15 2084 2085 2086 cmplwi 7,0 2087 beq .Lxts_dec_no_key2 2088 2089 lvsl 7,0,7 2090 lwz 9,240(7) 2091 srwi 9,9,1 2092 subi 9,9,1 2093 li 3,16 2094 2095 lvx 0,0,7 2096 lvx 1,3,7 2097 addi 3,3,16 2098 vperm 0,0,1,7 2099 vxor 8,8,0 2100 lvx 0,3,7 2101 addi 3,3,16 2102 mtctr 9 2103 2104.Ltweak_xts_dec: 2105 vperm 1,1,0,7 2106 .long 0x11080D08 2107 lvx 1,3,7 2108 addi 3,3,16 2109 vperm 0,0,1,7 2110 .long 0x11080508 2111 lvx 0,3,7 2112 addi 3,3,16 2113 bdnz .Ltweak_xts_dec 2114 2115 vperm 1,1,0,7 2116 .long 0x11080D08 2117 lvx 1,3,7 2118 vperm 0,0,1,7 2119 .long 0x11080509 2120 2121 li 8,0 2122 b .Lxts_dec 2123 2124.Lxts_dec_no_key2: 2125 neg 3,5 2126 andi. 3,3,15 2127 add 5,5,3 2128 2129 2130.Lxts_dec: 2131 lvx 4,0,10 2132 addi 10,10,16 2133 2134 lvsl 7,0,6 2135 lwz 9,240(6) 2136 srwi 9,9,1 2137 subi 9,9,1 2138 li 3,16 2139 2140 vslb 10,9,9 2141 vor 10,10,9 2142 vspltisb 11,1 2143 vsldoi 10,10,11,15 2144 2145 cmplwi 5,96 2146 bge _aesp8_xts_decrypt6x 2147 2148 lvx 0,0,6 2149 lvx 1,3,6 2150 addi 3,3,16 2151 vperm 2,2,4,5 2152 vperm 0,0,1,7 2153 vxor 2,2,8 2154 vxor 2,2,0 2155 lvx 0,3,6 2156 addi 3,3,16 2157 mtctr 9 2158 2159 cmplwi 5,16 2160 blt .Ltail_xts_dec 2161 b .Loop_xts_dec 2162 2163.align 5 2164.Loop_xts_dec: 2165 vperm 1,1,0,7 2166 .long 0x10420D48 2167 lvx 1,3,6 2168 addi 3,3,16 2169 vperm 0,0,1,7 2170 .long 0x10420548 2171 lvx 0,3,6 2172 addi 3,3,16 2173 bdnz .Loop_xts_dec 2174 2175 vperm 1,1,0,7 2176 .long 0x10420D48 2177 lvx 1,3,6 2178 li 3,16 2179 vperm 0,0,1,7 2180 vxor 0,0,8 2181 .long 0x10620549 2182 2183 2184 nop 2185 2186 .long 0x7C602799 2187 addi 4,4,16 2188 2189 subic. 5,5,16 2190 beq .Lxts_dec_done 2191 2192 vor 2,4,4 2193 lvx 4,0,10 2194 addi 10,10,16 2195 lvx 0,0,6 2196 lvx 1,3,6 2197 addi 3,3,16 2198 2199 vsrab 11,8,9 2200 vaddubm 8,8,8 2201 vsldoi 11,11,11,15 2202 vand 11,11,10 2203 vxor 8,8,11 2204 2205 vperm 2,2,4,5 2206 vperm 0,0,1,7 2207 vxor 2,2,8 2208 vxor 2,2,0 2209 lvx 0,3,6 2210 addi 3,3,16 2211 2212 mtctr 9 2213 cmplwi 5,16 2214 bge .Loop_xts_dec 2215 2216.Ltail_xts_dec: 2217 vsrab 11,8,9 2218 vaddubm 12,8,8 2219 vsldoi 11,11,11,15 2220 vand 11,11,10 2221 vxor 12,12,11 2222 2223 subi 10,10,16 2224 add 10,10,5 2225 2226 vxor 2,2,8 2227 vxor 2,2,12 2228 2229.Loop_xts_dec_short: 2230 vperm 1,1,0,7 2231 .long 0x10420D48 2232 lvx 1,3,6 2233 addi 3,3,16 2234 vperm 0,0,1,7 2235 .long 0x10420548 2236 lvx 0,3,6 2237 addi 3,3,16 2238 bdnz .Loop_xts_dec_short 2239 2240 vperm 1,1,0,7 2241 .long 0x10420D48 2242 lvx 1,3,6 2243 li 3,16 2244 vperm 0,0,1,7 2245 vxor 0,0,12 2246 .long 0x10620549 2247 2248 2249 nop 2250 2251 .long 0x7C602799 2252 2253 vor 2,4,4 2254 lvx 4,0,10 2255 2256 lvx 0,0,6 2257 lvx 1,3,6 2258 addi 3,3,16 2259 vperm 2,2,4,5 2260 vperm 0,0,1,7 2261 2262 lvsr 5,0,5 2263 vxor 4,4,4 2264 vspltisb 11,-1 2265 vperm 4,4,11,5 2266 vsel 2,2,3,4 2267 2268 vxor 0,0,8 2269 vxor 2,2,0 2270 lvx 0,3,6 2271 addi 3,3,16 2272 2273 subi 11,4,1 2274 mtctr 5 2275 li 5,16 2276.Loop_xts_dec_steal: 2277 lbzu 0,1(11) 2278 stb 0,16(11) 2279 bdnz .Loop_xts_dec_steal 2280 2281 mtctr 9 2282 b .Loop_xts_dec 2283 2284.Lxts_dec_done: 2285 cmplwi 8,0 2286 beq .Lxts_dec_ret 2287 2288 vsrab 11,8,9 2289 vaddubm 8,8,8 2290 vsldoi 11,11,11,15 2291 vand 11,11,10 2292 vxor 8,8,11 2293 2294 2295 .long 0x7D004799 2296 2297.Lxts_dec_ret: 2298 mtspr 256,12 2299 li 3,0 2300 blr 2301.long 0 2302.byte 0,12,0x04,0,0x80,6,6,0 2303.long 0 2304.size aes_p8_xts_decrypt,.-aes_p8_xts_decrypt 2305.align 5 2306_aesp8_xts_encrypt6x: 2307 stwu 1,-392(1) 2308 mflr 11 2309 li 7,175 2310 li 3,191 2311 stw 11,396(1) 2312 stvx 20,7,1 2313 addi 7,7,32 2314 stvx 21,3,1 2315 addi 3,3,32 2316 stvx 22,7,1 2317 addi 7,7,32 2318 stvx 23,3,1 2319 addi 3,3,32 2320 stvx 24,7,1 2321 addi 7,7,32 2322 stvx 25,3,1 2323 addi 3,3,32 2324 stvx 26,7,1 2325 addi 7,7,32 2326 stvx 27,3,1 2327 addi 3,3,32 2328 stvx 28,7,1 2329 addi 7,7,32 2330 stvx 29,3,1 2331 addi 3,3,32 2332 stvx 30,7,1 2333 stvx 31,3,1 2334 li 0,-1 2335 stw 12,364(1) 2336 li 3,0x10 2337 stw 26,368(1) 2338 li 26,0x20 2339 stw 27,372(1) 2340 li 27,0x30 2341 stw 28,376(1) 2342 li 28,0x40 2343 stw 29,380(1) 2344 li 29,0x50 2345 stw 30,384(1) 2346 li 30,0x60 2347 stw 31,388(1) 2348 li 31,0x70 2349 mtspr 256,0 2350 2351 2352 xxlor 2, 32+10, 32+10 2353 vsldoi 10,11,10,1 2354 xxlor 1, 32+10, 32+10 2355 2356 2357 mr 31, 6 2358 bl .Lconsts 2359 lxvw4x 0, 28, 6 2360 mr 6, 31 2361 li 31,0x70 2362 2363 subi 9,9,3 2364 2365 lvx 23,0,6 2366 lvx 30,3,6 2367 addi 6,6,0x20 2368 lvx 31,0,6 2369 vperm 23,23,30,7 2370 addi 7,1,32+15 2371 mtctr 9 2372 2373.Load_xts_enc_key: 2374 vperm 24,30,31,7 2375 lvx 30,3,6 2376 addi 6,6,0x20 2377 stvx 24,0,7 2378 vperm 25,31,30,7 2379 lvx 31,0,6 2380 stvx 25,3,7 2381 addi 7,7,0x20 2382 bdnz .Load_xts_enc_key 2383 2384 lvx 26,3,6 2385 vperm 24,30,31,7 2386 lvx 27,26,6 2387 stvx 24,0,7 2388 vperm 25,31,26,7 2389 lvx 28,27,6 2390 stvx 25,3,7 2391 addi 7,1,32+15 2392 vperm 26,26,27,7 2393 lvx 29,28,6 2394 vperm 27,27,28,7 2395 lvx 30,29,6 2396 vperm 28,28,29,7 2397 lvx 31,30,6 2398 vperm 29,29,30,7 2399 lvx 22,31,6 2400 vperm 30,30,31,7 2401 lvx 24,0,7 2402 vperm 31,31,22,7 2403 lvx 25,3,7 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 vperm 0,2,4,5 2414 subi 10,10,31 2415 vxor 17,8,23 2416 vsrab 11,8,9 2417 vaddubm 8,8,8 2418 vand 11,11,10 2419 vxor 7,0,17 2420 xxlor 32+1, 0, 0 2421 vpermxor 8, 8, 11, 1 2422 2423 .long 0x7C235699 2424 vxor 18,8,23 2425 vsrab 11,8,9 2426 vaddubm 8,8,8 2427 2428 vand 11,11,10 2429 vxor 12,1,18 2430 xxlor 32+2, 0, 0 2431 vpermxor 8, 8, 11, 2 2432 2433 .long 0x7C5A5699 2434 andi. 31,5,15 2435 vxor 19,8,23 2436 vsrab 11,8,9 2437 vaddubm 8,8,8 2438 2439 vand 11,11,10 2440 vxor 13,2,19 2441 xxlor 32+3, 0, 0 2442 vpermxor 8, 8, 11, 3 2443 2444 .long 0x7C7B5699 2445 sub 5,5,31 2446 vxor 20,8,23 2447 vsrab 11,8,9 2448 vaddubm 8,8,8 2449 2450 vand 11,11,10 2451 vxor 14,3,20 2452 xxlor 32+4, 0, 0 2453 vpermxor 8, 8, 11, 4 2454 2455 .long 0x7C9C5699 2456 subi 5,5,0x60 2457 vxor 21,8,23 2458 vsrab 11,8,9 2459 vaddubm 8,8,8 2460 2461 vand 11,11,10 2462 vxor 15,4,21 2463 xxlor 32+5, 0, 0 2464 vpermxor 8, 8, 11, 5 2465 2466 .long 0x7CBD5699 2467 addi 10,10,0x60 2468 vxor 22,8,23 2469 vsrab 11,8,9 2470 vaddubm 8,8,8 2471 2472 vand 11,11,10 2473 vxor 16,5,22 2474 xxlor 32+0, 0, 0 2475 vpermxor 8, 8, 11, 0 2476 2477 vxor 31,31,23 2478 mtctr 9 2479 b .Loop_xts_enc6x 2480 2481.align 5 2482.Loop_xts_enc6x: 2483 .long 0x10E7C508 2484 .long 0x118CC508 2485 .long 0x11ADC508 2486 .long 0x11CEC508 2487 .long 0x11EFC508 2488 .long 0x1210C508 2489 lvx 24,26,7 2490 addi 7,7,0x20 2491 2492 .long 0x10E7CD08 2493 .long 0x118CCD08 2494 .long 0x11ADCD08 2495 .long 0x11CECD08 2496 .long 0x11EFCD08 2497 .long 0x1210CD08 2498 lvx 25,3,7 2499 bdnz .Loop_xts_enc6x 2500 2501 xxlor 32+10, 1, 1 2502 2503 subic 5,5,96 2504 vxor 0,17,31 2505 .long 0x10E7C508 2506 .long 0x118CC508 2507 vsrab 11,8,9 2508 vxor 17,8,23 2509 vaddubm 8,8,8 2510 .long 0x11ADC508 2511 .long 0x11CEC508 2512 .long 0x11EFC508 2513 .long 0x1210C508 2514 2515 subfe. 0,0,0 2516 vand 11,11,10 2517 .long 0x10E7CD08 2518 .long 0x118CCD08 2519 xxlor 32+1, 0, 0 2520 vpermxor 8, 8, 11, 1 2521 .long 0x11ADCD08 2522 .long 0x11CECD08 2523 vxor 1,18,31 2524 vsrab 11,8,9 2525 vxor 18,8,23 2526 .long 0x11EFCD08 2527 .long 0x1210CD08 2528 2529 and 0,0,5 2530 vaddubm 8,8,8 2531 .long 0x10E7D508 2532 .long 0x118CD508 2533 vand 11,11,10 2534 .long 0x11ADD508 2535 .long 0x11CED508 2536 xxlor 32+2, 0, 0 2537 vpermxor 8, 8, 11, 2 2538 .long 0x11EFD508 2539 .long 0x1210D508 2540 2541 add 10,10,0 2542 2543 2544 2545 vxor 2,19,31 2546 vsrab 11,8,9 2547 vxor 19,8,23 2548 vaddubm 8,8,8 2549 .long 0x10E7DD08 2550 .long 0x118CDD08 2551 .long 0x11ADDD08 2552 .long 0x11CEDD08 2553 vand 11,11,10 2554 .long 0x11EFDD08 2555 .long 0x1210DD08 2556 2557 addi 7,1,32+15 2558 xxlor 32+3, 0, 0 2559 vpermxor 8, 8, 11, 3 2560 .long 0x10E7E508 2561 .long 0x118CE508 2562 vxor 3,20,31 2563 vsrab 11,8,9 2564 vxor 20,8,23 2565 .long 0x11ADE508 2566 .long 0x11CEE508 2567 vaddubm 8,8,8 2568 .long 0x11EFE508 2569 .long 0x1210E508 2570 lvx 24,0,7 2571 vand 11,11,10 2572 2573 .long 0x10E7ED08 2574 .long 0x118CED08 2575 xxlor 32+4, 0, 0 2576 vpermxor 8, 8, 11, 4 2577 .long 0x11ADED08 2578 .long 0x11CEED08 2579 vxor 4,21,31 2580 vsrab 11,8,9 2581 vxor 21,8,23 2582 .long 0x11EFED08 2583 .long 0x1210ED08 2584 lvx 25,3,7 2585 vaddubm 8,8,8 2586 2587 .long 0x10E7F508 2588 .long 0x118CF508 2589 vand 11,11,10 2590 .long 0x11ADF508 2591 .long 0x11CEF508 2592 xxlor 32+5, 0, 0 2593 vpermxor 8, 8, 11, 5 2594 .long 0x11EFF508 2595 .long 0x1210F508 2596 vxor 5,22,31 2597 vsrab 11,8,9 2598 vxor 22,8,23 2599 2600 .long 0x10E70509 2601 .long 0x7C005699 2602 vaddubm 8,8,8 2603 .long 0x118C0D09 2604 .long 0x7C235699 2605 .long 0x11AD1509 2606 2607 .long 0x7C5A5699 2608 vand 11,11,10 2609 .long 0x11CE1D09 2610 2611 .long 0x7C7B5699 2612 .long 0x11EF2509 2613 2614 .long 0x7C9C5699 2615 xxlor 10, 32+0, 32+0 2616 xxlor 32+0, 0, 0 2617 vpermxor 8, 8, 11, 0 2618 xxlor 32+0, 10, 10 2619 .long 0x11702D09 2620 2621 2622 .long 0x7CBD5699 2623 addi 10,10,0x60 2624 2625 2626 2627 2628 2629 .long 0x7CE02799 2630 vxor 7,0,17 2631 2632 .long 0x7D832799 2633 vxor 12,1,18 2634 2635 .long 0x7DBA2799 2636 vxor 13,2,19 2637 2638 .long 0x7DDB2799 2639 vxor 14,3,20 2640 2641 .long 0x7DFC2799 2642 vxor 15,4,21 2643 2644 .long 0x7D7D2799 2645 vxor 16,5,22 2646 addi 4,4,0x60 2647 2648 mtctr 9 2649 beq .Loop_xts_enc6x 2650 2651 xxlor 32+10, 2, 2 2652 2653 addic. 5,5,0x60 2654 beq .Lxts_enc6x_zero 2655 cmpwi 5,0x20 2656 blt .Lxts_enc6x_one 2657 nop 2658 beq .Lxts_enc6x_two 2659 cmpwi 5,0x40 2660 blt .Lxts_enc6x_three 2661 nop 2662 beq .Lxts_enc6x_four 2663 2664.Lxts_enc6x_five: 2665 vxor 7,1,17 2666 vxor 12,2,18 2667 vxor 13,3,19 2668 vxor 14,4,20 2669 vxor 15,5,21 2670 2671 bl _aesp8_xts_enc5x 2672 2673 2674 vor 17,22,22 2675 2676 .long 0x7CE02799 2677 2678 .long 0x7D832799 2679 2680 .long 0x7DBA2799 2681 vxor 11,15,22 2682 2683 .long 0x7DDB2799 2684 .long 0x7DFC2799 2685 addi 4,4,0x50 2686 bne .Lxts_enc6x_steal 2687 b .Lxts_enc6x_done 2688 2689.align 4 2690.Lxts_enc6x_four: 2691 vxor 7,2,17 2692 vxor 12,3,18 2693 vxor 13,4,19 2694 vxor 14,5,20 2695 vxor 15,15,15 2696 2697 bl _aesp8_xts_enc5x 2698 2699 2700 vor 17,21,21 2701 2702 .long 0x7CE02799 2703 2704 .long 0x7D832799 2705 vxor 11,14,21 2706 2707 .long 0x7DBA2799 2708 .long 0x7DDB2799 2709 addi 4,4,0x40 2710 bne .Lxts_enc6x_steal 2711 b .Lxts_enc6x_done 2712 2713.align 4 2714.Lxts_enc6x_three: 2715 vxor 7,3,17 2716 vxor 12,4,18 2717 vxor 13,5,19 2718 vxor 14,14,14 2719 vxor 15,15,15 2720 2721 bl _aesp8_xts_enc5x 2722 2723 2724 vor 17,20,20 2725 2726 .long 0x7CE02799 2727 vxor 11,13,20 2728 2729 .long 0x7D832799 2730 .long 0x7DBA2799 2731 addi 4,4,0x30 2732 bne .Lxts_enc6x_steal 2733 b .Lxts_enc6x_done 2734 2735.align 4 2736.Lxts_enc6x_two: 2737 vxor 7,4,17 2738 vxor 12,5,18 2739 vxor 13,13,13 2740 vxor 14,14,14 2741 vxor 15,15,15 2742 2743 bl _aesp8_xts_enc5x 2744 2745 2746 vor 17,19,19 2747 vxor 11,12,19 2748 2749 .long 0x7CE02799 2750 .long 0x7D832799 2751 addi 4,4,0x20 2752 bne .Lxts_enc6x_steal 2753 b .Lxts_enc6x_done 2754 2755.align 4 2756.Lxts_enc6x_one: 2757 vxor 7,5,17 2758 nop 2759.Loop_xts_enc1x: 2760 .long 0x10E7C508 2761 lvx 24,26,7 2762 addi 7,7,0x20 2763 2764 .long 0x10E7CD08 2765 lvx 25,3,7 2766 bdnz .Loop_xts_enc1x 2767 2768 add 10,10,31 2769 cmpwi 31,0 2770 .long 0x10E7C508 2771 2772 subi 10,10,16 2773 .long 0x10E7CD08 2774 2775 lvsr 5,0,31 2776 .long 0x10E7D508 2777 2778 .long 0x7C005699 2779 .long 0x10E7DD08 2780 2781 addi 7,1,32+15 2782 .long 0x10E7E508 2783 lvx 24,0,7 2784 2785 .long 0x10E7ED08 2786 lvx 25,3,7 2787 vxor 17,17,31 2788 2789 2790 .long 0x10E7F508 2791 2792 vperm 0,0,0,5 2793 .long 0x10E78D09 2794 2795 vor 17,18,18 2796 vxor 11,7,18 2797 2798 .long 0x7CE02799 2799 addi 4,4,0x10 2800 bne .Lxts_enc6x_steal 2801 b .Lxts_enc6x_done 2802 2803.align 4 2804.Lxts_enc6x_zero: 2805 cmpwi 31,0 2806 beq .Lxts_enc6x_done 2807 2808 add 10,10,31 2809 subi 10,10,16 2810 .long 0x7C005699 2811 lvsr 5,0,31 2812 2813 vperm 0,0,0,5 2814 vxor 11,11,17 2815.Lxts_enc6x_steal: 2816 vxor 0,0,17 2817 vxor 7,7,7 2818 vspltisb 12,-1 2819 vperm 7,7,12,5 2820 vsel 7,0,11,7 2821 2822 subi 30,4,17 2823 subi 4,4,16 2824 mtctr 31 2825.Loop_xts_enc6x_steal: 2826 lbzu 0,1(30) 2827 stb 0,16(30) 2828 bdnz .Loop_xts_enc6x_steal 2829 2830 li 31,0 2831 mtctr 9 2832 b .Loop_xts_enc1x 2833 2834.align 4 2835.Lxts_enc6x_done: 2836 cmplwi 8,0 2837 beq .Lxts_enc6x_ret 2838 2839 vxor 8,17,23 2840 2841 .long 0x7D004799 2842 2843.Lxts_enc6x_ret: 2844 mtlr 11 2845 li 10,47 2846 li 11,63 2847 stvx 9,10,1 2848 addi 10,10,32 2849 stvx 9,11,1 2850 addi 11,11,32 2851 stvx 9,10,1 2852 addi 10,10,32 2853 stvx 9,11,1 2854 addi 11,11,32 2855 stvx 9,10,1 2856 addi 10,10,32 2857 stvx 9,11,1 2858 addi 11,11,32 2859 stvx 9,10,1 2860 addi 10,10,32 2861 stvx 9,11,1 2862 addi 11,11,32 2863 2864 mtspr 256,12 2865 lvx 20,10,1 2866 addi 10,10,32 2867 lvx 21,11,1 2868 addi 11,11,32 2869 lvx 22,10,1 2870 addi 10,10,32 2871 lvx 23,11,1 2872 addi 11,11,32 2873 lvx 24,10,1 2874 addi 10,10,32 2875 lvx 25,11,1 2876 addi 11,11,32 2877 lvx 26,10,1 2878 addi 10,10,32 2879 lvx 27,11,1 2880 addi 11,11,32 2881 lvx 28,10,1 2882 addi 10,10,32 2883 lvx 29,11,1 2884 addi 11,11,32 2885 lvx 30,10,1 2886 lvx 31,11,1 2887 lwz 26,368(1) 2888 lwz 27,372(1) 2889 lwz 28,376(1) 2890 lwz 29,380(1) 2891 lwz 30,384(1) 2892 lwz 31,388(1) 2893 addi 1,1,392 2894 blr 2895.long 0 2896.byte 0,12,0x04,1,0x80,6,6,0 2897.long 0 2898 2899.align 5 2900_aesp8_xts_enc5x: 2901 .long 0x10E7C508 2902 .long 0x118CC508 2903 .long 0x11ADC508 2904 .long 0x11CEC508 2905 .long 0x11EFC508 2906 lvx 24,26,7 2907 addi 7,7,0x20 2908 2909 .long 0x10E7CD08 2910 .long 0x118CCD08 2911 .long 0x11ADCD08 2912 .long 0x11CECD08 2913 .long 0x11EFCD08 2914 lvx 25,3,7 2915 bdnz _aesp8_xts_enc5x 2916 2917 add 10,10,31 2918 cmpwi 31,0 2919 .long 0x10E7C508 2920 .long 0x118CC508 2921 .long 0x11ADC508 2922 .long 0x11CEC508 2923 .long 0x11EFC508 2924 2925 subi 10,10,16 2926 .long 0x10E7CD08 2927 .long 0x118CCD08 2928 .long 0x11ADCD08 2929 .long 0x11CECD08 2930 .long 0x11EFCD08 2931 vxor 17,17,31 2932 2933 .long 0x10E7D508 2934 lvsr 5,0,31 2935 .long 0x118CD508 2936 .long 0x11ADD508 2937 .long 0x11CED508 2938 .long 0x11EFD508 2939 vxor 1,18,31 2940 2941 .long 0x10E7DD08 2942 .long 0x7C005699 2943 .long 0x118CDD08 2944 .long 0x11ADDD08 2945 .long 0x11CEDD08 2946 .long 0x11EFDD08 2947 vxor 2,19,31 2948 2949 addi 7,1,32+15 2950 .long 0x10E7E508 2951 .long 0x118CE508 2952 .long 0x11ADE508 2953 .long 0x11CEE508 2954 .long 0x11EFE508 2955 lvx 24,0,7 2956 vxor 3,20,31 2957 2958 .long 0x10E7ED08 2959 2960 .long 0x118CED08 2961 .long 0x11ADED08 2962 .long 0x11CEED08 2963 .long 0x11EFED08 2964 lvx 25,3,7 2965 vxor 4,21,31 2966 2967 .long 0x10E7F508 2968 vperm 0,0,0,5 2969 .long 0x118CF508 2970 .long 0x11ADF508 2971 .long 0x11CEF508 2972 .long 0x11EFF508 2973 2974 .long 0x10E78D09 2975 .long 0x118C0D09 2976 .long 0x11AD1509 2977 .long 0x11CE1D09 2978 .long 0x11EF2509 2979 blr 2980.long 0 2981.byte 0,12,0x14,0,0,0,0,0 2982 2983.align 5 2984_aesp8_xts_decrypt6x: 2985 stwu 1,-392(1) 2986 mflr 11 2987 li 7,175 2988 li 3,191 2989 stw 11,396(1) 2990 stvx 20,7,1 2991 addi 7,7,32 2992 stvx 21,3,1 2993 addi 3,3,32 2994 stvx 22,7,1 2995 addi 7,7,32 2996 stvx 23,3,1 2997 addi 3,3,32 2998 stvx 24,7,1 2999 addi 7,7,32 3000 stvx 25,3,1 3001 addi 3,3,32 3002 stvx 26,7,1 3003 addi 7,7,32 3004 stvx 27,3,1 3005 addi 3,3,32 3006 stvx 28,7,1 3007 addi 7,7,32 3008 stvx 29,3,1 3009 addi 3,3,32 3010 stvx 30,7,1 3011 stvx 31,3,1 3012 li 0,-1 3013 stw 12,364(1) 3014 li 3,0x10 3015 stw 26,368(1) 3016 li 26,0x20 3017 stw 27,372(1) 3018 li 27,0x30 3019 stw 28,376(1) 3020 li 28,0x40 3021 stw 29,380(1) 3022 li 29,0x50 3023 stw 30,384(1) 3024 li 30,0x60 3025 stw 31,388(1) 3026 li 31,0x70 3027 mtspr 256,0 3028 3029 3030 xxlor 2, 32+10, 32+10 3031 vsldoi 10,11,10,1 3032 xxlor 1, 32+10, 32+10 3033 3034 3035 mr 31, 6 3036 bl .Lconsts 3037 lxvw4x 0, 28, 6 3038 mr 6, 31 3039 li 31,0x70 3040 3041 subi 9,9,3 3042 3043 lvx 23,0,6 3044 lvx 30,3,6 3045 addi 6,6,0x20 3046 lvx 31,0,6 3047 vperm 23,23,30,7 3048 addi 7,1,32+15 3049 mtctr 9 3050 3051.Load_xts_dec_key: 3052 vperm 24,30,31,7 3053 lvx 30,3,6 3054 addi 6,6,0x20 3055 stvx 24,0,7 3056 vperm 25,31,30,7 3057 lvx 31,0,6 3058 stvx 25,3,7 3059 addi 7,7,0x20 3060 bdnz .Load_xts_dec_key 3061 3062 lvx 26,3,6 3063 vperm 24,30,31,7 3064 lvx 27,26,6 3065 stvx 24,0,7 3066 vperm 25,31,26,7 3067 lvx 28,27,6 3068 stvx 25,3,7 3069 addi 7,1,32+15 3070 vperm 26,26,27,7 3071 lvx 29,28,6 3072 vperm 27,27,28,7 3073 lvx 30,29,6 3074 vperm 28,28,29,7 3075 lvx 31,30,6 3076 vperm 29,29,30,7 3077 lvx 22,31,6 3078 vperm 30,30,31,7 3079 lvx 24,0,7 3080 vperm 31,31,22,7 3081 lvx 25,3,7 3082 3083 vperm 0,2,4,5 3084 subi 10,10,31 3085 vxor 17,8,23 3086 vsrab 11,8,9 3087 vaddubm 8,8,8 3088 vand 11,11,10 3089 vxor 7,0,17 3090 xxlor 32+1, 0, 0 3091 vpermxor 8, 8, 11, 1 3092 3093 .long 0x7C235699 3094 vxor 18,8,23 3095 vsrab 11,8,9 3096 vaddubm 8,8,8 3097 3098 vand 11,11,10 3099 vxor 12,1,18 3100 xxlor 32+2, 0, 0 3101 vpermxor 8, 8, 11, 2 3102 3103 .long 0x7C5A5699 3104 andi. 31,5,15 3105 vxor 19,8,23 3106 vsrab 11,8,9 3107 vaddubm 8,8,8 3108 3109 vand 11,11,10 3110 vxor 13,2,19 3111 xxlor 32+3, 0, 0 3112 vpermxor 8, 8, 11, 3 3113 3114 .long 0x7C7B5699 3115 sub 5,5,31 3116 vxor 20,8,23 3117 vsrab 11,8,9 3118 vaddubm 8,8,8 3119 3120 vand 11,11,10 3121 vxor 14,3,20 3122 xxlor 32+4, 0, 0 3123 vpermxor 8, 8, 11, 4 3124 3125 .long 0x7C9C5699 3126 subi 5,5,0x60 3127 vxor 21,8,23 3128 vsrab 11,8,9 3129 vaddubm 8,8,8 3130 3131 vand 11,11,10 3132 vxor 15,4,21 3133 xxlor 32+5, 0, 0 3134 vpermxor 8, 8, 11, 5 3135 3136 .long 0x7CBD5699 3137 addi 10,10,0x60 3138 vxor 22,8,23 3139 vsrab 11,8,9 3140 vaddubm 8,8,8 3141 3142 vand 11,11,10 3143 vxor 16,5,22 3144 xxlor 32+0, 0, 0 3145 vpermxor 8, 8, 11, 0 3146 3147 vxor 31,31,23 3148 mtctr 9 3149 b .Loop_xts_dec6x 3150 3151.align 5 3152.Loop_xts_dec6x: 3153 .long 0x10E7C548 3154 .long 0x118CC548 3155 .long 0x11ADC548 3156 .long 0x11CEC548 3157 .long 0x11EFC548 3158 .long 0x1210C548 3159 lvx 24,26,7 3160 addi 7,7,0x20 3161 3162 .long 0x10E7CD48 3163 .long 0x118CCD48 3164 .long 0x11ADCD48 3165 .long 0x11CECD48 3166 .long 0x11EFCD48 3167 .long 0x1210CD48 3168 lvx 25,3,7 3169 bdnz .Loop_xts_dec6x 3170 3171 xxlor 32+10, 1, 1 3172 3173 subic 5,5,96 3174 vxor 0,17,31 3175 .long 0x10E7C548 3176 .long 0x118CC548 3177 vsrab 11,8,9 3178 vxor 17,8,23 3179 vaddubm 8,8,8 3180 .long 0x11ADC548 3181 .long 0x11CEC548 3182 .long 0x11EFC548 3183 .long 0x1210C548 3184 3185 subfe. 0,0,0 3186 vand 11,11,10 3187 .long 0x10E7CD48 3188 .long 0x118CCD48 3189 xxlor 32+1, 0, 0 3190 vpermxor 8, 8, 11, 1 3191 .long 0x11ADCD48 3192 .long 0x11CECD48 3193 vxor 1,18,31 3194 vsrab 11,8,9 3195 vxor 18,8,23 3196 .long 0x11EFCD48 3197 .long 0x1210CD48 3198 3199 and 0,0,5 3200 vaddubm 8,8,8 3201 .long 0x10E7D548 3202 .long 0x118CD548 3203 vand 11,11,10 3204 .long 0x11ADD548 3205 .long 0x11CED548 3206 xxlor 32+2, 0, 0 3207 vpermxor 8, 8, 11, 2 3208 .long 0x11EFD548 3209 .long 0x1210D548 3210 3211 add 10,10,0 3212 3213 3214 3215 vxor 2,19,31 3216 vsrab 11,8,9 3217 vxor 19,8,23 3218 vaddubm 8,8,8 3219 .long 0x10E7DD48 3220 .long 0x118CDD48 3221 .long 0x11ADDD48 3222 .long 0x11CEDD48 3223 vand 11,11,10 3224 .long 0x11EFDD48 3225 .long 0x1210DD48 3226 3227 addi 7,1,32+15 3228 xxlor 32+3, 0, 0 3229 vpermxor 8, 8, 11, 3 3230 .long 0x10E7E548 3231 .long 0x118CE548 3232 vxor 3,20,31 3233 vsrab 11,8,9 3234 vxor 20,8,23 3235 .long 0x11ADE548 3236 .long 0x11CEE548 3237 vaddubm 8,8,8 3238 .long 0x11EFE548 3239 .long 0x1210E548 3240 lvx 24,0,7 3241 vand 11,11,10 3242 3243 .long 0x10E7ED48 3244 .long 0x118CED48 3245 xxlor 32+4, 0, 0 3246 vpermxor 8, 8, 11, 4 3247 .long 0x11ADED48 3248 .long 0x11CEED48 3249 vxor 4,21,31 3250 vsrab 11,8,9 3251 vxor 21,8,23 3252 .long 0x11EFED48 3253 .long 0x1210ED48 3254 lvx 25,3,7 3255 vaddubm 8,8,8 3256 3257 .long 0x10E7F548 3258 .long 0x118CF548 3259 vand 11,11,10 3260 .long 0x11ADF548 3261 .long 0x11CEF548 3262 xxlor 32+5, 0, 0 3263 vpermxor 8, 8, 11, 5 3264 .long 0x11EFF548 3265 .long 0x1210F548 3266 vxor 5,22,31 3267 vsrab 11,8,9 3268 vxor 22,8,23 3269 3270 .long 0x10E70549 3271 .long 0x7C005699 3272 vaddubm 8,8,8 3273 .long 0x118C0D49 3274 .long 0x7C235699 3275 .long 0x11AD1549 3276 3277 .long 0x7C5A5699 3278 vand 11,11,10 3279 .long 0x11CE1D49 3280 3281 .long 0x7C7B5699 3282 .long 0x11EF2549 3283 3284 .long 0x7C9C5699 3285 xxlor 10, 32+0, 32+0 3286 xxlor 32+0, 0, 0 3287 vpermxor 8, 8, 11, 0 3288 xxlor 32+0, 10, 10 3289 .long 0x12102D49 3290 3291 .long 0x7CBD5699 3292 addi 10,10,0x60 3293 3294 3295 3296 3297 3298 .long 0x7CE02799 3299 vxor 7,0,17 3300 3301 .long 0x7D832799 3302 vxor 12,1,18 3303 3304 .long 0x7DBA2799 3305 vxor 13,2,19 3306 3307 .long 0x7DDB2799 3308 vxor 14,3,20 3309 3310 .long 0x7DFC2799 3311 vxor 15,4,21 3312 .long 0x7E1D2799 3313 vxor 16,5,22 3314 addi 4,4,0x60 3315 3316 mtctr 9 3317 beq .Loop_xts_dec6x 3318 3319 xxlor 32+10, 2, 2 3320 3321 addic. 5,5,0x60 3322 beq .Lxts_dec6x_zero 3323 cmpwi 5,0x20 3324 blt .Lxts_dec6x_one 3325 nop 3326 beq .Lxts_dec6x_two 3327 cmpwi 5,0x40 3328 blt .Lxts_dec6x_three 3329 nop 3330 beq .Lxts_dec6x_four 3331 3332.Lxts_dec6x_five: 3333 vxor 7,1,17 3334 vxor 12,2,18 3335 vxor 13,3,19 3336 vxor 14,4,20 3337 vxor 15,5,21 3338 3339 bl _aesp8_xts_dec5x 3340 3341 3342 vor 17,22,22 3343 vxor 18,8,23 3344 3345 .long 0x7CE02799 3346 vxor 7,0,18 3347 3348 .long 0x7D832799 3349 3350 .long 0x7DBA2799 3351 3352 .long 0x7DDB2799 3353 .long 0x7DFC2799 3354 addi 4,4,0x50 3355 bne .Lxts_dec6x_steal 3356 b .Lxts_dec6x_done 3357 3358.align 4 3359.Lxts_dec6x_four: 3360 vxor 7,2,17 3361 vxor 12,3,18 3362 vxor 13,4,19 3363 vxor 14,5,20 3364 vxor 15,15,15 3365 3366 bl _aesp8_xts_dec5x 3367 3368 3369 vor 17,21,21 3370 vor 18,22,22 3371 3372 .long 0x7CE02799 3373 vxor 7,0,22 3374 3375 .long 0x7D832799 3376 3377 .long 0x7DBA2799 3378 .long 0x7DDB2799 3379 addi 4,4,0x40 3380 bne .Lxts_dec6x_steal 3381 b .Lxts_dec6x_done 3382 3383.align 4 3384.Lxts_dec6x_three: 3385 vxor 7,3,17 3386 vxor 12,4,18 3387 vxor 13,5,19 3388 vxor 14,14,14 3389 vxor 15,15,15 3390 3391 bl _aesp8_xts_dec5x 3392 3393 3394 vor 17,20,20 3395 vor 18,21,21 3396 3397 .long 0x7CE02799 3398 vxor 7,0,21 3399 3400 .long 0x7D832799 3401 .long 0x7DBA2799 3402 addi 4,4,0x30 3403 bne .Lxts_dec6x_steal 3404 b .Lxts_dec6x_done 3405 3406.align 4 3407.Lxts_dec6x_two: 3408 vxor 7,4,17 3409 vxor 12,5,18 3410 vxor 13,13,13 3411 vxor 14,14,14 3412 vxor 15,15,15 3413 3414 bl _aesp8_xts_dec5x 3415 3416 3417 vor 17,19,19 3418 vor 18,20,20 3419 3420 .long 0x7CE02799 3421 vxor 7,0,20 3422 .long 0x7D832799 3423 addi 4,4,0x20 3424 bne .Lxts_dec6x_steal 3425 b .Lxts_dec6x_done 3426 3427.align 4 3428.Lxts_dec6x_one: 3429 vxor 7,5,17 3430 nop 3431.Loop_xts_dec1x: 3432 .long 0x10E7C548 3433 lvx 24,26,7 3434 addi 7,7,0x20 3435 3436 .long 0x10E7CD48 3437 lvx 25,3,7 3438 bdnz .Loop_xts_dec1x 3439 3440 subi 0,31,1 3441 .long 0x10E7C548 3442 3443 andi. 0,0,16 3444 cmpwi 31,0 3445 .long 0x10E7CD48 3446 3447 sub 10,10,0 3448 .long 0x10E7D548 3449 3450 .long 0x7C005699 3451 .long 0x10E7DD48 3452 3453 addi 7,1,32+15 3454 .long 0x10E7E548 3455 lvx 24,0,7 3456 3457 .long 0x10E7ED48 3458 lvx 25,3,7 3459 vxor 17,17,31 3460 3461 3462 .long 0x10E7F548 3463 3464 mtctr 9 3465 .long 0x10E78D49 3466 3467 vor 17,18,18 3468 vor 18,19,19 3469 3470 .long 0x7CE02799 3471 addi 4,4,0x10 3472 vxor 7,0,19 3473 bne .Lxts_dec6x_steal 3474 b .Lxts_dec6x_done 3475 3476.align 4 3477.Lxts_dec6x_zero: 3478 cmpwi 31,0 3479 beq .Lxts_dec6x_done 3480 3481 .long 0x7C005699 3482 3483 vxor 7,0,18 3484.Lxts_dec6x_steal: 3485 .long 0x10E7C548 3486 lvx 24,26,7 3487 addi 7,7,0x20 3488 3489 .long 0x10E7CD48 3490 lvx 25,3,7 3491 bdnz .Lxts_dec6x_steal 3492 3493 add 10,10,31 3494 .long 0x10E7C548 3495 3496 cmpwi 31,0 3497 .long 0x10E7CD48 3498 3499 .long 0x7C005699 3500 .long 0x10E7D548 3501 3502 lvsr 5,0,31 3503 .long 0x10E7DD48 3504 3505 addi 7,1,32+15 3506 .long 0x10E7E548 3507 lvx 24,0,7 3508 3509 .long 0x10E7ED48 3510 lvx 25,3,7 3511 vxor 18,18,31 3512 3513 3514 .long 0x10E7F548 3515 3516 vperm 0,0,0,5 3517 .long 0x11679549 3518 3519 3520 3521 .long 0x7D602799 3522 3523 vxor 7,7,7 3524 vspltisb 12,-1 3525 vperm 7,7,12,5 3526 vsel 7,0,11,7 3527 vxor 7,7,17 3528 3529 subi 30,4,1 3530 mtctr 31 3531.Loop_xts_dec6x_steal: 3532 lbzu 0,1(30) 3533 stb 0,16(30) 3534 bdnz .Loop_xts_dec6x_steal 3535 3536 li 31,0 3537 mtctr 9 3538 b .Loop_xts_dec1x 3539 3540.align 4 3541.Lxts_dec6x_done: 3542 cmplwi 8,0 3543 beq .Lxts_dec6x_ret 3544 3545 vxor 8,17,23 3546 3547 .long 0x7D004799 3548 3549.Lxts_dec6x_ret: 3550 mtlr 11 3551 li 10,47 3552 li 11,63 3553 stvx 9,10,1 3554 addi 10,10,32 3555 stvx 9,11,1 3556 addi 11,11,32 3557 stvx 9,10,1 3558 addi 10,10,32 3559 stvx 9,11,1 3560 addi 11,11,32 3561 stvx 9,10,1 3562 addi 10,10,32 3563 stvx 9,11,1 3564 addi 11,11,32 3565 stvx 9,10,1 3566 addi 10,10,32 3567 stvx 9,11,1 3568 addi 11,11,32 3569 3570 mtspr 256,12 3571 lvx 20,10,1 3572 addi 10,10,32 3573 lvx 21,11,1 3574 addi 11,11,32 3575 lvx 22,10,1 3576 addi 10,10,32 3577 lvx 23,11,1 3578 addi 11,11,32 3579 lvx 24,10,1 3580 addi 10,10,32 3581 lvx 25,11,1 3582 addi 11,11,32 3583 lvx 26,10,1 3584 addi 10,10,32 3585 lvx 27,11,1 3586 addi 11,11,32 3587 lvx 28,10,1 3588 addi 10,10,32 3589 lvx 29,11,1 3590 addi 11,11,32 3591 lvx 30,10,1 3592 lvx 31,11,1 3593 lwz 26,368(1) 3594 lwz 27,372(1) 3595 lwz 28,376(1) 3596 lwz 29,380(1) 3597 lwz 30,384(1) 3598 lwz 31,388(1) 3599 addi 1,1,392 3600 blr 3601.long 0 3602.byte 0,12,0x04,1,0x80,6,6,0 3603.long 0 3604 3605.align 5 3606_aesp8_xts_dec5x: 3607 .long 0x10E7C548 3608 .long 0x118CC548 3609 .long 0x11ADC548 3610 .long 0x11CEC548 3611 .long 0x11EFC548 3612 lvx 24,26,7 3613 addi 7,7,0x20 3614 3615 .long 0x10E7CD48 3616 .long 0x118CCD48 3617 .long 0x11ADCD48 3618 .long 0x11CECD48 3619 .long 0x11EFCD48 3620 lvx 25,3,7 3621 bdnz _aesp8_xts_dec5x 3622 3623 subi 0,31,1 3624 .long 0x10E7C548 3625 .long 0x118CC548 3626 .long 0x11ADC548 3627 .long 0x11CEC548 3628 .long 0x11EFC548 3629 3630 andi. 0,0,16 3631 cmpwi 31,0 3632 .long 0x10E7CD48 3633 .long 0x118CCD48 3634 .long 0x11ADCD48 3635 .long 0x11CECD48 3636 .long 0x11EFCD48 3637 vxor 17,17,31 3638 3639 sub 10,10,0 3640 .long 0x10E7D548 3641 .long 0x118CD548 3642 .long 0x11ADD548 3643 .long 0x11CED548 3644 .long 0x11EFD548 3645 vxor 1,18,31 3646 3647 .long 0x10E7DD48 3648 .long 0x7C005699 3649 .long 0x118CDD48 3650 .long 0x11ADDD48 3651 .long 0x11CEDD48 3652 .long 0x11EFDD48 3653 vxor 2,19,31 3654 3655 addi 7,1,32+15 3656 .long 0x10E7E548 3657 .long 0x118CE548 3658 .long 0x11ADE548 3659 .long 0x11CEE548 3660 .long 0x11EFE548 3661 lvx 24,0,7 3662 vxor 3,20,31 3663 3664 .long 0x10E7ED48 3665 3666 .long 0x118CED48 3667 .long 0x11ADED48 3668 .long 0x11CEED48 3669 .long 0x11EFED48 3670 lvx 25,3,7 3671 vxor 4,21,31 3672 3673 .long 0x10E7F548 3674 .long 0x118CF548 3675 .long 0x11ADF548 3676 .long 0x11CEF548 3677 .long 0x11EFF548 3678 3679 .long 0x10E78D49 3680 .long 0x118C0D49 3681 .long 0x11AD1549 3682 .long 0x11CE1D49 3683 .long 0x11EF2549 3684 mtctr 9 3685 blr 3686.long 0 3687.byte 0,12,0x14,0,0,0,0,0 3688