OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |