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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 } | 662 } |
663 | 663 |
664 static InstMIPS32Br *create(Cfg *Func, CfgNode *TargetTrue, | 664 static InstMIPS32Br *create(Cfg *Func, CfgNode *TargetTrue, |
665 CfgNode *TargetFalse, Operand *Src0, | 665 CfgNode *TargetFalse, Operand *Src0, |
666 CondMIPS32::Cond Cond) { | 666 CondMIPS32::Cond Cond) { |
667 constexpr InstMIPS32Label *NoLabel = nullptr; | 667 constexpr InstMIPS32Label *NoLabel = nullptr; |
668 return new (Func->allocate<InstMIPS32Br>()) | 668 return new (Func->allocate<InstMIPS32Br>()) |
669 InstMIPS32Br(Func, TargetTrue, TargetFalse, Src0, NoLabel, Cond); | 669 InstMIPS32Br(Func, TargetTrue, TargetFalse, Src0, NoLabel, Cond); |
670 } | 670 } |
671 | 671 |
| 672 static InstMIPS32Br *create(Cfg *Func, CfgNode *TargetTrue, |
| 673 CfgNode *TargetFalse, Operand *Src0, |
| 674 Operand *Src1, const InstMIPS32Label *Label, |
| 675 CondMIPS32::Cond Cond) { |
| 676 return new (Func->allocate<InstMIPS32Br>()) |
| 677 InstMIPS32Br(Func, TargetTrue, TargetFalse, Src0, Src1, Label, Cond); |
| 678 } |
| 679 |
672 const CfgNode *getTargetTrue() const { return TargetTrue; } | 680 const CfgNode *getTargetTrue() const { return TargetTrue; } |
673 const CfgNode *getTargetFalse() const { return TargetFalse; } | 681 const CfgNode *getTargetFalse() const { return TargetFalse; } |
674 CondMIPS32::Cond getPredicate() const { return Predicate; } | 682 CondMIPS32::Cond getPredicate() const { return Predicate; } |
675 void setPredicate(CondMIPS32::Cond Pred) { Predicate = Pred; } | 683 void setPredicate(CondMIPS32::Cond Pred) { Predicate = Pred; } |
676 bool optimizeBranch(const CfgNode *NextNode); | 684 bool optimizeBranch(const CfgNode *NextNode); |
677 bool isUnconditionalBranch() const override { | 685 bool isUnconditionalBranch() const override { |
678 return Predicate == CondMIPS32::AL; | 686 return Predicate == CondMIPS32::AL; |
679 } | 687 } |
680 bool repointEdges(CfgNode *OldNode, CfgNode *NewNode) override; | 688 bool repointEdges(CfgNode *OldNode, CfgNode *NewNode) override; |
681 void emit(const Cfg *Func) const override; | 689 void emit(const Cfg *Func) const override; |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 template <> void InstMIPS32Mtlo::emit(const Cfg *Func) const; | 912 template <> void InstMIPS32Mtlo::emit(const Cfg *Func) const; |
905 template <> void InstMIPS32Mthi::emit(const Cfg *Func) const; | 913 template <> void InstMIPS32Mthi::emit(const Cfg *Func) const; |
906 template <> void InstMIPS32Mult::emit(const Cfg *Func) const; | 914 template <> void InstMIPS32Mult::emit(const Cfg *Func) const; |
907 template <> void InstMIPS32Multu::emit(const Cfg *Func) const; | 915 template <> void InstMIPS32Multu::emit(const Cfg *Func) const; |
908 template <> void InstMIPS32Lui::emit(const Cfg *Func) const; | 916 template <> void InstMIPS32Lui::emit(const Cfg *Func) const; |
909 | 917 |
910 } // end of namespace MIPS32 | 918 } // end of namespace MIPS32 |
911 } // end of namespace Ice | 919 } // end of namespace Ice |
912 | 920 |
913 #endif // SUBZERO_SRC_ICEINSTMIPS32_H | 921 #endif // SUBZERO_SRC_ICEINSTMIPS32_H |
OLD | NEW |