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 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 Ostream &Str = Func->getContext()->getStrEmit(); | 754 Ostream &Str = Func->getContext()->getStrEmit(); |
755 assert(getSrcSize() == 3); | 755 assert(getSrcSize() == 3); |
756 Str << "\t" << Opcode << "\t"; | 756 Str << "\t" << Opcode << "\t"; |
757 getDest()->emit(Func); | 757 getDest()->emit(Func); |
758 Str << ", "; | 758 Str << ", "; |
759 getSrc(1)->emit(Func); | 759 getSrc(1)->emit(Func); |
760 Str << ", "; | 760 Str << ", "; |
761 getSrc(2)->emit(Func); | 761 getSrc(2)->emit(Func); |
762 Str << "\n"; | 762 Str << "\n"; |
763 } | 763 } |
764 void emitIAS(const Cfg *Func) const override { emit(Func); } | 764 void emitIAS(const Cfg *Func) const override; |
765 void dump(const Cfg *Func) const override { | 765 void dump(const Cfg *Func) const override { |
766 Ostream &Str = Func->getContext()->getStrDump(); | 766 Ostream &Str = Func->getContext()->getStrDump(); |
767 dumpDest(Func); | 767 dumpDest(Func); |
768 Str << " = " << Opcode << "." << getDest()->getType() << " "; | 768 Str << " = " << Opcode << "." << getDest()->getType() << " "; |
769 dumpSources(Func); | 769 dumpSources(Func); |
770 } | 770 } |
771 static bool classof(const Inst *Inst) { return isClassof(Inst, K); } | 771 static bool classof(const Inst *Inst) { return isClassof(Inst, K); } |
772 | 772 |
773 private: | 773 private: |
774 InstX8632Ternop(Cfg *Func, Variable *Dest, Operand *Source1, Operand *Source2) | 774 InstX8632Ternop(Cfg *Func, Variable *Dest, Operand *Source1, Operand *Source2) |
(...skipping 21 matching lines...) Expand all Loading... |
796 Ostream &Str = Func->getContext()->getStrEmit(); | 796 Ostream &Str = Func->getContext()->getStrEmit(); |
797 assert(getSrcSize() == 2); | 797 assert(getSrcSize() == 2); |
798 Str << "\t" << Opcode << "\t"; | 798 Str << "\t" << Opcode << "\t"; |
799 getDest()->emit(Func); | 799 getDest()->emit(Func); |
800 Str << ", "; | 800 Str << ", "; |
801 getSrc(0)->emit(Func); | 801 getSrc(0)->emit(Func); |
802 Str << ", "; | 802 Str << ", "; |
803 getSrc(1)->emit(Func); | 803 getSrc(1)->emit(Func); |
804 Str << "\n"; | 804 Str << "\n"; |
805 } | 805 } |
| 806 void emitIAS(const Cfg *Func) const override; |
806 void dump(const Cfg *Func) const override { | 807 void dump(const Cfg *Func) const override { |
807 Ostream &Str = Func->getContext()->getStrDump(); | 808 Ostream &Str = Func->getContext()->getStrDump(); |
808 dumpDest(Func); | 809 dumpDest(Func); |
809 Str << " = " << Opcode << "." << getDest()->getType() << " "; | 810 Str << " = " << Opcode << "." << getDest()->getType() << " "; |
810 dumpSources(Func); | 811 dumpSources(Func); |
811 } | 812 } |
812 static bool classof(const Inst *Inst) { return isClassof(Inst, K); } | 813 static bool classof(const Inst *Inst) { return isClassof(Inst, K); } |
813 | 814 |
814 private: | 815 private: |
815 InstX8632ThreeAddressop(Cfg *Func, Variable *Dest, Operand *Source0, | 816 InstX8632ThreeAddressop(Cfg *Func, Variable *Dest, Operand *Source0, |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
969 // Shld instruction - shift across a pair of operands. TODO: Verify | 970 // Shld instruction - shift across a pair of operands. TODO: Verify |
970 // that the validator accepts the shld instruction. | 971 // that the validator accepts the shld instruction. |
971 class InstX8632Shld : public InstX8632 { | 972 class InstX8632Shld : public InstX8632 { |
972 public: | 973 public: |
973 static InstX8632Shld *create(Cfg *Func, Variable *Dest, Variable *Source1, | 974 static InstX8632Shld *create(Cfg *Func, Variable *Dest, Variable *Source1, |
974 Variable *Source2) { | 975 Variable *Source2) { |
975 return new (Func->allocate<InstX8632Shld>()) | 976 return new (Func->allocate<InstX8632Shld>()) |
976 InstX8632Shld(Func, Dest, Source1, Source2); | 977 InstX8632Shld(Func, Dest, Source1, Source2); |
977 } | 978 } |
978 void emit(const Cfg *Func) const override; | 979 void emit(const Cfg *Func) const override; |
| 980 void emitIAS(const Cfg *Func) const override; |
979 void dump(const Cfg *Func) const override; | 981 void dump(const Cfg *Func) const override; |
980 static bool classof(const Inst *Inst) { return isClassof(Inst, Shld); } | 982 static bool classof(const Inst *Inst) { return isClassof(Inst, Shld); } |
981 | 983 |
982 private: | 984 private: |
983 InstX8632Shld(Cfg *Func, Variable *Dest, Variable *Source1, | 985 InstX8632Shld(Cfg *Func, Variable *Dest, Variable *Source1, |
984 Variable *Source2); | 986 Variable *Source2); |
985 InstX8632Shld(const InstX8632Shld &) = delete; | 987 InstX8632Shld(const InstX8632Shld &) = delete; |
986 InstX8632Shld &operator=(const InstX8632Shld &) = delete; | 988 InstX8632Shld &operator=(const InstX8632Shld &) = delete; |
987 ~InstX8632Shld() override {} | 989 ~InstX8632Shld() override {} |
988 }; | 990 }; |
989 | 991 |
990 // Shrd instruction - shift across a pair of operands. TODO: Verify | 992 // Shrd instruction - shift across a pair of operands. TODO: Verify |
991 // that the validator accepts the shrd instruction. | 993 // that the validator accepts the shrd instruction. |
992 class InstX8632Shrd : public InstX8632 { | 994 class InstX8632Shrd : public InstX8632 { |
993 public: | 995 public: |
994 static InstX8632Shrd *create(Cfg *Func, Variable *Dest, Variable *Source1, | 996 static InstX8632Shrd *create(Cfg *Func, Variable *Dest, Variable *Source1, |
995 Variable *Source2) { | 997 Variable *Source2) { |
996 return new (Func->allocate<InstX8632Shrd>()) | 998 return new (Func->allocate<InstX8632Shrd>()) |
997 InstX8632Shrd(Func, Dest, Source1, Source2); | 999 InstX8632Shrd(Func, Dest, Source1, Source2); |
998 } | 1000 } |
999 void emit(const Cfg *Func) const override; | 1001 void emit(const Cfg *Func) const override; |
| 1002 void emitIAS(const Cfg *Func) const override; |
1000 void dump(const Cfg *Func) const override; | 1003 void dump(const Cfg *Func) const override; |
1001 static bool classof(const Inst *Inst) { return isClassof(Inst, Shrd); } | 1004 static bool classof(const Inst *Inst) { return isClassof(Inst, Shrd); } |
1002 | 1005 |
1003 private: | 1006 private: |
1004 InstX8632Shrd(Cfg *Func, Variable *Dest, Variable *Source1, | 1007 InstX8632Shrd(Cfg *Func, Variable *Dest, Variable *Source1, |
1005 Variable *Source2); | 1008 Variable *Source2); |
1006 InstX8632Shrd(const InstX8632Shrd &) = delete; | 1009 InstX8632Shrd(const InstX8632Shrd &) = delete; |
1007 InstX8632Shrd &operator=(const InstX8632Shrd &) = delete; | 1010 InstX8632Shrd &operator=(const InstX8632Shrd &) = delete; |
1008 ~InstX8632Shrd() override {} | 1011 ~InstX8632Shrd() override {} |
1009 }; | 1012 }; |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1511 template <> void InstX8632Pinsr::emit(const Cfg *Func) const; | 1514 template <> void InstX8632Pinsr::emit(const Cfg *Func) const; |
1512 template <> void InstX8632Pmull::emit(const Cfg *Func) const; | 1515 template <> void InstX8632Pmull::emit(const Cfg *Func) const; |
1513 template <> void InstX8632Pmuludq::emit(const Cfg *Func) const; | 1516 template <> void InstX8632Pmuludq::emit(const Cfg *Func) const; |
1514 template <> void InstX8632Psll::emit(const Cfg *Func) const; | 1517 template <> void InstX8632Psll::emit(const Cfg *Func) const; |
1515 template <> void InstX8632Psra::emit(const Cfg *Func) const; | 1518 template <> void InstX8632Psra::emit(const Cfg *Func) const; |
1516 template <> void InstX8632Psub::emit(const Cfg *Func) const; | 1519 template <> void InstX8632Psub::emit(const Cfg *Func) const; |
1517 template <> void InstX8632Sqrtss::emit(const Cfg *Func) const; | 1520 template <> void InstX8632Sqrtss::emit(const Cfg *Func) const; |
1518 template <> void InstX8632Subss::emit(const Cfg *Func) const; | 1521 template <> void InstX8632Subss::emit(const Cfg *Func) const; |
1519 | 1522 |
1520 template <> void InstX8632Blendvps::emitIAS(const Cfg *Func) const; | 1523 template <> void InstX8632Blendvps::emitIAS(const Cfg *Func) const; |
| 1524 template <> void InstX8632Cbwdq::emitIAS(const Cfg *Func) const; |
1521 template <> void InstX8632Div::emitIAS(const Cfg *Func) const; | 1525 template <> void InstX8632Div::emitIAS(const Cfg *Func) const; |
1522 template <> void InstX8632Idiv::emitIAS(const Cfg *Func) const; | 1526 template <> void InstX8632Idiv::emitIAS(const Cfg *Func) const; |
1523 template <> void InstX8632Imul::emitIAS(const Cfg *Func) const; | 1527 template <> void InstX8632Imul::emitIAS(const Cfg *Func) const; |
1524 template <> void InstX8632Cbwdq::emitIAS(const Cfg *Func) const; | 1528 template <> void InstX8632Insertps::emitIAS(const Cfg *Func) const; |
1525 template <> void InstX8632Movd::emitIAS(const Cfg *Func) const; | 1529 template <> void InstX8632Movd::emitIAS(const Cfg *Func) const; |
1526 template <> void InstX8632MovssRegs::emitIAS(const Cfg *Func) const; | 1530 template <> void InstX8632MovssRegs::emitIAS(const Cfg *Func) const; |
1527 template <> void InstX8632Pblendvb::emitIAS(const Cfg *Func) const; | 1531 template <> void InstX8632Pblendvb::emitIAS(const Cfg *Func) const; |
| 1532 template <> void InstX8632Pextr::emitIAS(const Cfg *Func) const; |
| 1533 template <> void InstX8632Pinsr::emitIAS(const Cfg *Func) const; |
1528 template <> void InstX8632Pmull::emitIAS(const Cfg *Func) const; | 1534 template <> void InstX8632Pmull::emitIAS(const Cfg *Func) const; |
| 1535 template <> void InstX8632Pshufd::emitIAS(const Cfg *Func) const; |
| 1536 template <> void InstX8632Shufps::emitIAS(const Cfg *Func) const; |
1529 | 1537 |
1530 } // end of namespace Ice | 1538 } // end of namespace Ice |
1531 | 1539 |
1532 #endif // SUBZERO_SRC_ICEINSTX8632_H | 1540 #endif // SUBZERO_SRC_ICEINSTX8632_H |
OLD | NEW |