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