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

Side by Side Diff: src/IceTargetLoweringMIPS32.cpp

Issue 2354293002: Subzero, MIPS32: Intrinsic call Ctlz for i32 (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addressing review comments Created 4 years, 2 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
« no previous file with comments | « src/IceTargetLoweringMIPS32.h ('k') | tests_lit/assembler/mips32/encoding_intrinsics.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2828 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « src/IceTargetLoweringMIPS32.h ('k') | tests_lit/assembler/mips32/encoding_intrinsics.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698