1/* $FreeBSD$ */ 2/* Do not modify. This file is auto-generated from chacha-ppc.pl. */ 3.machine "any" 4.abiversion 2 5.text 6 7.globl ChaCha20_ctr32_int 8.type ChaCha20_ctr32_int,@function 9.align 5 10ChaCha20_ctr32_int: 11.localentry ChaCha20_ctr32_int,0 12 13__ChaCha20_ctr32_int: 14 cmpldi 5,0 15 .long 0x4DC20020 16 17 stdu 1,-256(1) 18 mflr 0 19 20 std 14,112(1) 21 std 15,120(1) 22 std 16,128(1) 23 std 17,136(1) 24 std 18,144(1) 25 std 19,152(1) 26 std 20,160(1) 27 std 21,168(1) 28 std 22,176(1) 29 std 23,184(1) 30 std 24,192(1) 31 std 25,200(1) 32 std 26,208(1) 33 std 27,216(1) 34 std 28,224(1) 35 std 29,232(1) 36 std 30,240(1) 37 std 31,248(1) 38 std 0,272(1) 39 40 lwz 11,0(7) 41 lwz 12,4(7) 42 lwz 14,8(7) 43 lwz 15,12(7) 44 45 bl __ChaCha20_1x 46 47 ld 0,272(1) 48 ld 14,112(1) 49 ld 15,120(1) 50 ld 16,128(1) 51 ld 17,136(1) 52 ld 18,144(1) 53 ld 19,152(1) 54 ld 20,160(1) 55 ld 21,168(1) 56 ld 22,176(1) 57 ld 23,184(1) 58 ld 24,192(1) 59 ld 25,200(1) 60 ld 26,208(1) 61 ld 27,216(1) 62 ld 28,224(1) 63 ld 29,232(1) 64 ld 30,240(1) 65 ld 31,248(1) 66 mtlr 0 67 addi 1,1,256 68 blr 69.long 0 70.byte 0,12,4,1,0x80,18,5,0 71.long 0 72.size ChaCha20_ctr32_int,.-ChaCha20_ctr32_int 73 74.align 5 75__ChaCha20_1x: 76.Loop_outer: 77 lis 16,0x6170 78 lis 17,0x3320 79 lis 18,0x7962 80 lis 19,0x6b20 81 ori 16,16,0x7865 82 ori 17,17,0x646e 83 ori 18,18,0x2d32 84 ori 19,19,0x6574 85 86 li 0,10 87 lwz 20,0(6) 88 lwz 21,4(6) 89 lwz 22,8(6) 90 lwz 23,12(6) 91 lwz 24,16(6) 92 mr 28,11 93 lwz 25,20(6) 94 mr 29,12 95 lwz 26,24(6) 96 mr 30,14 97 lwz 27,28(6) 98 mr 31,15 99 100 mr 7,20 101 mr 8,21 102 mr 9,22 103 mr 10,23 104 105 mtctr 0 106.Loop: 107 add 16,16,20 108 add 17,17,21 109 add 18,18,22 110 add 19,19,23 111 xor 28,28,16 112 xor 29,29,17 113 xor 30,30,18 114 xor 31,31,19 115 rotlwi 28,28,16 116 rotlwi 29,29,16 117 rotlwi 30,30,16 118 rotlwi 31,31,16 119 add 24,24,28 120 add 25,25,29 121 add 26,26,30 122 add 27,27,31 123 xor 20,20,24 124 xor 21,21,25 125 xor 22,22,26 126 xor 23,23,27 127 rotlwi 20,20,12 128 rotlwi 21,21,12 129 rotlwi 22,22,12 130 rotlwi 23,23,12 131 add 16,16,20 132 add 17,17,21 133 add 18,18,22 134 add 19,19,23 135 xor 28,28,16 136 xor 29,29,17 137 xor 30,30,18 138 xor 31,31,19 139 rotlwi 28,28,8 140 rotlwi 29,29,8 141 rotlwi 30,30,8 142 rotlwi 31,31,8 143 add 24,24,28 144 add 25,25,29 145 add 26,26,30 146 add 27,27,31 147 xor 20,20,24 148 xor 21,21,25 149 xor 22,22,26 150 xor 23,23,27 151 rotlwi 20,20,7 152 rotlwi 21,21,7 153 rotlwi 22,22,7 154 rotlwi 23,23,7 155 add 16,16,21 156 add 17,17,22 157 add 18,18,23 158 add 19,19,20 159 xor 31,31,16 160 xor 28,28,17 161 xor 29,29,18 162 xor 30,30,19 163 rotlwi 31,31,16 164 rotlwi 28,28,16 165 rotlwi 29,29,16 166 rotlwi 30,30,16 167 add 26,26,31 168 add 27,27,28 169 add 24,24,29 170 add 25,25,30 171 xor 21,21,26 172 xor 22,22,27 173 xor 23,23,24 174 xor 20,20,25 175 rotlwi 21,21,12 176 rotlwi 22,22,12 177 rotlwi 23,23,12 178 rotlwi 20,20,12 179 add 16,16,21 180 add 17,17,22 181 add 18,18,23 182 add 19,19,20 183 xor 31,31,16 184 xor 28,28,17 185 xor 29,29,18 186 xor 30,30,19 187 rotlwi 31,31,8 188 rotlwi 28,28,8 189 rotlwi 29,29,8 190 rotlwi 30,30,8 191 add 26,26,31 192 add 27,27,28 193 add 24,24,29 194 add 25,25,30 195 xor 21,21,26 196 xor 22,22,27 197 xor 23,23,24 198 xor 20,20,25 199 rotlwi 21,21,7 200 rotlwi 22,22,7 201 rotlwi 23,23,7 202 rotlwi 20,20,7 203 bdnz .Loop 204 205 subic 5,5,64 206 addi 16,16,0x7865 207 addi 17,17,0x646e 208 addi 18,18,0x2d32 209 addi 19,19,0x6574 210 addis 16,16,0x6170 211 addis 17,17,0x3320 212 addis 18,18,0x7962 213 addis 19,19,0x6b20 214 215 subfe. 0,0,0 216 add 20,20,7 217 lwz 7,16(6) 218 add 21,21,8 219 lwz 8,20(6) 220 add 22,22,9 221 lwz 9,24(6) 222 add 23,23,10 223 lwz 10,28(6) 224 add 24,24,7 225 add 25,25,8 226 add 26,26,9 227 add 27,27,10 228 229 add 28,28,11 230 add 29,29,12 231 add 30,30,14 232 add 31,31,15 233 addi 11,11,1 234 bne .Ltail 235 236 lwz 7,0(4) 237 lwz 8,4(4) 238 cmpldi 5,0 239 lwz 9,8(4) 240 lwz 10,12(4) 241 xor 16,16,7 242 lwz 7,16(4) 243 xor 17,17,8 244 lwz 8,20(4) 245 xor 18,18,9 246 lwz 9,24(4) 247 xor 19,19,10 248 lwz 10,28(4) 249 xor 20,20,7 250 lwz 7,32(4) 251 xor 21,21,8 252 lwz 8,36(4) 253 xor 22,22,9 254 lwz 9,40(4) 255 xor 23,23,10 256 lwz 10,44(4) 257 xor 24,24,7 258 lwz 7,48(4) 259 xor 25,25,8 260 lwz 8,52(4) 261 xor 26,26,9 262 lwz 9,56(4) 263 xor 27,27,10 264 lwz 10,60(4) 265 xor 28,28,7 266 stw 16,0(3) 267 xor 29,29,8 268 stw 17,4(3) 269 xor 30,30,9 270 stw 18,8(3) 271 xor 31,31,10 272 stw 19,12(3) 273 stw 20,16(3) 274 stw 21,20(3) 275 stw 22,24(3) 276 stw 23,28(3) 277 stw 24,32(3) 278 stw 25,36(3) 279 stw 26,40(3) 280 stw 27,44(3) 281 stw 28,48(3) 282 stw 29,52(3) 283 stw 30,56(3) 284 addi 4,4,64 285 stw 31,60(3) 286 addi 3,3,64 287 288 bne .Loop_outer 289 290 blr 291 292.align 4 293.Ltail: 294 addi 5,5,64 295 subi 4,4,1 296 subi 3,3,1 297 addi 7,1,48-1 298 mtctr 5 299 300 stw 16,48(1) 301 stw 17,52(1) 302 stw 18,56(1) 303 stw 19,60(1) 304 stw 20,64(1) 305 stw 21,68(1) 306 stw 22,72(1) 307 stw 23,76(1) 308 stw 24,80(1) 309 stw 25,84(1) 310 stw 26,88(1) 311 stw 27,92(1) 312 stw 28,96(1) 313 stw 29,100(1) 314 stw 30,104(1) 315 stw 31,108(1) 316 317.Loop_tail: 318 lbzu 11,1(4) 319 lbzu 16,1(7) 320 xor 12,11,16 321 stbu 12,1(3) 322 bdnz .Loop_tail 323 324 stw 1,48(1) 325 stw 1,52(1) 326 stw 1,56(1) 327 stw 1,60(1) 328 stw 1,64(1) 329 stw 1,68(1) 330 stw 1,72(1) 331 stw 1,76(1) 332 stw 1,80(1) 333 stw 1,84(1) 334 stw 1,88(1) 335 stw 1,92(1) 336 stw 1,96(1) 337 stw 1,100(1) 338 stw 1,104(1) 339 stw 1,108(1) 340 341 blr 342.long 0 343.byte 0,12,0x14,0,0,0,0,0 344 345.globl ChaCha20_ctr32_vmx 346.type ChaCha20_ctr32_vmx,@function 347.align 5 348ChaCha20_ctr32_vmx: 349.localentry ChaCha20_ctr32_vmx,0 350 351 cmpldi 5,256 352 blt __ChaCha20_ctr32_int 353 354 stdu 1,-416(1) 355 mflr 0 356 li 10,127 357 li 11,143 358 li 12,-1 359 stvx 23,10,1 360 addi 10,10,32 361 stvx 24,11,1 362 addi 11,11,32 363 stvx 25,10,1 364 addi 10,10,32 365 stvx 26,11,1 366 addi 11,11,32 367 stvx 27,10,1 368 addi 10,10,32 369 stvx 28,11,1 370 addi 11,11,32 371 stvx 29,10,1 372 addi 10,10,32 373 stvx 30,11,1 374 stvx 31,10,1 375 stw 12,268(1) 376 std 14,272(1) 377 std 15,280(1) 378 std 16,288(1) 379 std 17,296(1) 380 std 18,304(1) 381 std 19,312(1) 382 std 20,320(1) 383 std 21,328(1) 384 std 22,336(1) 385 std 23,344(1) 386 std 24,352(1) 387 std 25,360(1) 388 std 26,368(1) 389 std 27,376(1) 390 std 28,384(1) 391 std 29,392(1) 392 std 30,400(1) 393 std 31,408(1) 394 li 12,-4096+511 395 std 0, 432(1) 396 or 12,12,12 397 398 bl .Lconsts 399 li 16,16 400 li 17,32 401 li 18,48 402 li 19,64 403 li 20,31 404 li 21,15 405 406 lvx 13,0,6 407 lvsr 29,0,6 408 lvx 14,16,6 409 lvx 27,20,6 410 411 lvx 15,0,7 412 lvsr 30,0,7 413 lvx 28,21,7 414 415 lvx 12,0,12 416 lvx 17,16,12 417 lvx 18,17,12 418 lvx 19,18,12 419 lvx 23,19,12 420 421 vperm 13,14,13,29 422 vperm 14,27,14,29 423 vperm 15,28,15,30 424 425 lwz 11,0(7) 426 lwz 12,4(7) 427 vadduwm 15,15,17 428 lwz 14,8(7) 429 vadduwm 16,15,17 430 lwz 15,12(7) 431 vadduwm 17,16,17 432 433 vxor 29,29,29 434 vspltisw 26,-1 435 lvsr 24,0,4 436 lvsl 25,0,3 437 vperm 26,26,29,25 438 439 440 441 442 443 444 445 li 0,10 446 b .Loop_outer_vmx 447 448.align 4 449.Loop_outer_vmx: 450 lis 16,0x6170 451 lis 17,0x3320 452 vor 0,12,12 453 lis 18,0x7962 454 lis 19,0x6b20 455 vor 4,12,12 456 ori 16,16,0x7865 457 ori 17,17,0x646e 458 vor 8,12,12 459 ori 18,18,0x2d32 460 ori 19,19,0x6574 461 vor 1,13,13 462 463 lwz 20,0(6) 464 vor 5,13,13 465 lwz 21,4(6) 466 vor 9,13,13 467 lwz 22,8(6) 468 vor 2,14,14 469 lwz 23,12(6) 470 vor 6,14,14 471 lwz 24,16(6) 472 vor 10,14,14 473 mr 28,11 474 lwz 25,20(6) 475 vor 3,15,15 476 mr 29,12 477 lwz 26,24(6) 478 vor 7,16,16 479 mr 30,14 480 lwz 27,28(6) 481 vor 11,17,17 482 mr 31,15 483 484 mr 7,20 485 mr 8,21 486 mr 9,22 487 mr 10,23 488 489 vspltisw 27,12 490 vspltisw 28,7 491 492 mtctr 0 493 nop 494.Loop_vmx: 495 vadduwm 0,0,1 496 vadduwm 4,4,5 497 vadduwm 8,8,9 498 add 16,16,20 499 add 17,17,21 500 add 18,18,22 501 vxor 3,3,0 502 vxor 7,7,4 503 vxor 11,11,8 504 add 19,19,23 505 xor 28,28,16 506 xor 29,29,17 507 vperm 3,3,3,19 508 vperm 7,7,7,19 509 vperm 11,11,11,19 510 xor 30,30,18 511 xor 31,31,19 512 rotlwi 28,28,16 513 vadduwm 2,2,3 514 vadduwm 6,6,7 515 vadduwm 10,10,11 516 rotlwi 29,29,16 517 rotlwi 30,30,16 518 rotlwi 31,31,16 519 vxor 1,1,2 520 vxor 5,5,6 521 vxor 9,9,10 522 add 24,24,28 523 add 25,25,29 524 add 26,26,30 525 vrlw 1,1,27 526 vrlw 5,5,27 527 vrlw 9,9,27 528 add 27,27,31 529 xor 20,20,24 530 xor 21,21,25 531 vadduwm 0,0,1 532 vadduwm 4,4,5 533 vadduwm 8,8,9 534 xor 22,22,26 535 xor 23,23,27 536 rotlwi 20,20,12 537 vxor 3,3,0 538 vxor 7,7,4 539 vxor 11,11,8 540 rotlwi 21,21,12 541 rotlwi 22,22,12 542 rotlwi 23,23,12 543 vperm 3,3,3,23 544 vperm 7,7,7,23 545 vperm 11,11,11,23 546 add 16,16,20 547 add 17,17,21 548 add 18,18,22 549 vadduwm 2,2,3 550 vadduwm 6,6,7 551 vadduwm 10,10,11 552 add 19,19,23 553 xor 28,28,16 554 xor 29,29,17 555 vxor 1,1,2 556 vxor 5,5,6 557 vxor 9,9,10 558 xor 30,30,18 559 xor 31,31,19 560 rotlwi 28,28,8 561 vrlw 1,1,28 562 vrlw 5,5,28 563 vrlw 9,9,28 564 rotlwi 29,29,8 565 rotlwi 30,30,8 566 rotlwi 31,31,8 567 vsldoi 2,2,2, 8 568 vsldoi 6,6,6, 8 569 vsldoi 10,10,10, 8 570 add 24,24,28 571 add 25,25,29 572 add 26,26,30 573 vsldoi 1,1,1, 12 574 vsldoi 5,5,5, 12 575 vsldoi 9,9,9, 12 576 add 27,27,31 577 xor 20,20,24 578 xor 21,21,25 579 vsldoi 3,3,3, 4 580 vsldoi 7,7,7, 4 581 vsldoi 11,11,11, 4 582 xor 22,22,26 583 xor 23,23,27 584 rotlwi 20,20,7 585 rotlwi 21,21,7 586 rotlwi 22,22,7 587 rotlwi 23,23,7 588 vadduwm 0,0,1 589 vadduwm 4,4,5 590 vadduwm 8,8,9 591 add 16,16,21 592 add 17,17,22 593 add 18,18,23 594 vxor 3,3,0 595 vxor 7,7,4 596 vxor 11,11,8 597 add 19,19,20 598 xor 31,31,16 599 xor 28,28,17 600 vperm 3,3,3,19 601 vperm 7,7,7,19 602 vperm 11,11,11,19 603 xor 29,29,18 604 xor 30,30,19 605 rotlwi 31,31,16 606 vadduwm 2,2,3 607 vadduwm 6,6,7 608 vadduwm 10,10,11 609 rotlwi 28,28,16 610 rotlwi 29,29,16 611 rotlwi 30,30,16 612 vxor 1,1,2 613 vxor 5,5,6 614 vxor 9,9,10 615 add 26,26,31 616 add 27,27,28 617 add 24,24,29 618 vrlw 1,1,27 619 vrlw 5,5,27 620 vrlw 9,9,27 621 add 25,25,30 622 xor 21,21,26 623 xor 22,22,27 624 vadduwm 0,0,1 625 vadduwm 4,4,5 626 vadduwm 8,8,9 627 xor 23,23,24 628 xor 20,20,25 629 rotlwi 21,21,12 630 vxor 3,3,0 631 vxor 7,7,4 632 vxor 11,11,8 633 rotlwi 22,22,12 634 rotlwi 23,23,12 635 rotlwi 20,20,12 636 vperm 3,3,3,23 637 vperm 7,7,7,23 638 vperm 11,11,11,23 639 add 16,16,21 640 add 17,17,22 641 add 18,18,23 642 vadduwm 2,2,3 643 vadduwm 6,6,7 644 vadduwm 10,10,11 645 add 19,19,20 646 xor 31,31,16 647 xor 28,28,17 648 vxor 1,1,2 649 vxor 5,5,6 650 vxor 9,9,10 651 xor 29,29,18 652 xor 30,30,19 653 rotlwi 31,31,8 654 vrlw 1,1,28 655 vrlw 5,5,28 656 vrlw 9,9,28 657 rotlwi 28,28,8 658 rotlwi 29,29,8 659 rotlwi 30,30,8 660 vsldoi 2,2,2, 8 661 vsldoi 6,6,6, 8 662 vsldoi 10,10,10, 8 663 add 26,26,31 664 add 27,27,28 665 add 24,24,29 666 vsldoi 1,1,1, 4 667 vsldoi 5,5,5, 4 668 vsldoi 9,9,9, 4 669 add 25,25,30 670 xor 21,21,26 671 xor 22,22,27 672 vsldoi 3,3,3, 12 673 vsldoi 7,7,7, 12 674 vsldoi 11,11,11, 12 675 xor 23,23,24 676 xor 20,20,25 677 rotlwi 21,21,7 678 rotlwi 22,22,7 679 rotlwi 23,23,7 680 rotlwi 20,20,7 681 bdnz .Loop_vmx 682 683 subi 5,5,256 684 addi 16,16,0x7865 685 addi 17,17,0x646e 686 addi 18,18,0x2d32 687 addi 19,19,0x6574 688 addis 16,16,0x6170 689 addis 17,17,0x3320 690 addis 18,18,0x7962 691 addis 19,19,0x6b20 692 add 20,20,7 693 lwz 7,16(6) 694 add 21,21,8 695 lwz 8,20(6) 696 add 22,22,9 697 lwz 9,24(6) 698 add 23,23,10 699 lwz 10,28(6) 700 add 24,24,7 701 add 25,25,8 702 add 26,26,9 703 add 27,27,10 704 add 28,28,11 705 add 29,29,12 706 add 30,30,14 707 add 31,31,15 708 709 vadduwm 0,0,12 710 vadduwm 4,4,12 711 vadduwm 8,8,12 712 vadduwm 1,1,13 713 vadduwm 5,5,13 714 vadduwm 9,9,13 715 vadduwm 2,2,14 716 vadduwm 6,6,14 717 vadduwm 10,10,14 718 vadduwm 3,3,15 719 vadduwm 7,7,16 720 vadduwm 11,11,17 721 722 addi 11,11,4 723 vadduwm 15,15,18 724 vadduwm 16,16,18 725 vadduwm 17,17,18 726 727 lwz 7,0(4) 728 lwz 8,4(4) 729 lwz 9,8(4) 730 lwz 10,12(4) 731 xor 16,16,7 732 lwz 7,16(4) 733 xor 17,17,8 734 lwz 8,20(4) 735 xor 18,18,9 736 lwz 9,24(4) 737 xor 19,19,10 738 lwz 10,28(4) 739 xor 20,20,7 740 lwz 7,32(4) 741 xor 21,21,8 742 lwz 8,36(4) 743 xor 22,22,9 744 lwz 9,40(4) 745 xor 23,23,10 746 lwz 10,44(4) 747 xor 24,24,7 748 lwz 7,48(4) 749 xor 25,25,8 750 lwz 8,52(4) 751 xor 26,26,9 752 lwz 9,56(4) 753 xor 27,27,10 754 lwz 10,60(4) 755 xor 28,28,7 756 stw 16,0(3) 757 xor 29,29,8 758 stw 17,4(3) 759 xor 30,30,9 760 stw 18,8(3) 761 xor 31,31,10 762 stw 19,12(3) 763 addi 4,4,64 764 stw 20,16(3) 765 li 7,16 766 stw 21,20(3) 767 li 8,32 768 stw 22,24(3) 769 li 9,48 770 stw 23,28(3) 771 li 10,64 772 stw 24,32(3) 773 stw 25,36(3) 774 stw 26,40(3) 775 stw 27,44(3) 776 stw 28,48(3) 777 stw 29,52(3) 778 stw 30,56(3) 779 stw 31,60(3) 780 addi 3,3,64 781 782 lvx 27,0,4 783 lvx 28,7,4 784 lvx 29,8,4 785 lvx 30,9,4 786 lvx 31,10,4 787 addi 4,4,64 788 789 vperm 27,28,27,24 790 vperm 28,29,28,24 791 vperm 29,30,29,24 792 vperm 30,31,30,24 793 vxor 0,0,27 794 vxor 1,1,28 795 lvx 28,7,4 796 vxor 2,2,29 797 lvx 29,8,4 798 vxor 3,3,30 799 lvx 30,9,4 800 lvx 27,10,4 801 addi 4,4,64 802 li 10,63 803 vperm 0,0,0,25 804 vperm 1,1,1,25 805 vperm 2,2,2,25 806 vperm 3,3,3,25 807 808 vperm 31,28,31,24 809 vperm 28,29,28,24 810 vperm 29,30,29,24 811 vperm 30,27,30,24 812 vxor 4,4,31 813 vxor 5,5,28 814 lvx 28,7,4 815 vxor 6,6,29 816 lvx 29,8,4 817 vxor 7,7,30 818 lvx 30,9,4 819 lvx 31,10,4 820 addi 4,4,64 821 vperm 4,4,4,25 822 vperm 5,5,5,25 823 vperm 6,6,6,25 824 vperm 7,7,7,25 825 826 vperm 27,28,27,24 827 vperm 28,29,28,24 828 vperm 29,30,29,24 829 vperm 30,31,30,24 830 vxor 8,8,27 831 vxor 9,9,28 832 vxor 10,10,29 833 vxor 11,11,30 834 vperm 8,8,8,25 835 vperm 9,9,9,25 836 vperm 10,10,10,25 837 vperm 11,11,11,25 838 839 andi. 17,3,15 840 mr 16,3 841 842 vsel 27,0,1,26 843 vsel 28,1,2,26 844 vsel 29,2,3,26 845 vsel 30,3,4,26 846 vsel 1,4,5,26 847 vsel 2,5,6,26 848 vsel 3,6,7,26 849 vsel 4,7,8,26 850 vsel 5,8,9,26 851 vsel 6,9,10,26 852 vsel 7,10,11,26 853 854 855 stvx 27,7,3 856 stvx 28,8,3 857 stvx 29,9,3 858 addi 3,3,64 859 stvx 30,0,3 860 stvx 1,7,3 861 stvx 2,8,3 862 stvx 3,9,3 863 addi 3,3,64 864 stvx 4,0,3 865 stvx 5,7,3 866 stvx 6,8,3 867 stvx 7,9,3 868 addi 3,3,64 869 870 beq .Laligned_vmx 871 872 sub 18,3,17 873 li 19,0 874.Lunaligned_tail_vmx: 875 stvebx 11,19,18 876 addi 19,19,1 877 cmpw 19,17 878 bne .Lunaligned_tail_vmx 879 880 sub 18,16,17 881.Lunaligned_head_vmx: 882 stvebx 0,17,18 883 cmpwi 17,15 884 addi 17,17,1 885 bne .Lunaligned_head_vmx 886 887 cmpldi 5,255 888 bgt .Loop_outer_vmx 889 890 b .Ldone_vmx 891 892.align 4 893.Laligned_vmx: 894 stvx 0,0,16 895 896 cmpldi 5,255 897 bgt .Loop_outer_vmx 898 nop 899 900.Ldone_vmx: 901 cmpldi 5,0 902 bnel __ChaCha20_1x 903 904 lwz 12,268(1) 905 li 10,127 906 li 11,143 907 or 12,12,12 908 lvx 23,10,1 909 addi 10,10,32 910 lvx 24,11,1 911 addi 11,11,32 912 lvx 25,10,1 913 addi 10,10,32 914 lvx 26,11,1 915 addi 11,11,32 916 lvx 27,10,1 917 addi 10,10,32 918 lvx 28,11,1 919 addi 11,11,32 920 lvx 29,10,1 921 addi 10,10,32 922 lvx 30,11,1 923 lvx 31,10,1 924 ld 0, 432(1) 925 ld 14,272(1) 926 ld 15,280(1) 927 ld 16,288(1) 928 ld 17,296(1) 929 ld 18,304(1) 930 ld 19,312(1) 931 ld 20,320(1) 932 ld 21,328(1) 933 ld 22,336(1) 934 ld 23,344(1) 935 ld 24,352(1) 936 ld 25,360(1) 937 ld 26,368(1) 938 ld 27,376(1) 939 ld 28,384(1) 940 ld 29,392(1) 941 ld 30,400(1) 942 ld 31,408(1) 943 mtlr 0 944 addi 1,1,416 945 blr 946.long 0 947.byte 0,12,0x04,1,0x80,18,5,0 948.long 0 949.size ChaCha20_ctr32_vmx,.-ChaCha20_ctr32_vmx 950 951.globl ChaCha20_ctr32_vsx 952.type ChaCha20_ctr32_vsx,@function 953.align 5 954ChaCha20_ctr32_vsx: 955.localentry ChaCha20_ctr32_vsx,0 956 957 stdu 1,-224(1) 958 mflr 0 959 li 10,127 960 li 11,143 961 li 12,-1 962 stvx 26,10,1 963 addi 10,10,32 964 stvx 27,11,1 965 addi 11,11,32 966 stvx 28,10,1 967 addi 10,10,32 968 stvx 29,11,1 969 addi 11,11,32 970 stvx 30,10,1 971 stvx 31,11,1 972 stw 12,220(1) 973 li 12,-4096+63 974 std 0, 240(1) 975 or 12,12,12 976 977 bl .Lconsts 978 .long 0x7E006619 979 addi 12,12,0x50 980 li 8,16 981 li 9,32 982 li 10,48 983 li 11,64 984 985 .long 0x7E203619 986 .long 0x7E483619 987 .long 0x7E603E19 988 989 vxor 27,27,27 990 .long 0x7F8B6619 991 vspltw 26,19,0 992 vsldoi 19,19,27,4 993 vsldoi 19,27,19,12 994 vadduwm 26,26,28 995 996 997 998 999 1000 li 0,10 1001 mtctr 0 1002 b .Loop_outer_vsx 1003 1004.align 5 1005.Loop_outer_vsx: 1006 lvx 0,0,12 1007 lvx 1,8,12 1008 lvx 2,9,12 1009 lvx 3,10,12 1010 1011 vspltw 4,17,0 1012 vspltw 5,17,1 1013 vspltw 6,17,2 1014 vspltw 7,17,3 1015 1016 vspltw 8,18,0 1017 vspltw 9,18,1 1018 vspltw 10,18,2 1019 vspltw 11,18,3 1020 1021 vor 12,26,26 1022 vspltw 13,19,1 1023 vspltw 14,19,2 1024 vspltw 15,19,3 1025 1026 vspltisw 27,-16 1027 vspltisw 28,12 1028 vspltisw 29,8 1029 vspltisw 30,7 1030 1031.Loop_vsx: 1032 vadduwm 0,0,4 1033 vadduwm 1,1,5 1034 vadduwm 2,2,6 1035 vadduwm 3,3,7 1036 vxor 12,12,0 1037 vxor 13,13,1 1038 vxor 14,14,2 1039 vxor 15,15,3 1040 vrlw 12,12,27 1041 vrlw 13,13,27 1042 vrlw 14,14,27 1043 vrlw 15,15,27 1044 vadduwm 8,8,12 1045 vadduwm 9,9,13 1046 vadduwm 10,10,14 1047 vadduwm 11,11,15 1048 vxor 4,4,8 1049 vxor 5,5,9 1050 vxor 6,6,10 1051 vxor 7,7,11 1052 vrlw 4,4,28 1053 vrlw 5,5,28 1054 vrlw 6,6,28 1055 vrlw 7,7,28 1056 vadduwm 0,0,4 1057 vadduwm 1,1,5 1058 vadduwm 2,2,6 1059 vadduwm 3,3,7 1060 vxor 12,12,0 1061 vxor 13,13,1 1062 vxor 14,14,2 1063 vxor 15,15,3 1064 vrlw 12,12,29 1065 vrlw 13,13,29 1066 vrlw 14,14,29 1067 vrlw 15,15,29 1068 vadduwm 8,8,12 1069 vadduwm 9,9,13 1070 vadduwm 10,10,14 1071 vadduwm 11,11,15 1072 vxor 4,4,8 1073 vxor 5,5,9 1074 vxor 6,6,10 1075 vxor 7,7,11 1076 vrlw 4,4,30 1077 vrlw 5,5,30 1078 vrlw 6,6,30 1079 vrlw 7,7,30 1080 vadduwm 0,0,5 1081 vadduwm 1,1,6 1082 vadduwm 2,2,7 1083 vadduwm 3,3,4 1084 vxor 15,15,0 1085 vxor 12,12,1 1086 vxor 13,13,2 1087 vxor 14,14,3 1088 vrlw 15,15,27 1089 vrlw 12,12,27 1090 vrlw 13,13,27 1091 vrlw 14,14,27 1092 vadduwm 10,10,15 1093 vadduwm 11,11,12 1094 vadduwm 8,8,13 1095 vadduwm 9,9,14 1096 vxor 5,5,10 1097 vxor 6,6,11 1098 vxor 7,7,8 1099 vxor 4,4,9 1100 vrlw 5,5,28 1101 vrlw 6,6,28 1102 vrlw 7,7,28 1103 vrlw 4,4,28 1104 vadduwm 0,0,5 1105 vadduwm 1,1,6 1106 vadduwm 2,2,7 1107 vadduwm 3,3,4 1108 vxor 15,15,0 1109 vxor 12,12,1 1110 vxor 13,13,2 1111 vxor 14,14,3 1112 vrlw 15,15,29 1113 vrlw 12,12,29 1114 vrlw 13,13,29 1115 vrlw 14,14,29 1116 vadduwm 10,10,15 1117 vadduwm 11,11,12 1118 vadduwm 8,8,13 1119 vadduwm 9,9,14 1120 vxor 5,5,10 1121 vxor 6,6,11 1122 vxor 7,7,8 1123 vxor 4,4,9 1124 vrlw 5,5,30 1125 vrlw 6,6,30 1126 vrlw 7,7,30 1127 vrlw 4,4,30 1128 bdnz .Loop_vsx 1129 1130 vadduwm 12,12,26 1131 1132 .long 0x13600F8C 1133 .long 0x13821F8C 1134 .long 0x10000E8C 1135 .long 0x10421E8C 1136 .long 0x13A42F8C 1137 .long 0x13C63F8C 1138 .long 0xF0201057 1139 .long 0xF0601357 1140 .long 0xF01BE057 1141 .long 0xF05BE357 1142 1143 .long 0x10842E8C 1144 .long 0x10C63E8C 1145 .long 0x13684F8C 1146 .long 0x138A5F8C 1147 .long 0xF0A43057 1148 .long 0xF0E43357 1149 .long 0xF09DF057 1150 .long 0xF0DDF357 1151 1152 .long 0x11084E8C 1153 .long 0x114A5E8C 1154 .long 0x13AC6F8C 1155 .long 0x13CE7F8C 1156 .long 0xF1285057 1157 .long 0xF1685357 1158 .long 0xF11BE057 1159 .long 0xF15BE357 1160 1161 .long 0x118C6E8C 1162 .long 0x11CE7E8C 1163 vspltisw 27,4 1164 vadduwm 26,26,27 1165 .long 0xF1AC7057 1166 .long 0xF1EC7357 1167 .long 0xF19DF057 1168 .long 0xF1DDF357 1169 1170 vadduwm 0,0,16 1171 vadduwm 4,4,17 1172 vadduwm 8,8,18 1173 vadduwm 12,12,19 1174 1175 1176 1177 1178 1179 1180 cmpldi 5,0x40 1181 blt .Ltail_vsx 1182 1183 .long 0x7F602619 1184 .long 0x7F882619 1185 .long 0x7FA92619 1186 .long 0x7FCA2619 1187 1188 vxor 27,27,0 1189 vxor 28,28,4 1190 vxor 29,29,8 1191 vxor 30,30,12 1192 1193 .long 0x7F601F19 1194 .long 0x7F881F19 1195 addi 4,4,0x40 1196 .long 0x7FA91F19 1197 subi 5,5,0x40 1198 .long 0x7FCA1F19 1199 addi 3,3,0x40 1200 beq .Ldone_vsx 1201 1202 vadduwm 0,1,16 1203 vadduwm 4,5,17 1204 vadduwm 8,9,18 1205 vadduwm 12,13,19 1206 1207 1208 1209 1210 1211 1212 cmpldi 5,0x40 1213 blt .Ltail_vsx 1214 1215 .long 0x7F602619 1216 .long 0x7F882619 1217 .long 0x7FA92619 1218 .long 0x7FCA2619 1219 1220 vxor 27,27,0 1221 vxor 28,28,4 1222 vxor 29,29,8 1223 vxor 30,30,12 1224 1225 .long 0x7F601F19 1226 .long 0x7F881F19 1227 addi 4,4,0x40 1228 .long 0x7FA91F19 1229 subi 5,5,0x40 1230 .long 0x7FCA1F19 1231 addi 3,3,0x40 1232 beq .Ldone_vsx 1233 1234 vadduwm 0,2,16 1235 vadduwm 4,6,17 1236 vadduwm 8,10,18 1237 vadduwm 12,14,19 1238 1239 1240 1241 1242 1243 1244 cmpldi 5,0x40 1245 blt .Ltail_vsx 1246 1247 .long 0x7F602619 1248 .long 0x7F882619 1249 .long 0x7FA92619 1250 .long 0x7FCA2619 1251 1252 vxor 27,27,0 1253 vxor 28,28,4 1254 vxor 29,29,8 1255 vxor 30,30,12 1256 1257 .long 0x7F601F19 1258 .long 0x7F881F19 1259 addi 4,4,0x40 1260 .long 0x7FA91F19 1261 subi 5,5,0x40 1262 .long 0x7FCA1F19 1263 addi 3,3,0x40 1264 beq .Ldone_vsx 1265 1266 vadduwm 0,3,16 1267 vadduwm 4,7,17 1268 vadduwm 8,11,18 1269 vadduwm 12,15,19 1270 1271 1272 1273 1274 1275 1276 cmpldi 5,0x40 1277 blt .Ltail_vsx 1278 1279 .long 0x7F602619 1280 .long 0x7F882619 1281 .long 0x7FA92619 1282 .long 0x7FCA2619 1283 1284 vxor 27,27,0 1285 vxor 28,28,4 1286 vxor 29,29,8 1287 vxor 30,30,12 1288 1289 .long 0x7F601F19 1290 .long 0x7F881F19 1291 addi 4,4,0x40 1292 .long 0x7FA91F19 1293 subi 5,5,0x40 1294 .long 0x7FCA1F19 1295 addi 3,3,0x40 1296 mtctr 0 1297 bne .Loop_outer_vsx 1298 1299.Ldone_vsx: 1300 lwz 12,220(1) 1301 li 10,127 1302 li 11,143 1303 ld 0, 240(1) 1304 or 12,12,12 1305 lvx 26,10,1 1306 addi 10,10,32 1307 lvx 27,11,1 1308 addi 11,11,32 1309 lvx 28,10,1 1310 addi 10,10,32 1311 lvx 29,11,1 1312 addi 11,11,32 1313 lvx 30,10,1 1314 lvx 31,11,1 1315 mtlr 0 1316 addi 1,1,224 1317 blr 1318 1319.align 4 1320.Ltail_vsx: 1321 addi 11,1,48 1322 mtctr 5 1323 .long 0x7C005F19 1324 .long 0x7C885F19 1325 .long 0x7D095F19 1326 .long 0x7D8A5F19 1327 subi 12,11,1 1328 subi 4,4,1 1329 subi 3,3,1 1330 1331.Loop_tail_vsx: 1332 lbzu 6,1(12) 1333 lbzu 7,1(4) 1334 xor 6,6,7 1335 stbu 6,1(3) 1336 bdnz .Loop_tail_vsx 1337 1338 .long 0x7E005F19 1339 .long 0x7E085F19 1340 .long 0x7E095F19 1341 .long 0x7E0A5F19 1342 1343 b .Ldone_vsx 1344.long 0 1345.byte 0,12,0x04,1,0x80,0,5,0 1346.long 0 1347.size ChaCha20_ctr32_vsx,.-ChaCha20_ctr32_vsx 1348.align 5 1349.Lconsts: 1350 mflr 0 1351 bcl 20,31,$+4 1352 mflr 12 1353 addi 12,12,56 1354 mtlr 0 1355 blr 1356.long 0 1357.byte 0,12,0x14,0,0,0,0,0 1358.space 28 1359.Lsigma: 1360.long 0x61707865,0x3320646e,0x79622d32,0x6b206574 1361.long 1,0,0,0 1362.long 4,0,0,0 1363.long 0x0e0f0c0d,0x0a0b0809,0x06070405,0x02030001 1364.long 0x0d0e0f0c,0x090a0b08,0x05060704,0x01020300 1365.long 0x61707865,0x61707865,0x61707865,0x61707865 1366.long 0x3320646e,0x3320646e,0x3320646e,0x3320646e 1367.long 0x79622d32,0x79622d32,0x79622d32,0x79622d32 1368.long 0x6b206574,0x6b206574,0x6b206574,0x6b206574 1369.long 0,1,2,3 1370.byte 67,104,97,67,104,97,50,48,32,102,111,114,32,80,111,119,101,114,80,67,47,65,108,116,105,86,101,99,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 1371.align 2 1372.align 2 1373