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 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
737 template <InstX8632::InstKindX8632 K> | 737 template <InstX8632::InstKindX8632 K> |
738 class InstX8632Movlike : public InstX8632 { | 738 class InstX8632Movlike : public InstX8632 { |
739 public: | 739 public: |
740 static InstX8632Movlike *create(Cfg *Func, Variable *Dest, Operand *Source) { | 740 static InstX8632Movlike *create(Cfg *Func, Variable *Dest, Operand *Source) { |
741 return new (Func->allocate<InstX8632Movlike>()) | 741 return new (Func->allocate<InstX8632Movlike>()) |
742 InstX8632Movlike(Func, Dest, Source); | 742 InstX8632Movlike(Func, Dest, Source); |
743 } | 743 } |
744 virtual bool isRedundantAssign() const { | 744 virtual bool isRedundantAssign() const { |
745 return checkForRedundantAssign(getDest(), getSrc(0)); | 745 return checkForRedundantAssign(getDest(), getSrc(0)); |
746 } | 746 } |
| 747 virtual bool isSimpleAssign() const { return true; } |
747 virtual void emit(const Cfg *Func) const; | 748 virtual void emit(const Cfg *Func) const; |
748 virtual void dump(const Cfg *Func) const { | 749 virtual void dump(const Cfg *Func) const { |
749 Ostream &Str = Func->getContext()->getStrDump(); | 750 Ostream &Str = Func->getContext()->getStrDump(); |
750 Str << Opcode << "." << getDest()->getType() << " "; | 751 Str << Opcode << "." << getDest()->getType() << " "; |
751 dumpDest(Func); | 752 dumpDest(Func); |
752 Str << ", "; | 753 Str << ", "; |
753 dumpSources(Func); | 754 dumpSources(Func); |
754 } | 755 } |
755 static bool classof(const Inst *Inst) { return isClassof(Inst, K); } | 756 static bool classof(const Inst *Inst) { return isClassof(Inst, K); } |
756 | 757 |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1192 virtual void dump(const Cfg *Func) const; | 1193 virtual void dump(const Cfg *Func) const; |
1193 static bool classof(const Inst *Inst) { return isClassof(Inst, Movsx); } | 1194 static bool classof(const Inst *Inst) { return isClassof(Inst, Movsx); } |
1194 | 1195 |
1195 private: | 1196 private: |
1196 InstX8632Movsx(Cfg *Func, Variable *Dest, Operand *Source); | 1197 InstX8632Movsx(Cfg *Func, Variable *Dest, Operand *Source); |
1197 InstX8632Movsx(const InstX8632Movsx &) LLVM_DELETED_FUNCTION; | 1198 InstX8632Movsx(const InstX8632Movsx &) LLVM_DELETED_FUNCTION; |
1198 InstX8632Movsx &operator=(const InstX8632Movsx &) LLVM_DELETED_FUNCTION; | 1199 InstX8632Movsx &operator=(const InstX8632Movsx &) LLVM_DELETED_FUNCTION; |
1199 virtual ~InstX8632Movsx() {} | 1200 virtual ~InstX8632Movsx() {} |
1200 }; | 1201 }; |
1201 | 1202 |
1202 // Movsx - copy from a narrower integer type to a wider integer | 1203 // Movzx - copy from a narrower integer type to a wider integer |
1203 // type, with zero extension. | 1204 // type, with zero extension. |
1204 class InstX8632Movzx : public InstX8632 { | 1205 class InstX8632Movzx : public InstX8632 { |
1205 public: | 1206 public: |
1206 static InstX8632Movzx *create(Cfg *Func, Variable *Dest, Operand *Source) { | 1207 static InstX8632Movzx *create(Cfg *Func, Variable *Dest, Operand *Source) { |
1207 return new (Func->allocate<InstX8632Movzx>()) | 1208 return new (Func->allocate<InstX8632Movzx>()) |
1208 InstX8632Movzx(Func, Dest, Source); | 1209 InstX8632Movzx(Func, Dest, Source); |
1209 } | 1210 } |
1210 virtual void emit(const Cfg *Func) const; | 1211 virtual void emit(const Cfg *Func) const; |
1211 virtual void dump(const Cfg *Func) const; | 1212 virtual void dump(const Cfg *Func) const; |
1212 static bool classof(const Inst *Inst) { return isClassof(Inst, Movzx); } | 1213 static bool classof(const Inst *Inst) { return isClassof(Inst, Movzx); } |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1407 template <> void InstX8632Psub::emit(const Cfg *Func) const; | 1408 template <> void InstX8632Psub::emit(const Cfg *Func) const; |
1408 template <> void InstX8632Sqrtss::emit(const Cfg *Func) const; | 1409 template <> void InstX8632Sqrtss::emit(const Cfg *Func) const; |
1409 template <> void InstX8632Subss::emit(const Cfg *Func) const; | 1410 template <> void InstX8632Subss::emit(const Cfg *Func) const; |
1410 | 1411 |
1411 template <> void InstX8632Cbwdq::emitIAS(const Cfg *Func) const; | 1412 template <> void InstX8632Cbwdq::emitIAS(const Cfg *Func) const; |
1412 template <> void InstX8632Movd::emitIAS(const Cfg *Func) const; | 1413 template <> void InstX8632Movd::emitIAS(const Cfg *Func) const; |
1413 | 1414 |
1414 } // end of namespace Ice | 1415 } // end of namespace Ice |
1415 | 1416 |
1416 #endif // SUBZERO_SRC_ICEINSTX8632_H | 1417 #endif // SUBZERO_SRC_ICEINSTX8632_H |
OLD | NEW |