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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 Sdiv, | 315 Sdiv, |
316 Str, | 316 Str, |
317 Sub, | 317 Sub, |
318 Sxt, | 318 Sxt, |
319 Trap, | 319 Trap, |
320 Tst, | 320 Tst, |
321 Udiv, | 321 Udiv, |
322 Umull, | 322 Umull, |
323 Uxt, | 323 Uxt, |
324 Vadd, | 324 Vadd, |
| 325 Vcvt, |
325 Vdiv, | 326 Vdiv, |
326 Vldr, | 327 Vldr, |
327 Vmov, | 328 Vmov, |
328 Vmul, | 329 Vmul, |
329 Vsqrt, | 330 Vsqrt, |
330 Vsub | 331 Vsub |
331 }; | 332 }; |
332 | 333 |
333 static const char *getWidthString(Type Ty); | 334 static const char *getWidthString(Type Ty); |
334 static const char *getVecWidthString(Type Ty); | 335 static const char *getVecWidthString(Type Ty); |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1086 void dump(const Cfg *Func) const override; | 1087 void dump(const Cfg *Func) const override; |
1087 static bool classof(const Inst *Inst) { return isClassof(Inst, Umull); } | 1088 static bool classof(const Inst *Inst) { return isClassof(Inst, Umull); } |
1088 | 1089 |
1089 private: | 1090 private: |
1090 InstARM32Umull(Cfg *Func, Variable *DestLo, Variable *DestHi, Variable *Src0, | 1091 InstARM32Umull(Cfg *Func, Variable *DestLo, Variable *DestHi, Variable *Src0, |
1091 Variable *Src1, CondARM32::Cond Predicate); | 1092 Variable *Src1, CondARM32::Cond Predicate); |
1092 | 1093 |
1093 Variable *DestHi; | 1094 Variable *DestHi; |
1094 }; | 1095 }; |
1095 | 1096 |
| 1097 /// Handles fp2int, int2fp, and fp2fp conversions. |
| 1098 class InstARM32Vcvt final : public InstARM32Pred { |
| 1099 InstARM32Vcvt() = delete; |
| 1100 InstARM32Vcvt(const InstARM32Vcvt &) = delete; |
| 1101 InstARM32Vcvt &operator=(const InstARM32Vcvt &) = delete; |
| 1102 |
| 1103 public: |
| 1104 enum VcvtVariant { S2si, S2ui, Si2s, Ui2s, D2si, D2ui, Si2d, Ui2d, S2d, D2s }; |
| 1105 static InstARM32Vcvt *create(Cfg *Func, Variable *Dest, Variable *Src, |
| 1106 VcvtVariant Variant, CondARM32::Cond Predicate) { |
| 1107 return new (Func->allocate<InstARM32Vcvt>()) |
| 1108 InstARM32Vcvt(Func, Dest, Src, Variant, Predicate); |
| 1109 } |
| 1110 void emit(const Cfg *Func) const override; |
| 1111 void emitIAS(const Cfg *Func) const override; |
| 1112 void dump(const Cfg *Func) const override; |
| 1113 static bool classof(const Inst *Inst) { return isClassof(Inst, Vcvt); } |
| 1114 |
| 1115 private: |
| 1116 InstARM32Vcvt(Cfg *Func, Variable *Dest, Variable *Src, VcvtVariant Variant, |
| 1117 CondARM32::Cond Predicate); |
| 1118 |
| 1119 const VcvtVariant Variant; |
| 1120 }; |
| 1121 |
1096 // Declare partial template specializations of emit() methods that | 1122 // Declare partial template specializations of emit() methods that |
1097 // already have default implementations. Without this, there is the | 1123 // already have default implementations. Without this, there is the |
1098 // possibility of ODR violations and link errors. | 1124 // possibility of ODR violations and link errors. |
1099 | 1125 |
1100 template <> void InstARM32Ldr::emit(const Cfg *Func) const; | 1126 template <> void InstARM32Ldr::emit(const Cfg *Func) const; |
1101 template <> void InstARM32Mov::emit(const Cfg *Func) const; | 1127 template <> void InstARM32Mov::emit(const Cfg *Func) const; |
1102 template <> void InstARM32Movw::emit(const Cfg *Func) const; | 1128 template <> void InstARM32Movw::emit(const Cfg *Func) const; |
1103 template <> void InstARM32Movt::emit(const Cfg *Func) const; | 1129 template <> void InstARM32Movt::emit(const Cfg *Func) const; |
1104 template <> void InstARM32Vldr::emit(const Cfg *Func) const; | 1130 template <> void InstARM32Vldr::emit(const Cfg *Func) const; |
1105 template <> void InstARM32Vmov::emit(const Cfg *Func) const; | 1131 template <> void InstARM32Vmov::emit(const Cfg *Func) const; |
1106 | 1132 |
1107 } // end of namespace Ice | 1133 } // end of namespace Ice |
1108 | 1134 |
1109 #endif // SUBZERO_SRC_ICEINSTARM32_H | 1135 #endif // SUBZERO_SRC_ICEINSTARM32_H |
OLD | NEW |