| 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 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1084 void dump(const Cfg *Func) const override; | 1084 void dump(const Cfg *Func) const override; |
| 1085 | 1085 |
| 1086 protected: | 1086 protected: |
| 1087 InstARM32RegisterStackOp(Cfg *Func, InstKindARM32 Kind, SizeT Maxsrcs, | 1087 InstARM32RegisterStackOp(Cfg *Func, InstKindARM32 Kind, SizeT Maxsrcs, |
| 1088 Variable *Dest) | 1088 Variable *Dest) |
| 1089 : InstARM32(Func, Kind, Maxsrcs, Dest) {} | 1089 : InstARM32(Func, Kind, Maxsrcs, Dest) {} |
| 1090 void emitUsingForm(const Cfg *Func, const EmitForm Form) const; | 1090 void emitUsingForm(const Cfg *Func, const EmitForm Form) const; |
| 1091 void emitGPRsAsText(const Cfg *Func) const; | 1091 void emitGPRsAsText(const Cfg *Func) const; |
| 1092 void emitSRegsAsText(const Cfg *Func, const Variable *BaseReg, | 1092 void emitSRegsAsText(const Cfg *Func, const Variable *BaseReg, |
| 1093 SizeT Regcount) const; | 1093 SizeT Regcount) const; |
| 1094 void emitSRegsOp(const Cfg *Func, const EmitForm, const Variable *BaseReg, |
| 1095 SizeT RegCount, SizeT InstIndex) const; |
| 1094 virtual const char *getDumpOpcode() const { return getGPROpcode(); } | 1096 virtual const char *getDumpOpcode() const { return getGPROpcode(); } |
| 1095 virtual const char *getGPROpcode() const = 0; | 1097 virtual const char *getGPROpcode() const = 0; |
| 1096 virtual const char *getSRegOpcode() const = 0; | 1098 virtual const char *getSRegOpcode() const = 0; |
| 1097 virtual Variable *getStackReg(SizeT Index) const = 0; | 1099 virtual Variable *getStackReg(SizeT Index) const = 0; |
| 1098 virtual SizeT getNumStackRegs() const = 0; | 1100 virtual SizeT getNumStackRegs() const = 0; |
| 1099 virtual void emitSingleGPR(const Cfg *Func, const EmitForm Form, | 1101 virtual void emitSingleGPR(const Cfg *Func, const EmitForm Form, |
| 1100 const Variable *Reg) const = 0; | 1102 const Variable *Reg) const = 0; |
| 1101 virtual void emitMultipleGPRs(const Cfg *Func, const EmitForm Form, | 1103 virtual void emitMultipleGPRs(const Cfg *Func, const EmitForm Form, |
| 1102 IValueT Registers) const = 0; | 1104 IValueT Registers) const = 0; |
| 1103 virtual void emitSRegs(const Cfg *Func, const EmitForm Form, | 1105 virtual void emitSRegs(const Cfg *Func, const EmitForm Form, |
| 1104 const Variable *BaseReg, SizeT RegCount) const = 0; | 1106 const Variable *BaseReg, SizeT RegCount) const = 0; |
| 1105 }; | 1107 }; |
| 1106 | 1108 |
| 1107 /// Pops a list of registers. It may be a list of GPRs, or a list of VFP "s" | 1109 /// Pops a list of registers. It may be a list of GPRs, or a list of VFP "s" |
| 1108 /// regs, but not both. In any case, the list must be sorted. | 1110 /// regs, but not both. In any case, the list must be sorted. |
| 1109 class InstARM32Pop : public InstARM32RegisterStackOp { | 1111 class InstARM32Pop final : public InstARM32RegisterStackOp { |
| 1110 InstARM32Pop() = delete; | 1112 InstARM32Pop() = delete; |
| 1111 InstARM32Pop(const InstARM32Pop &) = delete; | 1113 InstARM32Pop(const InstARM32Pop &) = delete; |
| 1112 InstARM32Pop &operator=(const InstARM32Pop &) = delete; | 1114 InstARM32Pop &operator=(const InstARM32Pop &) = delete; |
| 1113 | 1115 |
| 1114 public: | 1116 public: |
| 1115 static InstARM32Pop *create(Cfg *Func, const VarList &Dests) { | 1117 static InstARM32Pop *create(Cfg *Func, const VarList &Dests) { |
| 1116 return new (Func->allocate<InstARM32Pop>()) InstARM32Pop(Func, Dests); | 1118 return new (Func->allocate<InstARM32Pop>()) InstARM32Pop(Func, Dests); |
| 1117 } | 1119 } |
| 1118 static bool classof(const Inst *Inst) { return isClassof(Inst, Pop); } | 1120 static bool classof(const Inst *Inst) { return isClassof(Inst, Pop); } |
| 1119 | 1121 |
| 1120 private: | 1122 private: |
| 1121 InstARM32Pop(Cfg *Func, const VarList &Dests); | 1123 InstARM32Pop(Cfg *Func, const VarList &Dests); |
| 1122 virtual const char *getGPROpcode() const final; | 1124 virtual const char *getGPROpcode() const final; |
| 1123 virtual const char *getSRegOpcode() const final; | 1125 virtual const char *getSRegOpcode() const final; |
| 1124 Variable *getStackReg(SizeT Index) const final; | 1126 Variable *getStackReg(SizeT Index) const final; |
| 1125 SizeT getNumStackRegs() const final; | 1127 SizeT getNumStackRegs() const final; |
| 1126 void emitSingleGPR(const Cfg *Func, const EmitForm Form, | 1128 void emitSingleGPR(const Cfg *Func, const EmitForm Form, |
| 1127 const Variable *Reg) const final; | 1129 const Variable *Reg) const final; |
| 1128 void emitMultipleGPRs(const Cfg *Func, const EmitForm Form, | 1130 void emitMultipleGPRs(const Cfg *Func, const EmitForm Form, |
| 1129 IValueT Registers) const final; | 1131 IValueT Registers) const final; |
| 1130 void emitSRegs(const Cfg *Func, const EmitForm Form, const Variable *BaseReg, | 1132 void emitSRegs(const Cfg *Func, const EmitForm Form, const Variable *BaseReg, |
| 1131 SizeT RegCount) const final; | 1133 SizeT RegCount) const final; |
| 1132 | |
| 1133 VarList Dests; | 1134 VarList Dests; |
| 1134 }; | 1135 }; |
| 1135 | 1136 |
| 1136 /// Pushes a list of registers. Just like Pop (see above), the list may be of | 1137 /// Pushes a list of registers. Just like Pop (see above), the list may be of |
| 1137 /// GPRs, or VFP "s" registers, but not both. | 1138 /// GPRs, or VFP "s" registers, but not both. |
| 1138 class InstARM32Push : public InstARM32RegisterStackOp { | 1139 class InstARM32Push final : public InstARM32RegisterStackOp { |
| 1139 InstARM32Push() = delete; | 1140 InstARM32Push() = delete; |
| 1140 InstARM32Push(const InstARM32Push &) = delete; | 1141 InstARM32Push(const InstARM32Push &) = delete; |
| 1141 InstARM32Push &operator=(const InstARM32Push &) = delete; | 1142 InstARM32Push &operator=(const InstARM32Push &) = delete; |
| 1142 | 1143 |
| 1143 public: | 1144 public: |
| 1144 static InstARM32Push *create(Cfg *Func, const VarList &Srcs) { | 1145 static InstARM32Push *create(Cfg *Func, const VarList &Srcs) { |
| 1145 return new (Func->allocate<InstARM32Push>()) InstARM32Push(Func, Srcs); | 1146 return new (Func->allocate<InstARM32Push>()) InstARM32Push(Func, Srcs); |
| 1146 } | 1147 } |
| 1147 static bool classof(const Inst *Inst) { return isClassof(Inst, Push); } | 1148 static bool classof(const Inst *Inst) { return isClassof(Inst, Push); } |
| 1148 | 1149 |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1439 // violations and link errors. | 1440 // violations and link errors. |
| 1440 | 1441 |
| 1441 template <> void InstARM32Ldr::emit(const Cfg *Func) const; | 1442 template <> void InstARM32Ldr::emit(const Cfg *Func) const; |
| 1442 template <> void InstARM32Movw::emit(const Cfg *Func) const; | 1443 template <> void InstARM32Movw::emit(const Cfg *Func) const; |
| 1443 template <> void InstARM32Movt::emit(const Cfg *Func) const; | 1444 template <> void InstARM32Movt::emit(const Cfg *Func) const; |
| 1444 | 1445 |
| 1445 } // end of namespace ARM32 | 1446 } // end of namespace ARM32 |
| 1446 } // end of namespace Ice | 1447 } // end of namespace Ice |
| 1447 | 1448 |
| 1448 #endif // SUBZERO_SRC_ICEINSTARM32_H | 1449 #endif // SUBZERO_SRC_ICEINSTARM32_H |
| OLD | NEW |