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

Side by Side Diff: src/IceInstMIPS32.cpp

Issue 2339323004: [SubZero] Use DIV instruction instead of TargetHelperCall (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addressed review comments 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.h » ('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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 template <> const char *InstMIPS32Sra::Opcode = "sra"; 133 template <> const char *InstMIPS32Sra::Opcode = "sra";
134 template <> const char *InstMIPS32Srav::Opcode = "srav"; 134 template <> const char *InstMIPS32Srav::Opcode = "srav";
135 template <> const char *InstMIPS32Srl::Opcode = "srl"; 135 template <> const char *InstMIPS32Srl::Opcode = "srl";
136 template <> const char *InstMIPS32Srlv::Opcode = "srlv"; 136 template <> const char *InstMIPS32Srlv::Opcode = "srlv";
137 template <> const char *InstMIPS32Sub::Opcode = "sub"; 137 template <> const char *InstMIPS32Sub::Opcode = "sub";
138 template <> const char *InstMIPS32Sub_d::Opcode = "sub.d"; 138 template <> const char *InstMIPS32Sub_d::Opcode = "sub.d";
139 template <> const char *InstMIPS32Sub_s::Opcode = "sub.s"; 139 template <> const char *InstMIPS32Sub_s::Opcode = "sub.s";
140 template <> const char *InstMIPS32Subu::Opcode = "subu"; 140 template <> const char *InstMIPS32Subu::Opcode = "subu";
141 template <> const char *InstMIPS32Sw::Opcode = "sw"; 141 template <> const char *InstMIPS32Sw::Opcode = "sw";
142 template <> const char *InstMIPS32Swc1::Opcode = "swc1"; 142 template <> const char *InstMIPS32Swc1::Opcode = "swc1";
143 template <> const char *InstMIPS32Teq::Opcode = "teq";
143 template <> const char *InstMIPS32Trunc_l_d::Opcode = "trunc.l.d"; 144 template <> const char *InstMIPS32Trunc_l_d::Opcode = "trunc.l.d";
144 template <> const char *InstMIPS32Trunc_l_s::Opcode = "trunc.l.s"; 145 template <> const char *InstMIPS32Trunc_l_s::Opcode = "trunc.l.s";
145 template <> const char *InstMIPS32Trunc_w_d::Opcode = "trunc.w.d"; 146 template <> const char *InstMIPS32Trunc_w_d::Opcode = "trunc.w.d";
146 template <> const char *InstMIPS32Trunc_w_s::Opcode = "trunc.w.s"; 147 template <> const char *InstMIPS32Trunc_w_s::Opcode = "trunc.w.s";
147 template <> const char *InstMIPS32Xor::Opcode = "xor"; 148 template <> const char *InstMIPS32Xor::Opcode = "xor";
148 template <> const char *InstMIPS32Xori::Opcode = "xori"; 149 template <> const char *InstMIPS32Xori::Opcode = "xori";
149 150
150 template <> void InstMIPS32Lui::emit(const Cfg *Func) const { 151 template <> void InstMIPS32Lui::emit(const Cfg *Func) const {
151 if (!BuildDefs::dump()) 152 if (!BuildDefs::dump())
152 return; 153 return;
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 template <> void InstMIPS32Lw::emitIAS(const Cfg *Func) const { 873 template <> void InstMIPS32Lw::emitIAS(const Cfg *Func) const {
873 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 874 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
874 auto *Mem = llvm::dyn_cast<OperandMIPS32Mem>(getSrc(0)); 875 auto *Mem = llvm::dyn_cast<OperandMIPS32Mem>(getSrc(0));
875 ConstantInteger32 *Offset = llvm::cast<ConstantInteger32>(Mem->getOffset()); 876 ConstantInteger32 *Offset = llvm::cast<ConstantInteger32>(Mem->getOffset());
876 uint32_t Imm = static_cast<uint32_t>(Offset->getValue()); 877 uint32_t Imm = static_cast<uint32_t>(Offset->getValue());
877 Asm->lw(getDest(), Mem->getBase(), Imm); 878 Asm->lw(getDest(), Mem->getBase(), Imm);
878 } 879 }
879 880
880 } // end of namespace MIPS32 881 } // end of namespace MIPS32
881 } // end of namespace Ice 882 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceInstMIPS32.h ('k') | src/IceTargetLoweringMIPS32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698