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

Side by Side Diff: src/IceInstMIPS32.cpp

Issue 2350903002: Subzero, MIPS32: lowerUnreachable (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rebasing, addressing 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.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 972 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 } 983 }
984 984
985 template <> void InstMIPS32Sw::emitIAS(const Cfg *Func) const { 985 template <> void InstMIPS32Sw::emitIAS(const Cfg *Func) const {
986 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 986 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
987 auto *Mem = llvm::dyn_cast<OperandMIPS32Mem>(getSrc(1)); 987 auto *Mem = llvm::dyn_cast<OperandMIPS32Mem>(getSrc(1));
988 ConstantInteger32 *Offset = llvm::cast<ConstantInteger32>(Mem->getOffset()); 988 ConstantInteger32 *Offset = llvm::cast<ConstantInteger32>(Mem->getOffset());
989 uint32_t Imm = static_cast<uint32_t>(Offset->getValue()); 989 uint32_t Imm = static_cast<uint32_t>(Offset->getValue());
990 Asm->sw(getSrc(0), Mem->getBase(), Imm); 990 Asm->sw(getSrc(0), Mem->getBase(), Imm);
991 } 991 }
992 992
993 template <> void InstMIPS32Teq::emitIAS(const Cfg *Func) const {
994 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
995 Asm->teq(getSrc(0), getSrc(1), getTrapCode());
996 }
997
993 template <> void InstMIPS32Trunc_l_d::emitIAS(const Cfg *Func) const { 998 template <> void InstMIPS32Trunc_l_d::emitIAS(const Cfg *Func) const {
994 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 999 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
995 Asm->trunc_l_d(getDest(), getSrc(0)); 1000 Asm->trunc_l_d(getDest(), getSrc(0));
996 } 1001 }
997 1002
998 template <> void InstMIPS32Trunc_l_s::emitIAS(const Cfg *Func) const { 1003 template <> void InstMIPS32Trunc_l_s::emitIAS(const Cfg *Func) const {
999 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 1004 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
1000 Asm->trunc_l_s(getDest(), getSrc(0)); 1005 Asm->trunc_l_s(getDest(), getSrc(0));
1001 } 1006 }
1002 1007
(...skipping 12 matching lines...) Expand all
1015 Asm->xor_(getDest(), getSrc(0), getSrc(1)); 1020 Asm->xor_(getDest(), getSrc(0), getSrc(1));
1016 } 1021 }
1017 1022
1018 template <> void InstMIPS32Xori::emitIAS(const Cfg *Func) const { 1023 template <> void InstMIPS32Xori::emitIAS(const Cfg *Func) const {
1019 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 1024 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
1020 Asm->xori(getDest(), getSrc(0), Imm); 1025 Asm->xori(getDest(), getSrc(0), Imm);
1021 } 1026 }
1022 1027
1023 } // end of namespace MIPS32 1028 } // end of namespace MIPS32
1024 } // end of namespace Ice 1029 } // 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