diff options
Diffstat (limited to 'arch/powerpc/lib/copyuser_power7.S')
-rw-r--r-- | arch/powerpc/lib/copyuser_power7.S | 54 |
1 files changed, 31 insertions, 23 deletions
diff --git a/arch/powerpc/lib/copyuser_power7.S b/arch/powerpc/lib/copyuser_power7.S index d1f11795a7ad..e8e9c36dc784 100644 --- a/arch/powerpc/lib/copyuser_power7.S +++ b/arch/powerpc/lib/copyuser_power7.S | |||
@@ -19,6 +19,14 @@ | |||
19 | */ | 19 | */ |
20 | #include <asm/ppc_asm.h> | 20 | #include <asm/ppc_asm.h> |
21 | 21 | ||
22 | #ifdef __BIG_ENDIAN__ | ||
23 | #define LVS(VRT,RA,RB) lvsl VRT,RA,RB | ||
24 | #define VPERM(VRT,VRA,VRB,VRC) vperm VRT,VRA,VRB,VRC | ||
25 | #else | ||
26 | #define LVS(VRT,RA,RB) lvsr VRT,RA,RB | ||
27 | #define VPERM(VRT,VRA,VRB,VRC) vperm VRT,VRB,VRA,VRC | ||
28 | #endif | ||
29 | |||
22 | .macro err1 | 30 | .macro err1 |
23 | 100: | 31 | 100: |
24 | .section __ex_table,"a" | 32 | .section __ex_table,"a" |
@@ -552,13 +560,13 @@ err3; stw r7,4(r3) | |||
552 | li r10,32 | 560 | li r10,32 |
553 | li r11,48 | 561 | li r11,48 |
554 | 562 | ||
555 | lvsl vr16,0,r4 /* Setup permute control vector */ | 563 | LVS(vr16,0,r4) /* Setup permute control vector */ |
556 | err3; lvx vr0,0,r4 | 564 | err3; lvx vr0,0,r4 |
557 | addi r4,r4,16 | 565 | addi r4,r4,16 |
558 | 566 | ||
559 | bf cr7*4+3,5f | 567 | bf cr7*4+3,5f |
560 | err3; lvx vr1,r0,r4 | 568 | err3; lvx vr1,r0,r4 |
561 | vperm vr8,vr0,vr1,vr16 | 569 | VPERM(vr8,vr0,vr1,vr16) |
562 | addi r4,r4,16 | 570 | addi r4,r4,16 |
563 | err3; stvx vr8,r0,r3 | 571 | err3; stvx vr8,r0,r3 |
564 | addi r3,r3,16 | 572 | addi r3,r3,16 |
@@ -566,9 +574,9 @@ err3; stvx vr8,r0,r3 | |||
566 | 574 | ||
567 | 5: bf cr7*4+2,6f | 575 | 5: bf cr7*4+2,6f |
568 | err3; lvx vr1,r0,r4 | 576 | err3; lvx vr1,r0,r4 |
569 | vperm vr8,vr0,vr1,vr16 | 577 | VPERM(vr8,vr0,vr1,vr16) |
570 | err3; lvx vr0,r4,r9 | 578 | err3; lvx vr0,r4,r9 |
571 | vperm vr9,vr1,vr0,vr16 | 579 | VPERM(vr9,vr1,vr0,vr16) |
572 | addi r4,r4,32 | 580 | addi r4,r4,32 |
573 | err3; stvx vr8,r0,r3 | 581 | err3; stvx vr8,r0,r3 |
574 | err3; stvx vr9,r3,r9 | 582 | err3; stvx vr9,r3,r9 |
@@ -576,13 +584,13 @@ err3; stvx vr9,r3,r9 | |||
576 | 584 | ||
577 | 6: bf cr7*4+1,7f | 585 | 6: bf cr7*4+1,7f |
578 | err3; lvx vr3,r0,r4 | 586 | err3; lvx vr3,r0,r4 |
579 | vperm vr8,vr0,vr3,vr16 | 587 | VPERM(vr8,vr0,vr3,vr16) |
580 | err3; lvx vr2,r4,r9 | 588 | err3; lvx vr2,r4,r9 |
581 | vperm vr9,vr3,vr2,vr16 | 589 | VPERM(vr9,vr3,vr2,vr16) |
582 | err3; lvx vr1,r4,r10 | 590 | err3; lvx vr1,r4,r10 |
583 | vperm vr10,vr2,vr1,vr16 | 591 | VPERM(vr10,vr2,vr1,vr16) |
584 | err3; lvx vr0,r4,r11 | 592 | err3; lvx vr0,r4,r11 |
585 | vperm vr11,vr1,vr0,vr16 | 593 | VPERM(vr11,vr1,vr0,vr16) |
586 | addi r4,r4,64 | 594 | addi r4,r4,64 |
587 | err3; stvx vr8,r0,r3 | 595 | err3; stvx vr8,r0,r3 |
588 | err3; stvx vr9,r3,r9 | 596 | err3; stvx vr9,r3,r9 |
@@ -611,21 +619,21 @@ err3; stvx vr11,r3,r11 | |||
611 | .align 5 | 619 | .align 5 |
612 | 8: | 620 | 8: |
613 | err4; lvx vr7,r0,r4 | 621 | err4; lvx vr7,r0,r4 |
614 | vperm vr8,vr0,vr7,vr16 | 622 | VPERM(vr8,vr0,vr7,vr16) |
615 | err4; lvx vr6,r4,r9 | 623 | err4; lvx vr6,r4,r9 |
616 | vperm vr9,vr7,vr6,vr16 | 624 | VPERM(vr9,vr7,vr6,vr16) |
617 | err4; lvx vr5,r4,r10 | 625 | err4; lvx vr5,r4,r10 |
618 | vperm vr10,vr6,vr5,vr16 | 626 | VPERM(vr10,vr6,vr5,vr16) |
619 | err4; lvx vr4,r4,r11 | 627 | err4; lvx vr4,r4,r11 |
620 | vperm vr11,vr5,vr4,vr16 | 628 | VPERM(vr11,vr5,vr4,vr16) |
621 | err4; lvx vr3,r4,r12 | 629 | err4; lvx vr3,r4,r12 |
622 | vperm vr12,vr4,vr3,vr16 | 630 | VPERM(vr12,vr4,vr3,vr16) |
623 | err4; lvx vr2,r4,r14 | 631 | err4; lvx vr2,r4,r14 |
624 | vperm vr13,vr3,vr2,vr16 | 632 | VPERM(vr13,vr3,vr2,vr16) |
625 | err4; lvx vr1,r4,r15 | 633 | err4; lvx vr1,r4,r15 |
626 | vperm vr14,vr2,vr1,vr16 | 634 | VPERM(vr14,vr2,vr1,vr16) |
627 | err4; lvx vr0,r4,r16 | 635 | err4; lvx vr0,r4,r16 |
628 | vperm vr15,vr1,vr0,vr16 | 636 | VPERM(vr15,vr1,vr0,vr16) |
629 | addi r4,r4,128 | 637 | addi r4,r4,128 |
630 | err4; stvx vr8,r0,r3 | 638 | err4; stvx vr8,r0,r3 |
631 | err4; stvx vr9,r3,r9 | 639 | err4; stvx vr9,r3,r9 |
@@ -649,13 +657,13 @@ err4; stvx vr15,r3,r16 | |||
649 | 657 | ||
650 | bf cr7*4+1,9f | 658 | bf cr7*4+1,9f |
651 | err3; lvx vr3,r0,r4 | 659 | err3; lvx vr3,r0,r4 |
652 | vperm vr8,vr0,vr3,vr16 | 660 | VPERM(vr8,vr0,vr3,vr16) |
653 | err3; lvx vr2,r4,r9 | 661 | err3; lvx vr2,r4,r9 |
654 | vperm vr9,vr3,vr2,vr16 | 662 | VPERM(vr9,vr3,vr2,vr16) |
655 | err3; lvx vr1,r4,r10 | 663 | err3; lvx vr1,r4,r10 |
656 | vperm vr10,vr2,vr1,vr16 | 664 | VPERM(vr10,vr2,vr1,vr16) |
657 | err3; lvx vr0,r4,r11 | 665 | err3; lvx vr0,r4,r11 |
658 | vperm vr11,vr1,vr0,vr16 | 666 | VPERM(vr11,vr1,vr0,vr16) |
659 | addi r4,r4,64 | 667 | addi r4,r4,64 |
660 | err3; stvx vr8,r0,r3 | 668 | err3; stvx vr8,r0,r3 |
661 | err3; stvx vr9,r3,r9 | 669 | err3; stvx vr9,r3,r9 |
@@ -665,9 +673,9 @@ err3; stvx vr11,r3,r11 | |||
665 | 673 | ||
666 | 9: bf cr7*4+2,10f | 674 | 9: bf cr7*4+2,10f |
667 | err3; lvx vr1,r0,r4 | 675 | err3; lvx vr1,r0,r4 |
668 | vperm vr8,vr0,vr1,vr16 | 676 | VPERM(vr8,vr0,vr1,vr16) |
669 | err3; lvx vr0,r4,r9 | 677 | err3; lvx vr0,r4,r9 |
670 | vperm vr9,vr1,vr0,vr16 | 678 | VPERM(vr9,vr1,vr0,vr16) |
671 | addi r4,r4,32 | 679 | addi r4,r4,32 |
672 | err3; stvx vr8,r0,r3 | 680 | err3; stvx vr8,r0,r3 |
673 | err3; stvx vr9,r3,r9 | 681 | err3; stvx vr9,r3,r9 |
@@ -675,7 +683,7 @@ err3; stvx vr9,r3,r9 | |||
675 | 683 | ||
676 | 10: bf cr7*4+3,11f | 684 | 10: bf cr7*4+3,11f |
677 | err3; lvx vr1,r0,r4 | 685 | err3; lvx vr1,r0,r4 |
678 | vperm vr8,vr0,vr1,vr16 | 686 | VPERM(vr8,vr0,vr1,vr16) |
679 | addi r4,r4,16 | 687 | addi r4,r4,16 |
680 | err3; stvx vr8,r0,r3 | 688 | err3; stvx vr8,r0,r3 |
681 | addi r3,r3,16 | 689 | addi r3,r3,16 |