OLD | NEW |
1 //===- subzero/src/IceInstX8632.h - Low-level x86 instructions --*- C++ -*-===// | 1 //===- subzero/src/IceInstX8632.h - Low-level x86 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 // This file declares the InstX8632 and OperandX8632 classes and | 10 // This file declares the InstX8632 and OperandX8632 classes and |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 Movd, | 168 Movd, |
169 Movp, | 169 Movp, |
170 Movq, | 170 Movq, |
171 Movss, | 171 Movss, |
172 Movsx, | 172 Movsx, |
173 Movzx, | 173 Movzx, |
174 Mul, | 174 Mul, |
175 Mulps, | 175 Mulps, |
176 Mulss, | 176 Mulss, |
177 Neg, | 177 Neg, |
| 178 Nop, |
178 Or, | 179 Or, |
179 Padd, | 180 Padd, |
180 Pand, | 181 Pand, |
181 Pandn, | 182 Pandn, |
182 Pblendvb, | 183 Pblendvb, |
183 Pcmpeq, | 184 Pcmpeq, |
184 Pcmpgt, | 185 Pcmpgt, |
185 Pextr, | 186 Pextr, |
186 Pinsr, | 187 Pinsr, |
187 Pmull, | 188 Pmull, |
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1053 virtual void dump(const Cfg *Func) const; | 1054 virtual void dump(const Cfg *Func) const; |
1054 static bool classof(const Inst *Inst) { return isClassof(Inst, Movzx); } | 1055 static bool classof(const Inst *Inst) { return isClassof(Inst, Movzx); } |
1055 | 1056 |
1056 private: | 1057 private: |
1057 InstX8632Movzx(Cfg *Func, Variable *Dest, Operand *Source); | 1058 InstX8632Movzx(Cfg *Func, Variable *Dest, Operand *Source); |
1058 InstX8632Movzx(const InstX8632Movzx &) LLVM_DELETED_FUNCTION; | 1059 InstX8632Movzx(const InstX8632Movzx &) LLVM_DELETED_FUNCTION; |
1059 InstX8632Movzx &operator=(const InstX8632Movzx &) LLVM_DELETED_FUNCTION; | 1060 InstX8632Movzx &operator=(const InstX8632Movzx &) LLVM_DELETED_FUNCTION; |
1060 virtual ~InstX8632Movzx() {} | 1061 virtual ~InstX8632Movzx() {} |
1061 }; | 1062 }; |
1062 | 1063 |
| 1064 // Nop instructions of varying length |
| 1065 class InstX8632Nop : public InstX8632 { |
| 1066 public: |
| 1067 // TODO: Replace with enum. |
| 1068 typedef unsigned NopVariant; |
| 1069 |
| 1070 static InstX8632Nop *create(Cfg *Func, NopVariant Variant) { |
| 1071 return new (Func->allocate<InstX8632Nop>()) InstX8632Nop(Func, Variant); |
| 1072 } |
| 1073 virtual void emit(const Cfg *Func) const; |
| 1074 virtual void dump(const Cfg *Func) const; |
| 1075 static bool classof(const Inst *Inst) { return isClassof(Inst, Nop); } |
| 1076 |
| 1077 private: |
| 1078 InstX8632Nop(Cfg *Func, SizeT Length); |
| 1079 InstX8632Nop(const InstX8632Nop &) LLVM_DELETED_FUNCTION; |
| 1080 InstX8632Nop &operator=(const InstX8632Nop &) LLVM_DELETED_FUNCTION; |
| 1081 virtual ~InstX8632Nop() {} |
| 1082 |
| 1083 NopVariant Variant; |
| 1084 }; |
| 1085 |
1063 // Fld - load a value onto the x87 FP stack. | 1086 // Fld - load a value onto the x87 FP stack. |
1064 class InstX8632Fld : public InstX8632 { | 1087 class InstX8632Fld : public InstX8632 { |
1065 public: | 1088 public: |
1066 static InstX8632Fld *create(Cfg *Func, Operand *Src) { | 1089 static InstX8632Fld *create(Cfg *Func, Operand *Src) { |
1067 return new (Func->allocate<InstX8632Fld>()) InstX8632Fld(Func, Src); | 1090 return new (Func->allocate<InstX8632Fld>()) InstX8632Fld(Func, Src); |
1068 } | 1091 } |
1069 virtual void emit(const Cfg *Func) const; | 1092 virtual void emit(const Cfg *Func) const; |
1070 virtual void dump(const Cfg *Func) const; | 1093 virtual void dump(const Cfg *Func) const; |
1071 static bool classof(const Inst *Inst) { return isClassof(Inst, Fld); } | 1094 static bool classof(const Inst *Inst) { return isClassof(Inst, Fld); } |
1072 | 1095 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1219 template <> void InstX8632Pmuludq::emit(const Cfg *Func) const; | 1242 template <> void InstX8632Pmuludq::emit(const Cfg *Func) const; |
1220 template <> void InstX8632Psll::emit(const Cfg *Func) const; | 1243 template <> void InstX8632Psll::emit(const Cfg *Func) const; |
1221 template <> void InstX8632Psra::emit(const Cfg *Func) const; | 1244 template <> void InstX8632Psra::emit(const Cfg *Func) const; |
1222 template <> void InstX8632Psub::emit(const Cfg *Func) const; | 1245 template <> void InstX8632Psub::emit(const Cfg *Func) const; |
1223 template <> void InstX8632Sqrtss::emit(const Cfg *Func) const; | 1246 template <> void InstX8632Sqrtss::emit(const Cfg *Func) const; |
1224 template <> void InstX8632Subss::emit(const Cfg *Func) const; | 1247 template <> void InstX8632Subss::emit(const Cfg *Func) const; |
1225 | 1248 |
1226 } // end of namespace Ice | 1249 } // end of namespace Ice |
1227 | 1250 |
1228 #endif // SUBZERO_SRC_ICEINSTX8632_H | 1251 #endif // SUBZERO_SRC_ICEINSTX8632_H |
OLD | NEW |