| OLD | NEW |
| 1 //===- subzero/src/IceTargetLoweringX8664Traits.h - x86-64 traits -*- C++ -*-=// | 1 //===- subzero/src/IceTargetLoweringX8664Traits.h - x86-64 traits -*- 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 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 void dump(const Cfg *Func, Ostream &Str) const override; | 725 void dump(const Cfg *Func, Ostream &Str) const override; |
| 726 | 726 |
| 727 static bool classof(const Operand *Operand) { | 727 static bool classof(const Operand *Operand) { |
| 728 return Operand->getKind() == static_cast<OperandKind>(kMem); | 728 return Operand->getKind() == static_cast<OperandKind>(kMem); |
| 729 } | 729 } |
| 730 | 730 |
| 731 void setRandomized(bool R) { Randomized = R; } | 731 void setRandomized(bool R) { Randomized = R; } |
| 732 | 732 |
| 733 bool getRandomized() const { return Randomized; } | 733 bool getRandomized() const { return Randomized; } |
| 734 | 734 |
| 735 void setIgnoreStackAdjust(bool Ignore) { IgnoreStackAdjust = Ignore; } | |
| 736 bool getIgnoreStackAdjust() const { return IgnoreStackAdjust; } | |
| 737 | |
| 738 private: | 735 private: |
| 739 X86OperandMem(Cfg *Func, Type Ty, Variable *Base, Constant *Offset, | 736 X86OperandMem(Cfg *Func, Type Ty, Variable *Base, Constant *Offset, |
| 740 Variable *Index, uint16_t Shift); | 737 Variable *Index, uint16_t Shift); |
| 741 | 738 |
| 742 Variable *Base; | 739 Variable *Base; |
| 743 Constant *Offset; | 740 Constant *Offset; |
| 744 Variable *Index; | 741 Variable *Index; |
| 745 uint16_t Shift; | 742 uint16_t Shift; |
| 746 /// A flag to show if this memory operand is a randomized one. Randomized | 743 /// A flag to show if this memory operand is a randomized one. Randomized |
| 747 /// memory operands are generated in | 744 /// memory operands are generated in |
| 748 /// TargetX86Base::randomizeOrPoolImmediate() | 745 /// TargetX86Base::randomizeOrPoolImmediate() |
| 749 bool Randomized = false; | 746 bool Randomized = false; |
| 750 /// Memory operations involving the stack pointer need to know when the | |
| 751 /// stack pointer was moved temporarily. Ignore that adjustment in | |
| 752 /// cases that should be pinned to the stack pointer, such as outgoing | |
| 753 /// arguments to calls. | |
| 754 bool IgnoreStackAdjust = false; | |
| 755 }; | 747 }; |
| 756 | 748 |
| 757 /// VariableSplit is a way to treat an f64 memory location as a pair of i32 | 749 /// VariableSplit is a way to treat an f64 memory location as a pair of i32 |
| 758 /// locations (Low and High). This is needed for some cases of the Bitcast | 750 /// locations (Low and High). This is needed for some cases of the Bitcast |
| 759 /// instruction. Since it's not possible for integer registers to access the | 751 /// instruction. Since it's not possible for integer registers to access the |
| 760 /// XMM registers and vice versa, the lowering forces the f64 to be spilled to | 752 /// XMM registers and vice versa, the lowering forces the f64 to be spilled to |
| 761 /// the stack and then accesses through the VariableSplit. | 753 /// the stack and then accesses through the VariableSplit. |
| 762 // TODO(jpp): remove references to VariableSplit from IceInstX86Base as 64bit | 754 // TODO(jpp): remove references to VariableSplit from IceInstX86Base as 64bit |
| 763 // targets can natively handle these. | 755 // targets can natively handle these. |
| 764 class VariableSplit : public X86Operand { | 756 class VariableSplit : public X86Operand { |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 | 840 |
| 849 } // end of namespace X86Internal | 841 } // end of namespace X86Internal |
| 850 | 842 |
| 851 namespace X8664 { | 843 namespace X8664 { |
| 852 using Traits = ::Ice::X86Internal::MachineTraits<TargetX8664>; | 844 using Traits = ::Ice::X86Internal::MachineTraits<TargetX8664>; |
| 853 } // end of namespace X8664 | 845 } // end of namespace X8664 |
| 854 | 846 |
| 855 } // end of namespace Ice | 847 } // end of namespace Ice |
| 856 | 848 |
| 857 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8664TRAITS_H | 849 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8664TRAITS_H |
| OLD | NEW |