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

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: 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
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 template <> const char *InstMIPS32C_ult_d::Opcode = "c.ult.d"; 82 template <> const char *InstMIPS32C_ult_d::Opcode = "c.ult.d";
83 template <> const char *InstMIPS32C_ult_s::Opcode = "c.ult.s"; 83 template <> const char *InstMIPS32C_ult_s::Opcode = "c.ult.s";
84 template <> const char *InstMIPS32C_un_d::Opcode = "c.un.d"; 84 template <> const char *InstMIPS32C_un_d::Opcode = "c.un.d";
85 template <> const char *InstMIPS32C_un_s::Opcode = "c.un.s"; 85 template <> const char *InstMIPS32C_un_s::Opcode = "c.un.s";
86 template <> const char *InstMIPS32Cvt_d_l::Opcode = "cvt.d.l"; 86 template <> const char *InstMIPS32Cvt_d_l::Opcode = "cvt.d.l";
87 template <> const char *InstMIPS32Cvt_d_s::Opcode = "cvt.d.s"; 87 template <> const char *InstMIPS32Cvt_d_s::Opcode = "cvt.d.s";
88 template <> const char *InstMIPS32Cvt_d_w::Opcode = "cvt.d.w"; 88 template <> const char *InstMIPS32Cvt_d_w::Opcode = "cvt.d.w";
89 template <> const char *InstMIPS32Cvt_s_d::Opcode = "cvt.s.d"; 89 template <> const char *InstMIPS32Cvt_s_d::Opcode = "cvt.s.d";
90 template <> const char *InstMIPS32Cvt_s_l::Opcode = "cvt.s.l"; 90 template <> const char *InstMIPS32Cvt_s_l::Opcode = "cvt.s.l";
91 template <> const char *InstMIPS32Cvt_s_w::Opcode = "cvt.s.w"; 91 template <> const char *InstMIPS32Cvt_s_w::Opcode = "cvt.s.w";
92 template <> const char *InstMIPS32Teq::Opcode = "teq";
obucinac 2016/09/16 10:30:42 Alphabetize
jaydeep.patil 2016/09/16 10:39:07 Done.
92 template <> const char *InstMIPS32Div::Opcode = "div"; 93 template <> const char *InstMIPS32Div::Opcode = "div";
93 template <> const char *InstMIPS32Div_d::Opcode = "div.d"; 94 template <> const char *InstMIPS32Div_d::Opcode = "div.d";
94 template <> const char *InstMIPS32Div_s::Opcode = "div.s"; 95 template <> const char *InstMIPS32Div_s::Opcode = "div.s";
95 template <> const char *InstMIPS32Divu::Opcode = "divu"; 96 template <> const char *InstMIPS32Divu::Opcode = "divu";
96 template <> const char *InstMIPS32La::Opcode = "la"; 97 template <> const char *InstMIPS32La::Opcode = "la";
97 template <> const char *InstMIPS32Ldc1::Opcode = "ldc1"; 98 template <> const char *InstMIPS32Ldc1::Opcode = "ldc1";
98 template <> const char *InstMIPS32Lui::Opcode = "lui"; 99 template <> const char *InstMIPS32Lui::Opcode = "lui";
99 template <> const char *InstMIPS32Lw::Opcode = "lw"; 100 template <> const char *InstMIPS32Lw::Opcode = "lw";
100 template <> const char *InstMIPS32Lwc1::Opcode = "lwc1"; 101 template <> const char *InstMIPS32Lwc1::Opcode = "lwc1";
101 template <> const char *InstMIPS32Mfc1::Opcode = "mfc1"; 102 template <> const char *InstMIPS32Mfc1::Opcode = "mfc1";
(...skipping 770 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

Powered by Google App Engine
This is Rietveld 408576698