| OLD | NEW |
| 1 //===- subzero/src/IceInstX86Base.h - Generic x86 instructions -*- C++ -*--===// | 1 //===- subzero/src/IceInstX86Base.h - Generic 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 /// \file | 10 /// \file |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 IacaStart, | 140 IacaStart, |
| 141 IacaEnd | 141 IacaEnd |
| 142 }; | 142 }; |
| 143 | 143 |
| 144 static const char *getWidthString(Type Ty); | 144 static const char *getWidthString(Type Ty); |
| 145 static const char *getFldString(Type Ty); | 145 static const char *getFldString(Type Ty); |
| 146 static typename Traits::Cond::BrCond | 146 static typename Traits::Cond::BrCond |
| 147 getOppositeCondition(typename Traits::Cond::BrCond Cond); | 147 getOppositeCondition(typename Traits::Cond::BrCond Cond); |
| 148 void dump(const Cfg *Func) const override; | 148 void dump(const Cfg *Func) const override; |
| 149 | 149 |
| 150 // Shared emit routines for common forms of instructions. See the definition | 150 // Shared emit routines for common forms of instructions. |
| 151 // of emitTwoAddress() for a description of ShiftHack. | |
| 152 static void emitTwoAddress(const char *Opcode, const Inst *Inst, | 151 static void emitTwoAddress(const char *Opcode, const Inst *Inst, |
| 153 const Cfg *Func, bool ShiftHack = false); | 152 const Cfg *Func); |
| 154 | 153 |
| 155 static void | 154 static void |
| 156 emitIASGPRShift(const Cfg *Func, Type Ty, const Variable *Var, | 155 emitIASGPRShift(const Cfg *Func, Type Ty, const Variable *Var, |
| 157 const Operand *Src, | 156 const Operand *Src, |
| 158 const typename Traits::Assembler::GPREmitterShiftOp &Emitter); | 157 const typename Traits::Assembler::GPREmitterShiftOp &Emitter); |
| 159 | 158 |
| 160 protected: | 159 protected: |
| 161 InstX86Base<Machine>(Cfg *Func, InstKindX86 Kind, SizeT Maxsrcs, | 160 InstX86Base<Machine>(Cfg *Func, InstKindX86 Kind, SizeT Maxsrcs, |
| 162 Variable *Dest) | 161 Variable *Dest) |
| 163 : InstTarget(Func, static_cast<InstKind>(Kind), Maxsrcs, Dest) {} | 162 : InstTarget(Func, static_cast<InstKind>(Kind), Maxsrcs, Dest) {} |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 | 295 |
| 297 public: | 296 public: |
| 298 enum Mode { Near, Far }; | 297 enum Mode { Near, Far }; |
| 299 | 298 |
| 300 /// Create a conditional branch to a node. | 299 /// Create a conditional branch to a node. |
| 301 static InstX86Br * | 300 static InstX86Br * |
| 302 create(Cfg *Func, CfgNode *TargetTrue, CfgNode *TargetFalse, | 301 create(Cfg *Func, CfgNode *TargetTrue, CfgNode *TargetFalse, |
| 303 typename InstX86Base<Machine>::Traits::Cond::BrCond Condition, | 302 typename InstX86Base<Machine>::Traits::Cond::BrCond Condition, |
| 304 Mode Kind) { | 303 Mode Kind) { |
| 305 assert(Condition != InstX86Base<Machine>::Traits::Cond::Br_None); | 304 assert(Condition != InstX86Base<Machine>::Traits::Cond::Br_None); |
| 306 const InstX86Label<Machine> *NoLabel = nullptr; | 305 constexpr InstX86Label<Machine> *NoLabel = nullptr; |
| 307 return new (Func->allocate<InstX86Br>()) | 306 return new (Func->allocate<InstX86Br>()) |
| 308 InstX86Br(Func, TargetTrue, TargetFalse, NoLabel, Condition, Kind); | 307 InstX86Br(Func, TargetTrue, TargetFalse, NoLabel, Condition, Kind); |
| 309 } | 308 } |
| 310 /// Create an unconditional branch to a node. | 309 /// Create an unconditional branch to a node. |
| 311 static InstX86Br *create(Cfg *Func, CfgNode *Target, Mode Kind) { | 310 static InstX86Br *create(Cfg *Func, CfgNode *Target, Mode Kind) { |
| 312 const CfgNode *NoCondTarget = nullptr; | 311 constexpr CfgNode *NoCondTarget = nullptr; |
| 313 const InstX86Label<Machine> *NoLabel = nullptr; | 312 constexpr InstX86Label<Machine> *NoLabel = nullptr; |
| 314 return new (Func->allocate<InstX86Br>()) | 313 return new (Func->allocate<InstX86Br>()) |
| 315 InstX86Br(Func, NoCondTarget, Target, NoLabel, | 314 InstX86Br(Func, NoCondTarget, Target, NoLabel, |
| 316 InstX86Base<Machine>::Traits::Cond::Br_None, Kind); | 315 InstX86Base<Machine>::Traits::Cond::Br_None, Kind); |
| 317 } | 316 } |
| 318 /// Create a non-terminator conditional branch to a node, with a fallthrough | 317 /// Create a non-terminator conditional branch to a node, with a fallthrough |
| 319 /// to the next instruction in the current node. This is used for switch | 318 /// to the next instruction in the current node. This is used for switch |
| 320 /// lowering. | 319 /// lowering. |
| 321 static InstX86Br * | 320 static InstX86Br * |
| 322 create(Cfg *Func, CfgNode *Target, | 321 create(Cfg *Func, CfgNode *Target, |
| 323 typename InstX86Base<Machine>::Traits::Cond::BrCond Condition, | 322 typename InstX86Base<Machine>::Traits::Cond::BrCond Condition, |
| 324 Mode Kind) { | 323 Mode Kind) { |
| 325 assert(Condition != InstX86Base<Machine>::Traits::Cond::Br_None); | 324 assert(Condition != InstX86Base<Machine>::Traits::Cond::Br_None); |
| 326 const CfgNode *NoUncondTarget = nullptr; | 325 constexpr CfgNode *NoUncondTarget = nullptr; |
| 327 const InstX86Label<Machine> *NoLabel = nullptr; | 326 constexpr InstX86Label<Machine> *NoLabel = nullptr; |
| 328 return new (Func->allocate<InstX86Br>()) | 327 return new (Func->allocate<InstX86Br>()) |
| 329 InstX86Br(Func, Target, NoUncondTarget, NoLabel, Condition, Kind); | 328 InstX86Br(Func, Target, NoUncondTarget, NoLabel, Condition, Kind); |
| 330 } | 329 } |
| 331 /// Create a conditional intra-block branch (or unconditional, if | 330 /// Create a conditional intra-block branch (or unconditional, if |
| 332 /// Condition==Br_None) to a label in the current block. | 331 /// Condition==Br_None) to a label in the current block. |
| 333 static InstX86Br * | 332 static InstX86Br * |
| 334 create(Cfg *Func, InstX86Label<Machine> *Label, | 333 create(Cfg *Func, InstX86Label<Machine> *Label, |
| 335 typename InstX86Base<Machine>::Traits::Cond::BrCond Condition, | 334 typename InstX86Base<Machine>::Traits::Cond::BrCond Condition, |
| 336 Mode Kind) { | 335 Mode Kind) { |
| 337 const CfgNode *NoCondTarget = nullptr; | 336 constexpr CfgNode *NoCondTarget = nullptr; |
| 338 const CfgNode *NoUncondTarget = nullptr; | 337 constexpr CfgNode *NoUncondTarget = nullptr; |
| 339 return new (Func->allocate<InstX86Br>()) | 338 return new (Func->allocate<InstX86Br>()) |
| 340 InstX86Br(Func, NoCondTarget, NoUncondTarget, Label, Condition, Kind); | 339 InstX86Br(Func, NoCondTarget, NoUncondTarget, Label, Condition, Kind); |
| 341 } | 340 } |
| 342 const CfgNode *getTargetTrue() const { return TargetTrue; } | 341 const CfgNode *getTargetTrue() const { return TargetTrue; } |
| 343 const CfgNode *getTargetFalse() const { return TargetFalse; } | 342 const CfgNode *getTargetFalse() const { return TargetFalse; } |
| 344 bool isNear() const { return Kind == Near; } | 343 bool isNear() const { return Kind == Near; } |
| 345 bool optimizeBranch(const CfgNode *NextNode); | 344 bool optimizeBranch(const CfgNode *NextNode); |
| 346 uint32_t getEmitInstCount() const override { | 345 uint32_t getEmitInstCount() const override { |
| 347 uint32_t Sum = 0; | 346 uint32_t Sum = 0; |
| 348 if (Label) | 347 if (Label) |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 InstX86BaseBinopGPRShift(const InstX86BaseBinopGPRShift &) = delete; | 635 InstX86BaseBinopGPRShift(const InstX86BaseBinopGPRShift &) = delete; |
| 637 InstX86BaseBinopGPRShift & | 636 InstX86BaseBinopGPRShift & |
| 638 operator=(const InstX86BaseBinopGPRShift &) = delete; | 637 operator=(const InstX86BaseBinopGPRShift &) = delete; |
| 639 | 638 |
| 640 public: | 639 public: |
| 641 using Base = InstX86BaseBinopGPRShift<Machine, K>; | 640 using Base = InstX86BaseBinopGPRShift<Machine, K>; |
| 642 | 641 |
| 643 void emit(const Cfg *Func) const override { | 642 void emit(const Cfg *Func) const override { |
| 644 if (!BuildDefs::dump()) | 643 if (!BuildDefs::dump()) |
| 645 return; | 644 return; |
| 646 const bool ShiftHack = true; | 645 this->emitTwoAddress(Opcode, this, Func); |
| 647 this->emitTwoAddress(Opcode, this, Func, ShiftHack); | |
| 648 } | 646 } |
| 649 void emitIAS(const Cfg *Func) const override { | 647 void emitIAS(const Cfg *Func) const override { |
| 650 Type Ty = this->getDest()->getType(); | 648 Type Ty = this->getDest()->getType(); |
| 651 assert(this->getSrcSize() == 2); | 649 assert(this->getSrcSize() == 2); |
| 652 this->emitIASGPRShift(Func, Ty, this->getDest(), this->getSrc(1), Emitter); | 650 this->emitIASGPRShift(Func, Ty, this->getDest(), this->getSrc(1), Emitter); |
| 653 } | 651 } |
| 654 void dump(const Cfg *Func) const override { | 652 void dump(const Cfg *Func) const override { |
| 655 if (!BuildDefs::dump()) | 653 if (!BuildDefs::dump()) |
| 656 return; | 654 return; |
| 657 Ostream &Str = Func->getContext()->getStrDump(); | 655 Ostream &Str = Func->getContext()->getStrDump(); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 680 InstX86BaseBinopGPR() = delete; | 678 InstX86BaseBinopGPR() = delete; |
| 681 InstX86BaseBinopGPR(const InstX86BaseBinopGPR &) = delete; | 679 InstX86BaseBinopGPR(const InstX86BaseBinopGPR &) = delete; |
| 682 InstX86BaseBinopGPR &operator=(const InstX86BaseBinopGPR &) = delete; | 680 InstX86BaseBinopGPR &operator=(const InstX86BaseBinopGPR &) = delete; |
| 683 | 681 |
| 684 public: | 682 public: |
| 685 using Base = InstX86BaseBinopGPR<Machine, K>; | 683 using Base = InstX86BaseBinopGPR<Machine, K>; |
| 686 | 684 |
| 687 void emit(const Cfg *Func) const override { | 685 void emit(const Cfg *Func) const override { |
| 688 if (!BuildDefs::dump()) | 686 if (!BuildDefs::dump()) |
| 689 return; | 687 return; |
| 690 const bool ShiftHack = false; | 688 this->emitTwoAddress(Opcode, this, Func); |
| 691 this->emitTwoAddress(Opcode, this, Func, ShiftHack); | |
| 692 } | 689 } |
| 693 void emitIAS(const Cfg *Func) const override { | 690 void emitIAS(const Cfg *Func) const override { |
| 694 Type Ty = this->getDest()->getType(); | 691 Type Ty = this->getDest()->getType(); |
| 695 assert(this->getSrcSize() == 2); | 692 assert(this->getSrcSize() == 2); |
| 696 emitIASRegOpTyGPR<Machine>(Func, Ty, this->getDest(), this->getSrc(1), | 693 emitIASRegOpTyGPR<Machine>(Func, Ty, this->getDest(), this->getSrc(1), |
| 697 Emitter); | 694 Emitter); |
| 698 } | 695 } |
| 699 void dump(const Cfg *Func) const override { | 696 void dump(const Cfg *Func) const override { |
| 700 if (!BuildDefs::dump()) | 697 if (!BuildDefs::dump()) |
| 701 return; | 698 return; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 725 InstX86BaseBinopRMW() = delete; | 722 InstX86BaseBinopRMW() = delete; |
| 726 InstX86BaseBinopRMW(const InstX86BaseBinopRMW &) = delete; | 723 InstX86BaseBinopRMW(const InstX86BaseBinopRMW &) = delete; |
| 727 InstX86BaseBinopRMW &operator=(const InstX86BaseBinopRMW &) = delete; | 724 InstX86BaseBinopRMW &operator=(const InstX86BaseBinopRMW &) = delete; |
| 728 | 725 |
| 729 public: | 726 public: |
| 730 using Base = InstX86BaseBinopRMW<Machine, K>; | 727 using Base = InstX86BaseBinopRMW<Machine, K>; |
| 731 | 728 |
| 732 void emit(const Cfg *Func) const override { | 729 void emit(const Cfg *Func) const override { |
| 733 if (!BuildDefs::dump()) | 730 if (!BuildDefs::dump()) |
| 734 return; | 731 return; |
| 735 const bool ShiftHack = false; | 732 this->emitTwoAddress(Opcode, this, Func); |
| 736 this->emitTwoAddress(Opcode, this, Func, ShiftHack); | |
| 737 } | 733 } |
| 738 void emitIAS(const Cfg *Func) const override { | 734 void emitIAS(const Cfg *Func) const override { |
| 739 Type Ty = this->getSrc(0)->getType(); | 735 Type Ty = this->getSrc(0)->getType(); |
| 740 assert(this->getSrcSize() == 2); | 736 assert(this->getSrcSize() == 2); |
| 741 emitIASAsAddrOpTyGPR<Machine>(Func, Ty, this->getSrc(0), this->getSrc(1), | 737 emitIASAsAddrOpTyGPR<Machine>(Func, Ty, this->getSrc(0), this->getSrc(1), |
| 742 Emitter); | 738 Emitter); |
| 743 } | 739 } |
| 744 void dump(const Cfg *Func) const override { | 740 void dump(const Cfg *Func) const override { |
| 745 if (!BuildDefs::dump()) | 741 if (!BuildDefs::dump()) |
| 746 return; | 742 return; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 773 InstX86BaseBinopXmm(const InstX86BaseBinopXmm &) = delete; | 769 InstX86BaseBinopXmm(const InstX86BaseBinopXmm &) = delete; |
| 774 InstX86BaseBinopXmm &operator=(const InstX86BaseBinopXmm &) = delete; | 770 InstX86BaseBinopXmm &operator=(const InstX86BaseBinopXmm &) = delete; |
| 775 | 771 |
| 776 public: | 772 public: |
| 777 using Base = InstX86BaseBinopXmm<Machine, K, NeedsElementType>; | 773 using Base = InstX86BaseBinopXmm<Machine, K, NeedsElementType>; |
| 778 | 774 |
| 779 void emit(const Cfg *Func) const override { | 775 void emit(const Cfg *Func) const override { |
| 780 if (!BuildDefs::dump()) | 776 if (!BuildDefs::dump()) |
| 781 return; | 777 return; |
| 782 this->validateVectorAddrMode(); | 778 this->validateVectorAddrMode(); |
| 783 const bool ShiftHack = false; | 779 this->emitTwoAddress(Opcode, this, Func); |
| 784 this->emitTwoAddress(Opcode, this, Func, ShiftHack); | |
| 785 } | 780 } |
| 786 void emitIAS(const Cfg *Func) const override { | 781 void emitIAS(const Cfg *Func) const override { |
| 787 this->validateVectorAddrMode(); | 782 this->validateVectorAddrMode(); |
| 788 Type Ty = this->getDest()->getType(); | 783 Type Ty = this->getDest()->getType(); |
| 789 if (NeedsElementType) | 784 if (NeedsElementType) |
| 790 Ty = typeElementType(Ty); | 785 Ty = typeElementType(Ty); |
| 791 assert(this->getSrcSize() == 2); | 786 assert(this->getSrcSize() == 2); |
| 792 emitIASRegOpTyXMM<Machine>(Func, Ty, this->getDest(), this->getSrc(1), | 787 emitIASRegOpTyXMM<Machine>(Func, Ty, this->getDest(), this->getSrc(1), |
| 793 Emitter); | 788 Emitter); |
| 794 } | 789 } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 830 InstX86BaseBinopXmmShift & | 825 InstX86BaseBinopXmmShift & |
| 831 operator=(const InstX86BaseBinopXmmShift &) = delete; | 826 operator=(const InstX86BaseBinopXmmShift &) = delete; |
| 832 | 827 |
| 833 public: | 828 public: |
| 834 using Base = InstX86BaseBinopXmmShift<Machine, K, AllowAllTypes>; | 829 using Base = InstX86BaseBinopXmmShift<Machine, K, AllowAllTypes>; |
| 835 | 830 |
| 836 void emit(const Cfg *Func) const override { | 831 void emit(const Cfg *Func) const override { |
| 837 if (!BuildDefs::dump()) | 832 if (!BuildDefs::dump()) |
| 838 return; | 833 return; |
| 839 this->validateVectorAddrMode(); | 834 this->validateVectorAddrMode(); |
| 840 const bool ShiftHack = false; | 835 this->emitTwoAddress(Opcode, this, Func); |
| 841 this->emitTwoAddress(Opcode, this, Func, ShiftHack); | |
| 842 } | 836 } |
| 843 void emitIAS(const Cfg *Func) const override { | 837 void emitIAS(const Cfg *Func) const override { |
| 844 this->validateVectorAddrMode(); | 838 this->validateVectorAddrMode(); |
| 845 Type Ty = this->getDest()->getType(); | 839 Type Ty = this->getDest()->getType(); |
| 846 assert(AllowAllTypes || isVectorType(Ty)); | 840 assert(AllowAllTypes || isVectorType(Ty)); |
| 847 Type ElementTy = typeElementType(Ty); | 841 Type ElementTy = typeElementType(Ty); |
| 848 assert(this->getSrcSize() == 2); | 842 assert(this->getSrcSize() == 2); |
| 849 emitIASXmmShift<Machine>(Func, ElementTy, this->getDest(), this->getSrc(1), | 843 emitIASXmmShift<Machine>(Func, ElementTy, this->getDest(), this->getSrc(1), |
| 850 Emitter); | 844 Emitter); |
| 851 } | 845 } |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 968 template <class Machine, typename InstX86Base<Machine>::InstKindX86 K> | 962 template <class Machine, typename InstX86Base<Machine>::InstKindX86 K> |
| 969 class InstX86BaseMovlike : public InstX86Base<Machine> { | 963 class InstX86BaseMovlike : public InstX86Base<Machine> { |
| 970 InstX86BaseMovlike() = delete; | 964 InstX86BaseMovlike() = delete; |
| 971 InstX86BaseMovlike(const InstX86BaseMovlike &) = delete; | 965 InstX86BaseMovlike(const InstX86BaseMovlike &) = delete; |
| 972 InstX86BaseMovlike &operator=(const InstX86BaseMovlike &) = delete; | 966 InstX86BaseMovlike &operator=(const InstX86BaseMovlike &) = delete; |
| 973 | 967 |
| 974 public: | 968 public: |
| 975 using Base = InstX86BaseMovlike<Machine, K>; | 969 using Base = InstX86BaseMovlike<Machine, K>; |
| 976 | 970 |
| 977 bool isRedundantAssign() const override { | 971 bool isRedundantAssign() const override { |
| 972 if (const auto *SrcVar = llvm::dyn_cast<const Variable>(this->getSrc(0))) { |
| 973 if (SrcVar->hasReg() && this->Dest->hasReg()) { |
| 974 // An assignment between physical registers is considered redundant if |
| 975 // they have the same base register and the same encoding. E.g.: |
| 976 // mov cl, ecx ==> redundant |
| 977 // mov ch, ecx ==> not redundant due to different encodings |
| 978 // mov ch, ebp ==> not redundant due to different base registers |
| 979 // TODO(stichnot): Don't consider "mov eax, eax" to be redundant when |
| 980 // used in 64-bit mode to clear the upper half of rax. |
| 981 int32_t SrcReg = SrcVar->getRegNum(); |
| 982 int32_t DestReg = this->Dest->getRegNum(); |
| 983 return (InstX86Base<Machine>::Traits::getEncoding(SrcReg) == |
| 984 InstX86Base<Machine>::Traits::getEncoding(DestReg)) && |
| 985 (InstX86Base<Machine>::Traits::getBaseReg(SrcReg) == |
| 986 InstX86Base<Machine>::Traits::getBaseReg(DestReg)); |
| 987 } |
| 988 } |
| 978 return checkForRedundantAssign(this->getDest(), this->getSrc(0)); | 989 return checkForRedundantAssign(this->getDest(), this->getSrc(0)); |
| 979 } | 990 } |
| 980 bool isVarAssign() const override { | 991 bool isVarAssign() const override { |
| 981 return llvm::isa<Variable>(this->getSrc(0)); | 992 return llvm::isa<Variable>(this->getSrc(0)); |
| 982 } | 993 } |
| 983 void dump(const Cfg *Func) const override { | 994 void dump(const Cfg *Func) const override { |
| 984 if (!BuildDefs::dump()) | 995 if (!BuildDefs::dump()) |
| 985 return; | 996 return; |
| 986 Ostream &Str = Func->getContext()->getStrDump(); | 997 Ostream &Str = Func->getContext()->getStrDump(); |
| 987 Str << Opcode << "." << this->getDest()->getType() << " "; | 998 Str << Opcode << "." << this->getDest()->getType() << " "; |
| 988 this->dumpDest(Func); | 999 this->dumpDest(Func); |
| 989 Str << ", "; | 1000 Str << ", "; |
| 990 this->dumpSources(Func); | 1001 this->dumpSources(Func); |
| 991 } | 1002 } |
| 992 static bool classof(const Inst *Inst) { | 1003 static bool classof(const Inst *Inst) { |
| 993 return InstX86Base<Machine>::isClassof(Inst, InstX86Base<Machine>::K); | 1004 return InstX86Base<Machine>::isClassof(Inst, InstX86Base<Machine>::K); |
| 994 } | 1005 } |
| 995 | 1006 |
| 996 protected: | 1007 protected: |
| 997 InstX86BaseMovlike(Cfg *Func, Variable *Dest, Operand *Source) | 1008 InstX86BaseMovlike(Cfg *Func, Variable *Dest, Operand *Source) |
| 998 : InstX86Base<Machine>(Func, K, 1, Dest) { | 1009 : InstX86Base<Machine>(Func, K, 1, Dest) { |
| 999 this->addSource(Source); | 1010 this->addSource(Source); |
| 1011 // For an integer assignment, make sure it's either a same-type assignment |
| 1012 // or a truncation. |
| 1013 assert(!isScalarIntegerType(Dest->getType()) || |
| 1014 (typeWidthInBytes(Dest->getType()) <= |
| 1015 typeWidthInBytes(Source->getType()))); |
| 1000 } | 1016 } |
| 1001 | 1017 |
| 1002 static const char *Opcode; | 1018 static const char *Opcode; |
| 1003 }; | 1019 }; |
| 1004 | 1020 |
| 1005 template <class Machine> | 1021 template <class Machine> |
| 1006 class InstX86Bswap | 1022 class InstX86Bswap |
| 1007 : public InstX86BaseInplaceopGPR<Machine, InstX86Base<Machine>::Bswap> { | 1023 : public InstX86BaseInplaceopGPR<Machine, InstX86Base<Machine>::Bswap> { |
| 1008 public: | 1024 public: |
| 1009 static InstX86Bswap *create(Cfg *Func, Operand *SrcDest) { | 1025 static InstX86Bswap *create(Cfg *Func, Operand *SrcDest) { |
| (...skipping 2211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3221 &InstX86Base<Machine>::Traits::Assembler::psrl}; \ | 3237 &InstX86Base<Machine>::Traits::Assembler::psrl}; \ |
| 3222 } \ | 3238 } \ |
| 3223 } | 3239 } |
| 3224 | 3240 |
| 3225 } // end of namespace X86Internal | 3241 } // end of namespace X86Internal |
| 3226 } // end of namespace Ice | 3242 } // end of namespace Ice |
| 3227 | 3243 |
| 3228 #include "IceInstX86BaseImpl.h" | 3244 #include "IceInstX86BaseImpl.h" |
| 3229 | 3245 |
| 3230 #endif // SUBZERO_SRC_ICEINSTX86BASE_H | 3246 #endif // SUBZERO_SRC_ICEINSTX86BASE_H |
| OLD | NEW |