OLD | NEW |
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 Loading... |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |