| OLD | NEW |
| 1 //===- subzero/src/IceInstARM32.h - ARM32 machine instructions --*- C++ -*-===// | 1 //===- subzero/src/IceInstARM32.h - ARM32 machine instructions --*- 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 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 973 | 973 |
| 974 private: | 974 private: |
| 975 InstARM32Br(Cfg *Func, const CfgNode *TargetTrue, const CfgNode *TargetFalse, | 975 InstARM32Br(Cfg *Func, const CfgNode *TargetTrue, const CfgNode *TargetFalse, |
| 976 const InstARM32Label *Label, CondARM32::Cond Predicate); | 976 const InstARM32Label *Label, CondARM32::Cond Predicate); |
| 977 | 977 |
| 978 const CfgNode *TargetTrue; | 978 const CfgNode *TargetTrue; |
| 979 const CfgNode *TargetFalse; | 979 const CfgNode *TargetFalse; |
| 980 const InstARM32Label *Label; // Intra-block branch target | 980 const InstARM32Label *Label; // Intra-block branch target |
| 981 }; | 981 }; |
| 982 | 982 |
| 983 /// AdjustStack instruction - subtracts SP by the given amount and updates the | |
| 984 /// stack offset during code emission. | |
| 985 class InstARM32AdjustStack : public InstARM32 { | |
| 986 InstARM32AdjustStack() = delete; | |
| 987 InstARM32AdjustStack(const InstARM32AdjustStack &) = delete; | |
| 988 InstARM32AdjustStack &operator=(const InstARM32AdjustStack &) = delete; | |
| 989 | |
| 990 public: | |
| 991 /// Note: We need both Amount and SrcAmount. If Amount is too large then it | |
| 992 /// needs to be copied to a register (so SrcAmount could be a register). | |
| 993 /// However, we also need the numeric Amount for bookkeeping, and it's hard to | |
| 994 /// pull that from the generic SrcAmount operand. | |
| 995 static InstARM32AdjustStack *create(Cfg *Func, Variable *SP, SizeT Amount, | |
| 996 Operand *SrcAmount) { | |
| 997 return new (Func->allocate<InstARM32AdjustStack>()) | |
| 998 InstARM32AdjustStack(Func, SP, Amount, SrcAmount); | |
| 999 } | |
| 1000 void emit(const Cfg *Func) const override; | |
| 1001 void dump(const Cfg *Func) const override; | |
| 1002 static bool classof(const Inst *Inst) { return isClassof(Inst, Adjuststack); } | |
| 1003 SizeT getAmount() const { return Amount; } | |
| 1004 | |
| 1005 private: | |
| 1006 InstARM32AdjustStack(Cfg *Func, Variable *SP, SizeT Amount, | |
| 1007 Operand *SrcAmount); | |
| 1008 const SizeT Amount; | |
| 1009 }; | |
| 1010 | |
| 1011 /// Call instruction (bl/blx). Arguments should have already been pushed. | 983 /// Call instruction (bl/blx). Arguments should have already been pushed. |
| 1012 /// Technically bl and the register form of blx can be predicated, but we'll | 984 /// Technically bl and the register form of blx can be predicated, but we'll |
| 1013 /// leave that out until needed. | 985 /// leave that out until needed. |
| 1014 class InstARM32Call : public InstARM32 { | 986 class InstARM32Call : public InstARM32 { |
| 1015 InstARM32Call() = delete; | 987 InstARM32Call() = delete; |
| 1016 InstARM32Call(const InstARM32Call &) = delete; | 988 InstARM32Call(const InstARM32Call &) = delete; |
| 1017 InstARM32Call &operator=(const InstARM32Call &) = delete; | 989 InstARM32Call &operator=(const InstARM32Call &) = delete; |
| 1018 | 990 |
| 1019 public: | 991 public: |
| 1020 static InstARM32Call *create(Cfg *Func, Variable *Dest, Operand *CallTarget) { | 992 static InstARM32Call *create(Cfg *Func, Variable *Dest, Operand *CallTarget) { |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1347 // default implementations. Without this, there is the possibility of ODR | 1319 // default implementations. Without this, there is the possibility of ODR |
| 1348 // violations and link errors. | 1320 // violations and link errors. |
| 1349 | 1321 |
| 1350 template <> void InstARM32Ldr::emit(const Cfg *Func) const; | 1322 template <> void InstARM32Ldr::emit(const Cfg *Func) const; |
| 1351 template <> void InstARM32Movw::emit(const Cfg *Func) const; | 1323 template <> void InstARM32Movw::emit(const Cfg *Func) const; |
| 1352 template <> void InstARM32Movt::emit(const Cfg *Func) const; | 1324 template <> void InstARM32Movt::emit(const Cfg *Func) const; |
| 1353 | 1325 |
| 1354 } // end of namespace Ice | 1326 } // end of namespace Ice |
| 1355 | 1327 |
| 1356 #endif // SUBZERO_SRC_ICEINSTARM32_H | 1328 #endif // SUBZERO_SRC_ICEINSTARM32_H |
| OLD | NEW |