| 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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 static const char *Opcode; | 549 static const char *Opcode; |
| 550 }; | 550 }; |
| 551 | 551 |
| 552 typedef InstX8632Inplaceop<InstX8632::Bswap> InstX8632Bswap; | 552 typedef InstX8632Inplaceop<InstX8632::Bswap> InstX8632Bswap; |
| 553 typedef InstX8632Inplaceop<InstX8632::Neg> InstX8632Neg; | 553 typedef InstX8632Inplaceop<InstX8632::Neg> InstX8632Neg; |
| 554 typedef InstX8632Unaryop<InstX8632::Bsf> InstX8632Bsf; | 554 typedef InstX8632Unaryop<InstX8632::Bsf> InstX8632Bsf; |
| 555 typedef InstX8632Unaryop<InstX8632::Bsr> InstX8632Bsr; | 555 typedef InstX8632Unaryop<InstX8632::Bsr> InstX8632Bsr; |
| 556 typedef InstX8632Unaryop<InstX8632::Lea> InstX8632Lea; | 556 typedef InstX8632Unaryop<InstX8632::Lea> InstX8632Lea; |
| 557 typedef InstX8632Unaryop<InstX8632::Movd> InstX8632Movd; | 557 typedef InstX8632Unaryop<InstX8632::Movd> InstX8632Movd; |
| 558 typedef InstX8632Unaryop<InstX8632::Sqrtss> InstX8632Sqrtss; | 558 typedef InstX8632Unaryop<InstX8632::Sqrtss> InstX8632Sqrtss; |
| 559 // Cbwdq instruction - wrapper for cbw, cwd, and cdq |
| 560 typedef InstX8632Unaryop<InstX8632::Cbwdq> InstX8632Cbwdq; |
| 559 typedef InstX8632Binop<InstX8632::Add> InstX8632Add; | 561 typedef InstX8632Binop<InstX8632::Add> InstX8632Add; |
| 560 typedef InstX8632Binop<InstX8632::Addps> InstX8632Addps; | 562 typedef InstX8632Binop<InstX8632::Addps> InstX8632Addps; |
| 561 typedef InstX8632Binop<InstX8632::Adc> InstX8632Adc; | 563 typedef InstX8632Binop<InstX8632::Adc> InstX8632Adc; |
| 562 typedef InstX8632Binop<InstX8632::Addss> InstX8632Addss; | 564 typedef InstX8632Binop<InstX8632::Addss> InstX8632Addss; |
| 563 typedef InstX8632Binop<InstX8632::Padd> InstX8632Padd; | 565 typedef InstX8632Binop<InstX8632::Padd> InstX8632Padd; |
| 564 typedef InstX8632Binop<InstX8632::Sub> InstX8632Sub; | 566 typedef InstX8632Binop<InstX8632::Sub> InstX8632Sub; |
| 565 typedef InstX8632Binop<InstX8632::Subps> InstX8632Subps; | 567 typedef InstX8632Binop<InstX8632::Subps> InstX8632Subps; |
| 566 typedef InstX8632Binop<InstX8632::Subss> InstX8632Subss; | 568 typedef InstX8632Binop<InstX8632::Subss> InstX8632Subss; |
| 567 typedef InstX8632Binop<InstX8632::Sbb> InstX8632Sbb; | 569 typedef InstX8632Binop<InstX8632::Sbb> InstX8632Sbb; |
| 568 typedef InstX8632Binop<InstX8632::Psub> InstX8632Psub; | 570 typedef InstX8632Binop<InstX8632::Psub> InstX8632Psub; |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 static bool classof(const Inst *Inst) { return isClassof(Inst, Shrd); } | 684 static bool classof(const Inst *Inst) { return isClassof(Inst, Shrd); } |
| 683 | 685 |
| 684 private: | 686 private: |
| 685 InstX8632Shrd(Cfg *Func, Variable *Dest, Variable *Source1, | 687 InstX8632Shrd(Cfg *Func, Variable *Dest, Variable *Source1, |
| 686 Variable *Source2); | 688 Variable *Source2); |
| 687 InstX8632Shrd(const InstX8632Shrd &) LLVM_DELETED_FUNCTION; | 689 InstX8632Shrd(const InstX8632Shrd &) LLVM_DELETED_FUNCTION; |
| 688 InstX8632Shrd &operator=(const InstX8632Shrd &) LLVM_DELETED_FUNCTION; | 690 InstX8632Shrd &operator=(const InstX8632Shrd &) LLVM_DELETED_FUNCTION; |
| 689 virtual ~InstX8632Shrd() {} | 691 virtual ~InstX8632Shrd() {} |
| 690 }; | 692 }; |
| 691 | 693 |
| 692 // Cbdwq instruction - wrapper for cbw, cwd, or cdq | |
| 693 class InstX8632Cbwdq : public InstX8632 { | |
| 694 public: | |
| 695 static InstX8632Cbwdq *create(Cfg *Func, Variable *Dest, Operand *Source) { | |
| 696 return new (Func->allocate<InstX8632Cbwdq>()) | |
| 697 InstX8632Cbwdq(Func, Dest, Source); | |
| 698 } | |
| 699 virtual void emit(const Cfg *Func) const; | |
| 700 virtual void dump(const Cfg *Func) const; | |
| 701 static bool classof(const Inst *Inst) { return isClassof(Inst, Cbwdq); } | |
| 702 | |
| 703 private: | |
| 704 InstX8632Cbwdq(Cfg *Func, Variable *Dest, Operand *Source); | |
| 705 InstX8632Cbwdq(const InstX8632Cbwdq &) LLVM_DELETED_FUNCTION; | |
| 706 InstX8632Cbwdq &operator=(const InstX8632Cbwdq &) LLVM_DELETED_FUNCTION; | |
| 707 virtual ~InstX8632Cbwdq() {} | |
| 708 }; | |
| 709 | |
| 710 // Conditional move instruction. | 694 // Conditional move instruction. |
| 711 class InstX8632Cmov : public InstX8632 { | 695 class InstX8632Cmov : public InstX8632 { |
| 712 public: | 696 public: |
| 713 static InstX8632Cmov *create(Cfg *Func, Variable *Dest, Operand *Source, | 697 static InstX8632Cmov *create(Cfg *Func, Variable *Dest, Operand *Source, |
| 714 BrCond Cond) { | 698 BrCond Cond) { |
| 715 return new (Func->allocate<InstX8632Cmov>()) | 699 return new (Func->allocate<InstX8632Cmov>()) |
| 716 InstX8632Cmov(Func, Dest, Source, Cond); | 700 InstX8632Cmov(Func, Dest, Source, Cond); |
| 717 } | 701 } |
| 718 virtual void emit(const Cfg *Func) const; | 702 virtual void emit(const Cfg *Func) const; |
| 719 virtual void dump(const Cfg *Func) const; | 703 virtual void dump(const Cfg *Func) const; |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1188 InstX8632Xchg(const InstX8632Xchg &) LLVM_DELETED_FUNCTION; | 1172 InstX8632Xchg(const InstX8632Xchg &) LLVM_DELETED_FUNCTION; |
| 1189 InstX8632Xchg &operator=(const InstX8632Xchg &) LLVM_DELETED_FUNCTION; | 1173 InstX8632Xchg &operator=(const InstX8632Xchg &) LLVM_DELETED_FUNCTION; |
| 1190 virtual ~InstX8632Xchg() {} | 1174 virtual ~InstX8632Xchg() {} |
| 1191 }; | 1175 }; |
| 1192 | 1176 |
| 1193 // Declare partial template specializations of emit() methods that | 1177 // Declare partial template specializations of emit() methods that |
| 1194 // already have default implementations. Without this, there is the | 1178 // already have default implementations. Without this, there is the |
| 1195 // possibility of ODR violations and link errors. | 1179 // possibility of ODR violations and link errors. |
| 1196 template <> void InstX8632Addss::emit(const Cfg *Func) const; | 1180 template <> void InstX8632Addss::emit(const Cfg *Func) const; |
| 1197 template <> void InstX8632Blendvps::emit(const Cfg *Func) const; | 1181 template <> void InstX8632Blendvps::emit(const Cfg *Func) const; |
| 1182 template <> void InstX8632Cbwdq::emit(const Cfg *Func) const; |
| 1198 template <> void InstX8632Div::emit(const Cfg *Func) const; | 1183 template <> void InstX8632Div::emit(const Cfg *Func) const; |
| 1199 template <> void InstX8632Divss::emit(const Cfg *Func) const; | 1184 template <> void InstX8632Divss::emit(const Cfg *Func) const; |
| 1200 template <> void InstX8632Idiv::emit(const Cfg *Func) const; | 1185 template <> void InstX8632Idiv::emit(const Cfg *Func) const; |
| 1201 template <> void InstX8632Imul::emit(const Cfg *Func) const; | 1186 template <> void InstX8632Imul::emit(const Cfg *Func) const; |
| 1202 template <> void InstX8632Lea::emit(const Cfg *Func) const; | 1187 template <> void InstX8632Lea::emit(const Cfg *Func) const; |
| 1203 template <> void InstX8632Mulss::emit(const Cfg *Func) const; | 1188 template <> void InstX8632Mulss::emit(const Cfg *Func) const; |
| 1204 template <> void InstX8632Padd::emit(const Cfg *Func) const; | 1189 template <> void InstX8632Padd::emit(const Cfg *Func) const; |
| 1205 template <> void InstX8632Pblendvb::emit(const Cfg *Func) const; | 1190 template <> void InstX8632Pblendvb::emit(const Cfg *Func) const; |
| 1206 template <> void InstX8632Pcmpeq::emit(const Cfg *Func) const; | 1191 template <> void InstX8632Pcmpeq::emit(const Cfg *Func) const; |
| 1207 template <> void InstX8632Pcmpgt::emit(const Cfg *Func) const; | 1192 template <> void InstX8632Pcmpgt::emit(const Cfg *Func) const; |
| 1208 template <> void InstX8632Pextr::emit(const Cfg *Func) const; | 1193 template <> void InstX8632Pextr::emit(const Cfg *Func) const; |
| 1209 template <> void InstX8632Pinsr::emit(const Cfg *Func) const; | 1194 template <> void InstX8632Pinsr::emit(const Cfg *Func) const; |
| 1210 template <> void InstX8632Pmull::emit(const Cfg *Func) const; | 1195 template <> void InstX8632Pmull::emit(const Cfg *Func) const; |
| 1211 template <> void InstX8632Pmuludq::emit(const Cfg *Func) const; | 1196 template <> void InstX8632Pmuludq::emit(const Cfg *Func) const; |
| 1212 template <> void InstX8632Psll::emit(const Cfg *Func) const; | 1197 template <> void InstX8632Psll::emit(const Cfg *Func) const; |
| 1213 template <> void InstX8632Psra::emit(const Cfg *Func) const; | 1198 template <> void InstX8632Psra::emit(const Cfg *Func) const; |
| 1214 template <> void InstX8632Psub::emit(const Cfg *Func) const; | 1199 template <> void InstX8632Psub::emit(const Cfg *Func) const; |
| 1215 template <> void InstX8632Sqrtss::emit(const Cfg *Func) const; | 1200 template <> void InstX8632Sqrtss::emit(const Cfg *Func) const; |
| 1216 template <> void InstX8632Subss::emit(const Cfg *Func) const; | 1201 template <> void InstX8632Subss::emit(const Cfg *Func) const; |
| 1217 | 1202 |
| 1218 } // end of namespace Ice | 1203 } // end of namespace Ice |
| 1219 | 1204 |
| 1220 #endif // SUBZERO_SRC_ICEINSTX8632_H | 1205 #endif // SUBZERO_SRC_ICEINSTX8632_H |
| OLD | NEW |