Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: src/IceTargetLoweringMIPS32.cpp

Issue 1975283002: Subzero, MIPS32: Implement logical instructions ashr, lshr, shl (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // 1 //
2 // The Subzero Code Generator 2 // The Subzero Code Generator
3 // 3 //
4 // This file is distributed under the University of Illinois Open Source 4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details. 5 // License. See LICENSE.TXT for details.
6 // 6 //
7 //===----------------------------------------------------------------------===// 7 //===----------------------------------------------------------------------===//
8 /// 8 ///
9 /// \file 9 /// \file
10 /// \brief Implements the TargetLoweringMIPS32 class, which consists almost 10 /// \brief Implements the TargetLoweringMIPS32 class, which consists almost
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 lowerInt64Arithmetic(Instr, Instr->getDest(), Src0, Src1); 685 lowerInt64Arithmetic(Instr, Instr->getDest(), Src0, Src1);
686 return; 686 return;
687 } 687 }
688 if (isVectorType(Dest->getType())) { 688 if (isVectorType(Dest->getType())) {
689 UnimplementedLoweringError(this, Instr); 689 UnimplementedLoweringError(this, Instr);
690 return; 690 return;
691 } 691 }
692 switch (Instr->getOp()) { 692 switch (Instr->getOp()) {
693 default: 693 default:
694 break; 694 break;
695 case InstArithmetic::Shl:
696 case InstArithmetic::Lshr:
697 case InstArithmetic::Ashr:
698 case InstArithmetic::Udiv: 695 case InstArithmetic::Udiv:
699 case InstArithmetic::Sdiv: 696 case InstArithmetic::Sdiv:
700 case InstArithmetic::Urem: 697 case InstArithmetic::Urem:
701 case InstArithmetic::Srem: 698 case InstArithmetic::Srem:
702 case InstArithmetic::Fadd: 699 case InstArithmetic::Fadd:
703 case InstArithmetic::Fsub: 700 case InstArithmetic::Fsub:
704 case InstArithmetic::Fmul: 701 case InstArithmetic::Fmul:
705 case InstArithmetic::Fdiv: 702 case InstArithmetic::Fdiv:
706 case InstArithmetic::Frem: 703 case InstArithmetic::Frem:
707 UnimplementedLoweringError(this, Instr); 704 UnimplementedLoweringError(this, Instr);
(...skipping 27 matching lines...) Expand all
735 return; 732 return;
736 case InstArithmetic::Sub: 733 case InstArithmetic::Sub:
737 _subu(T, Src0R, Src1R); 734 _subu(T, Src0R, Src1R);
738 _mov(Dest, T); 735 _mov(Dest, T);
739 return; 736 return;
740 case InstArithmetic::Mul: { 737 case InstArithmetic::Mul: {
741 _mul(T, Src0R, Src1R); 738 _mul(T, Src0R, Src1R);
742 _mov(Dest, T); 739 _mov(Dest, T);
743 return; 740 return;
744 } 741 }
745 case InstArithmetic::Shl: 742 case InstArithmetic::Shl: {
746 break; 743 _sllv(T, Src0R, Src1R);
747 case InstArithmetic::Lshr: 744 _mov(Dest, T);
748 break; 745 return;
749 case InstArithmetic::Ashr: 746 }
750 break; 747 case InstArithmetic::Lshr: {
748 _srlv(T, Src0R, Src1R);
749 _mov(Dest, T);
750 return;
751 }
752 case InstArithmetic::Ashr: {
753 _srav(T, Src0R, Src1R);
754 _mov(Dest, T);
755 return;
756 }
751 case InstArithmetic::Udiv: 757 case InstArithmetic::Udiv:
752 break; 758 break;
753 case InstArithmetic::Sdiv: 759 case InstArithmetic::Sdiv:
754 break; 760 break;
755 case InstArithmetic::Urem: 761 case InstArithmetic::Urem:
756 break; 762 break;
757 case InstArithmetic::Srem: 763 case InstArithmetic::Srem:
758 break; 764 break;
759 case InstArithmetic::Fadd: 765 case InstArithmetic::Fadd:
760 break; 766 break;
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
1480 Str << "\t.set\t" 1486 Str << "\t.set\t"
1481 << "nomips16\n"; 1487 << "nomips16\n";
1482 } 1488 }
1483 1489
1484 SmallBitVector TargetMIPS32::TypeToRegisterSet[RCMIPS32_NUM]; 1490 SmallBitVector TargetMIPS32::TypeToRegisterSet[RCMIPS32_NUM];
1485 SmallBitVector TargetMIPS32::TypeToRegisterSetUnfiltered[RCMIPS32_NUM]; 1491 SmallBitVector TargetMIPS32::TypeToRegisterSetUnfiltered[RCMIPS32_NUM];
1486 SmallBitVector TargetMIPS32::RegisterAliases[RegMIPS32::Reg_NUM]; 1492 SmallBitVector TargetMIPS32::RegisterAliases[RegMIPS32::Reg_NUM];
1487 1493
1488 } // end of namespace MIPS32 1494 } // end of namespace MIPS32
1489 } // end of namespace Ice 1495 } // end of namespace Ice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698