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

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: Created 4 years, 3 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 2791 matching lines...) Expand 10 before | Expand all | Expand 10 after
2802 } 2802 }
2803 case Intrinsics::Bswap: { 2803 case Intrinsics::Bswap: {
2804 UnimplementedLoweringError(this, Instr); 2804 UnimplementedLoweringError(this, Instr);
2805 return; 2805 return;
2806 } 2806 }
2807 case Intrinsics::Ctpop: { 2807 case Intrinsics::Ctpop: {
2808 UnimplementedLoweringError(this, Instr); 2808 UnimplementedLoweringError(this, Instr);
2809 return; 2809 return;
2810 } 2810 }
2811 case Intrinsics::Ctlz: { 2811 case Intrinsics::Ctlz: {
2812 UnimplementedLoweringError(this, Instr); 2812 auto *Src = Instr->getArg(0);
2813 Type SrcTy = Src->getType();
Jim Stichnoth 2016/09/22 13:48:27 const Type
obucinac 2016/09/22 15:42:07 Done.
2814 if (isScalarIntegerType(SrcTy)) {
Jim Stichnoth 2016/09/22 13:48:27 This code seems a bit unbalanced - it appears to d
obucinac 2016/09/22 15:42:07 Done.
2815 if (SrcTy == IceType_i64) {
2816 UnimplementedLoweringError(this, Instr);
2817 } else {
2818 auto *DestR = legalizeToReg(Dest);
Jim Stichnoth 2016/09/22 13:48:27 This doesn't seem right to me. Dest shouldn't act
obucinac 2016/09/22 15:42:07 Done.
2819 auto *SrcR = legalizeToReg(Src);
2820 _clz(DestR, SrcR);
2821 _mov(Dest, DestR);
2822 }
2823 }
2813 return; 2824 return;
2814 } 2825 }
2815 case Intrinsics::Cttz: { 2826 case Intrinsics::Cttz: {
2816 UnimplementedLoweringError(this, Instr); 2827 UnimplementedLoweringError(this, Instr);
2817 return; 2828 return;
2818 } 2829 }
2819 case Intrinsics::Fabs: { 2830 case Intrinsics::Fabs: {
2820 if (isScalarFloatingType(DestTy)) { 2831 if (isScalarFloatingType(DestTy)) {
2821 Variable *T = makeReg(DestTy); 2832 Variable *T = makeReg(DestTy);
2822 if (DestTy == IceType_f32) { 2833 if (DestTy == IceType_f32) {
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
3730 Str << "\t.set\t" 3741 Str << "\t.set\t"
3731 << "nomips16\n"; 3742 << "nomips16\n";
3732 } 3743 }
3733 3744
3734 SmallBitVector TargetMIPS32::TypeToRegisterSet[RCMIPS32_NUM]; 3745 SmallBitVector TargetMIPS32::TypeToRegisterSet[RCMIPS32_NUM];
3735 SmallBitVector TargetMIPS32::TypeToRegisterSetUnfiltered[RCMIPS32_NUM]; 3746 SmallBitVector TargetMIPS32::TypeToRegisterSetUnfiltered[RCMIPS32_NUM];
3736 SmallBitVector TargetMIPS32::RegisterAliases[RegMIPS32::Reg_NUM]; 3747 SmallBitVector TargetMIPS32::RegisterAliases[RegMIPS32::Reg_NUM];
3737 3748
3738 } // end of namespace MIPS32 3749 } // end of namespace MIPS32
3739 } // end of namespace Ice 3750 } // 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