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

Side by Side Diff: src/IceInstMIPS32.cpp

Issue 2358393004: Subzero, MIPS32: Intrinsic call Cttz for i32 (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Changes as advised 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/IceInstMIPS32.h ('k') | src/IceTargetLoweringMIPS32.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceInstMips32.cpp - Mips32 instruction implementation --===// 1 //===- subzero/src/IceInstMips32.cpp - Mips32 instruction implementation --===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 /// \file 10 /// \file
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 template <> void InstMIPS32Sub_d::emitIAS(const Cfg *Func) const { 1072 template <> void InstMIPS32Sub_d::emitIAS(const Cfg *Func) const {
1073 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 1073 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
1074 Asm->sub_d(getDest(), getSrc(0), getSrc(1)); 1074 Asm->sub_d(getDest(), getSrc(0), getSrc(1));
1075 } 1075 }
1076 1076
1077 template <> void InstMIPS32Sub_s::emitIAS(const Cfg *Func) const { 1077 template <> void InstMIPS32Sub_s::emitIAS(const Cfg *Func) const {
1078 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 1078 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
1079 Asm->sub_s(getDest(), getSrc(0), getSrc(1)); 1079 Asm->sub_s(getDest(), getSrc(0), getSrc(1));
1080 } 1080 }
1081 1081
1082 template <> void InstMIPS32Subu::emitIAS(const Cfg *Func) const {
1083 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
1084 Asm->subu(getDest(), getSrc(0), getSrc(1));
1085 }
1086
1082 template <> void InstMIPS32Sw::emitIAS(const Cfg *Func) const { 1087 template <> void InstMIPS32Sw::emitIAS(const Cfg *Func) const {
1083 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 1088 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
1084 auto *Mem = llvm::dyn_cast<OperandMIPS32Mem>(getSrc(1)); 1089 auto *Mem = llvm::dyn_cast<OperandMIPS32Mem>(getSrc(1));
1085 ConstantInteger32 *Offset = llvm::cast<ConstantInteger32>(Mem->getOffset()); 1090 ConstantInteger32 *Offset = llvm::cast<ConstantInteger32>(Mem->getOffset());
1086 uint32_t Imm = static_cast<uint32_t>(Offset->getValue()); 1091 uint32_t Imm = static_cast<uint32_t>(Offset->getValue());
1087 Asm->sw(getSrc(0), Mem->getBase(), Imm); 1092 Asm->sw(getSrc(0), Mem->getBase(), Imm);
1088 } 1093 }
1089 1094
1090 template <> void InstMIPS32Teq::emitIAS(const Cfg *Func) const { 1095 template <> void InstMIPS32Teq::emitIAS(const Cfg *Func) const {
1091 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 1096 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
(...skipping 25 matching lines...) Expand all
1117 Asm->xor_(getDest(), getSrc(0), getSrc(1)); 1122 Asm->xor_(getDest(), getSrc(0), getSrc(1));
1118 } 1123 }
1119 1124
1120 template <> void InstMIPS32Xori::emitIAS(const Cfg *Func) const { 1125 template <> void InstMIPS32Xori::emitIAS(const Cfg *Func) const {
1121 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 1126 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
1122 Asm->xori(getDest(), getSrc(0), Imm); 1127 Asm->xori(getDest(), getSrc(0), Imm);
1123 } 1128 }
1124 1129
1125 } // end of namespace MIPS32 1130 } // end of namespace MIPS32
1126 } // end of namespace Ice 1131 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceInstMIPS32.h ('k') | src/IceTargetLoweringMIPS32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698