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 2828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2839 } | 2839 } |
2840 case Intrinsics::Bswap: { | 2840 case Intrinsics::Bswap: { |
2841 UnimplementedLoweringError(this, Instr); | 2841 UnimplementedLoweringError(this, Instr); |
2842 return; | 2842 return; |
2843 } | 2843 } |
2844 case Intrinsics::Ctpop: { | 2844 case Intrinsics::Ctpop: { |
2845 llvm::report_fatal_error("Ctpop should have been prelowered."); | 2845 llvm::report_fatal_error("Ctpop should have been prelowered."); |
2846 return; | 2846 return; |
2847 } | 2847 } |
2848 case Intrinsics::Ctlz: { | 2848 case Intrinsics::Ctlz: { |
2849 UnimplementedLoweringError(this, Instr); | 2849 auto *Src = Instr->getArg(0); |
2850 return; | 2850 const Type SrcTy = Src->getType(); |
Jim Stichnoth
2016/09/22 18:18:24
This gives an error in a MINIMAL build (make -f Ma
obucinac
2016/09/22 18:58:16
Maybe this would do...
| |
2851 assert(SrcTy == IceType_i32 || SrcTy == IceType_i64); | |
2852 switch (Src->getType()) { | |
2853 case IceType_i32: { | |
2854 auto *T = I32Reg(); | |
2855 auto *SrcR = legalizeToReg(Src); | |
2856 _clz(T, SrcR); | |
2857 _mov(Dest, T); | |
2858 break; | |
2859 } | |
2860 case IceType_i64: { | |
2861 UnimplementedLoweringError(this, Instr); | |
2862 break; | |
2863 } | |
2864 default: | |
2865 llvm::report_fatal_error("Control flow should never have reached here."); | |
2866 } | |
2867 break; | |
2851 } | 2868 } |
2852 case Intrinsics::Cttz: { | 2869 case Intrinsics::Cttz: { |
2853 UnimplementedLoweringError(this, Instr); | 2870 UnimplementedLoweringError(this, Instr); |
2854 return; | 2871 return; |
2855 } | 2872 } |
2856 case Intrinsics::Fabs: { | 2873 case Intrinsics::Fabs: { |
2857 if (isScalarFloatingType(DestTy)) { | 2874 if (isScalarFloatingType(DestTy)) { |
2858 Variable *T = makeReg(DestTy); | 2875 Variable *T = makeReg(DestTy); |
2859 if (DestTy == IceType_f32) { | 2876 if (DestTy == IceType_f32) { |
2860 _abs_s(T, legalizeToReg(Instr->getArg(0))); | 2877 _abs_s(T, legalizeToReg(Instr->getArg(0))); |
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3741 Str << "\t.set\t" | 3758 Str << "\t.set\t" |
3742 << "nomips16\n"; | 3759 << "nomips16\n"; |
3743 } | 3760 } |
3744 | 3761 |
3745 SmallBitVector TargetMIPS32::TypeToRegisterSet[RCMIPS32_NUM]; | 3762 SmallBitVector TargetMIPS32::TypeToRegisterSet[RCMIPS32_NUM]; |
3746 SmallBitVector TargetMIPS32::TypeToRegisterSetUnfiltered[RCMIPS32_NUM]; | 3763 SmallBitVector TargetMIPS32::TypeToRegisterSetUnfiltered[RCMIPS32_NUM]; |
3747 SmallBitVector TargetMIPS32::RegisterAliases[RegMIPS32::Reg_NUM]; | 3764 SmallBitVector TargetMIPS32::RegisterAliases[RegMIPS32::Reg_NUM]; |
3748 | 3765 |
3749 } // end of namespace MIPS32 | 3766 } // end of namespace MIPS32 |
3750 } // end of namespace Ice | 3767 } // end of namespace Ice |
OLD | NEW |