| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 // assert(!isNegAddrMode()); | 53 // assert(!isNegAddrMode()); |
| 54 NumVars = 1; | 54 NumVars = 1; |
| 55 Vars = &this->Base; | 55 Vars = &this->Base; |
| 56 } | 56 } |
| 57 | 57 |
| 58 const char *InstMIPS32::getWidthString(Type Ty) { | 58 const char *InstMIPS32::getWidthString(Type Ty) { |
| 59 (void)Ty; | 59 (void)Ty; |
| 60 return "TBD"; | 60 return "TBD"; |
| 61 } | 61 } |
| 62 | 62 |
| 63 template <> const char *InstMIPS32Abs_d::Opcode = "abs.d"; |
| 64 template <> const char *InstMIPS32Abs_s::Opcode = "abs.s"; |
| 63 template <> const char *InstMIPS32Add::Opcode = "add"; | 65 template <> const char *InstMIPS32Add::Opcode = "add"; |
| 64 template <> const char *InstMIPS32Add_d::Opcode = "add.d"; | 66 template <> const char *InstMIPS32Add_d::Opcode = "add.d"; |
| 65 template <> const char *InstMIPS32Add_s::Opcode = "add.s"; | 67 template <> const char *InstMIPS32Add_s::Opcode = "add.s"; |
| 66 template <> const char *InstMIPS32Addiu::Opcode = "addiu"; | 68 template <> const char *InstMIPS32Addiu::Opcode = "addiu"; |
| 67 template <> const char *InstMIPS32Addu::Opcode = "addu"; | 69 template <> const char *InstMIPS32Addu::Opcode = "addu"; |
| 68 template <> const char *InstMIPS32And::Opcode = "and"; | 70 template <> const char *InstMIPS32And::Opcode = "and"; |
| 69 template <> const char *InstMIPS32Andi::Opcode = "andi"; | 71 template <> const char *InstMIPS32Andi::Opcode = "andi"; |
| 70 template <> const char *InstMIPS32Cvt_d_l::Opcode = "cvt.d.l"; | 72 template <> const char *InstMIPS32Cvt_d_l::Opcode = "cvt.d.l"; |
| 71 template <> const char *InstMIPS32Cvt_d_s::Opcode = "cvt.d.s"; | 73 template <> const char *InstMIPS32Cvt_d_s::Opcode = "cvt.d.s"; |
| 72 template <> const char *InstMIPS32Cvt_d_w::Opcode = "cvt.d.w"; | 74 template <> const char *InstMIPS32Cvt_d_w::Opcode = "cvt.d.w"; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 97 template <> const char *InstMIPS32Multu::Opcode = "multu"; | 99 template <> const char *InstMIPS32Multu::Opcode = "multu"; |
| 98 template <> const char *InstMIPS32Or::Opcode = "or"; | 100 template <> const char *InstMIPS32Or::Opcode = "or"; |
| 99 template <> const char *InstMIPS32Ori::Opcode = "ori"; | 101 template <> const char *InstMIPS32Ori::Opcode = "ori"; |
| 100 template <> const char *InstMIPS32Sdc1::Opcode = "sdc1"; | 102 template <> const char *InstMIPS32Sdc1::Opcode = "sdc1"; |
| 101 template <> const char *InstMIPS32Sll::Opcode = "sll"; | 103 template <> const char *InstMIPS32Sll::Opcode = "sll"; |
| 102 template <> const char *InstMIPS32Sllv::Opcode = "sllv"; | 104 template <> const char *InstMIPS32Sllv::Opcode = "sllv"; |
| 103 template <> const char *InstMIPS32Slt::Opcode = "slt"; | 105 template <> const char *InstMIPS32Slt::Opcode = "slt"; |
| 104 template <> const char *InstMIPS32Slti::Opcode = "slti"; | 106 template <> const char *InstMIPS32Slti::Opcode = "slti"; |
| 105 template <> const char *InstMIPS32Sltiu::Opcode = "sltiu"; | 107 template <> const char *InstMIPS32Sltiu::Opcode = "sltiu"; |
| 106 template <> const char *InstMIPS32Sltu::Opcode = "sltu"; | 108 template <> const char *InstMIPS32Sltu::Opcode = "sltu"; |
| 109 template <> const char *InstMIPS32Sqrt_d::Opcode = "sqrt.d"; |
| 110 template <> const char *InstMIPS32Sqrt_s::Opcode = "sqrt.s"; |
| 107 template <> const char *InstMIPS32Sra::Opcode = "sra"; | 111 template <> const char *InstMIPS32Sra::Opcode = "sra"; |
| 108 template <> const char *InstMIPS32Srav::Opcode = "srav"; | 112 template <> const char *InstMIPS32Srav::Opcode = "srav"; |
| 109 template <> const char *InstMIPS32Srl::Opcode = "srl"; | 113 template <> const char *InstMIPS32Srl::Opcode = "srl"; |
| 110 template <> const char *InstMIPS32Srlv::Opcode = "srlv"; | 114 template <> const char *InstMIPS32Srlv::Opcode = "srlv"; |
| 111 template <> const char *InstMIPS32Sub::Opcode = "sub"; | 115 template <> const char *InstMIPS32Sub::Opcode = "sub"; |
| 112 template <> const char *InstMIPS32Sub_d::Opcode = "sub.d"; | 116 template <> const char *InstMIPS32Sub_d::Opcode = "sub.d"; |
| 113 template <> const char *InstMIPS32Sub_s::Opcode = "sub.s"; | 117 template <> const char *InstMIPS32Sub_s::Opcode = "sub.s"; |
| 114 template <> const char *InstMIPS32Subu::Opcode = "subu"; | 118 template <> const char *InstMIPS32Subu::Opcode = "subu"; |
| 115 template <> const char *InstMIPS32Sw::Opcode = "sw"; | 119 template <> const char *InstMIPS32Sw::Opcode = "sw"; |
| 116 template <> const char *InstMIPS32Swc1::Opcode = "swc1"; | 120 template <> const char *InstMIPS32Swc1::Opcode = "swc1"; |
| (...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 template <> void InstMIPS32Lw::emitIAS(const Cfg *Func) const { | 837 template <> void InstMIPS32Lw::emitIAS(const Cfg *Func) const { |
| 834 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); | 838 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
| 835 auto *Mem = llvm::dyn_cast<OperandMIPS32Mem>(getSrc(0)); | 839 auto *Mem = llvm::dyn_cast<OperandMIPS32Mem>(getSrc(0)); |
| 836 ConstantInteger32 *Offset = llvm::cast<ConstantInteger32>(Mem->getOffset()); | 840 ConstantInteger32 *Offset = llvm::cast<ConstantInteger32>(Mem->getOffset()); |
| 837 uint32_t Imm = static_cast<uint32_t>(Offset->getValue()); | 841 uint32_t Imm = static_cast<uint32_t>(Offset->getValue()); |
| 838 Asm->lw(getDest(), Mem->getBase(), Imm); | 842 Asm->lw(getDest(), Mem->getBase(), Imm); |
| 839 } | 843 } |
| 840 | 844 |
| 841 } // end of namespace MIPS32 | 845 } // end of namespace MIPS32 |
| 842 } // end of namespace Ice | 846 } // end of namespace Ice |
| OLD | NEW |