| OLD | NEW |
| 1 //===- subzero/src/IceInstMIPS32.h - MIPS32 machine instrs --*- C++ -*-=== // | 1 //===- subzero/src/IceInstMIPS32.h - MIPS32 machine instrs --*- C++ -*-=== // |
| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 Sw, | 192 Sw, |
| 193 Swc1, | 193 Swc1, |
| 194 Trunc_l_d, | 194 Trunc_l_d, |
| 195 Trunc_l_s, | 195 Trunc_l_s, |
| 196 Trunc_w_d, | 196 Trunc_w_d, |
| 197 Trunc_w_s, | 197 Trunc_w_s, |
| 198 Xor, | 198 Xor, |
| 199 Xori | 199 Xori |
| 200 }; | 200 }; |
| 201 | 201 |
| 202 static constexpr size_t InstSize = sizeof(uint32_t); |
| 203 |
| 202 static const char *getWidthString(Type Ty); | 204 static const char *getWidthString(Type Ty); |
| 203 | 205 |
| 204 void dump(const Cfg *Func) const override; | 206 void dump(const Cfg *Func) const override; |
| 205 | 207 |
| 206 void dumpOpcode(Ostream &Str, const char *Opcode, Type Ty) const { | 208 void dumpOpcode(Ostream &Str, const char *Opcode, Type Ty) const { |
| 207 Str << Opcode << "." << Ty; | 209 Str << Opcode << "." << Ty; |
| 208 } | 210 } |
| 209 | 211 |
| 210 // TODO(rkotler): while branching is not implemented | 212 // TODO(rkotler): while branching is not implemented |
| 211 bool repointEdges(CfgNode *, CfgNode *) override { return true; } | 213 bool repointEdges(CfgNode *, CfgNode *) override { return true; } |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 } | 670 } |
| 669 | 671 |
| 670 const CfgNode *getTargetTrue() const { return TargetTrue; } | 672 const CfgNode *getTargetTrue() const { return TargetTrue; } |
| 671 const CfgNode *getTargetFalse() const { return TargetFalse; } | 673 const CfgNode *getTargetFalse() const { return TargetFalse; } |
| 672 | 674 |
| 673 bool isUnconditionalBranch() const override { | 675 bool isUnconditionalBranch() const override { |
| 674 return Predicate == CondMIPS32::AL; | 676 return Predicate == CondMIPS32::AL; |
| 675 } | 677 } |
| 676 bool repointEdges(CfgNode *OldNode, CfgNode *NewNode) override; | 678 bool repointEdges(CfgNode *OldNode, CfgNode *NewNode) override; |
| 677 void emit(const Cfg *Func) const override; | 679 void emit(const Cfg *Func) const override; |
| 678 void emitIAS(const Cfg *Func) const override { (void)Func; }; | 680 void emitIAS(const Cfg *Func) const override; |
| 679 void dump(const Cfg *Func) const override; | 681 void dump(const Cfg *Func) const override; |
| 680 static bool classof(const Inst *Instr) { return isClassof(Instr, Br); } | 682 static bool classof(const Inst *Instr) { return isClassof(Instr, Br); } |
| 681 | 683 |
| 682 private: | 684 private: |
| 683 InstMIPS32Br(Cfg *Func, const CfgNode *TargetTrue, const CfgNode *TargetFalse, | 685 InstMIPS32Br(Cfg *Func, const CfgNode *TargetTrue, const CfgNode *TargetFalse, |
| 684 const InstMIPS32Label *Label, const CondMIPS32::Cond Cond); | 686 const InstMIPS32Label *Label, const CondMIPS32::Cond Cond); |
| 685 | 687 |
| 686 InstMIPS32Br(Cfg *Func, const CfgNode *TargetTrue, const CfgNode *TargetFalse, | 688 InstMIPS32Br(Cfg *Func, const CfgNode *TargetTrue, const CfgNode *TargetFalse, |
| 687 Operand *Src0, const InstMIPS32Label *Label, | 689 Operand *Src0, const InstMIPS32Label *Label, |
| 688 const CondMIPS32::Cond Cond); | 690 const CondMIPS32::Cond Cond); |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 900 template <> void InstMIPS32Mtlo::emit(const Cfg *Func) const; | 902 template <> void InstMIPS32Mtlo::emit(const Cfg *Func) const; |
| 901 template <> void InstMIPS32Mthi::emit(const Cfg *Func) const; | 903 template <> void InstMIPS32Mthi::emit(const Cfg *Func) const; |
| 902 template <> void InstMIPS32Mult::emit(const Cfg *Func) const; | 904 template <> void InstMIPS32Mult::emit(const Cfg *Func) const; |
| 903 template <> void InstMIPS32Multu::emit(const Cfg *Func) const; | 905 template <> void InstMIPS32Multu::emit(const Cfg *Func) const; |
| 904 template <> void InstMIPS32Lui::emit(const Cfg *Func) const; | 906 template <> void InstMIPS32Lui::emit(const Cfg *Func) const; |
| 905 | 907 |
| 906 } // end of namespace MIPS32 | 908 } // end of namespace MIPS32 |
| 907 } // end of namespace Ice | 909 } // end of namespace Ice |
| 908 | 910 |
| 909 #endif // SUBZERO_SRC_ICEINSTMIPS32_H | 911 #endif // SUBZERO_SRC_ICEINSTMIPS32_H |
| OLD | NEW |