| OLD | NEW |
| 1 //===- subzero/src/IceTargetLoweringX8632Traits.h - x86-32 traits -*- C++ -*-=// | 1 //===- subzero/src/IceTargetLoweringX8632Traits.h - x86-32 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 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 void dump(const Cfg *Func, Ostream &Str) const override; | 745 void dump(const Cfg *Func, Ostream &Str) const override; |
| 746 | 746 |
| 747 static bool classof(const Operand *Operand) { | 747 static bool classof(const Operand *Operand) { |
| 748 return Operand->getKind() == static_cast<OperandKind>(kMem); | 748 return Operand->getKind() == static_cast<OperandKind>(kMem); |
| 749 } | 749 } |
| 750 | 750 |
| 751 void setRandomized(bool R) { Randomized = R; } | 751 void setRandomized(bool R) { Randomized = R; } |
| 752 | 752 |
| 753 bool getRandomized() const { return Randomized; } | 753 bool getRandomized() const { return Randomized; } |
| 754 | 754 |
| 755 void setIgnoreStackAdjust(bool Ignore) { IgnoreStackAdjust = Ignore; } | |
| 756 bool getIgnoreStackAdjust() const { return IgnoreStackAdjust; } | |
| 757 | |
| 758 private: | 755 private: |
| 759 X86OperandMem(Cfg *Func, Type Ty, Variable *Base, Constant *Offset, | 756 X86OperandMem(Cfg *Func, Type Ty, Variable *Base, Constant *Offset, |
| 760 Variable *Index, uint16_t Shift, SegmentRegisters SegmentReg); | 757 Variable *Index, uint16_t Shift, SegmentRegisters SegmentReg); |
| 761 | 758 |
| 762 Variable *Base; | 759 Variable *Base; |
| 763 Constant *Offset; | 760 Constant *Offset; |
| 764 Variable *Index; | 761 Variable *Index; |
| 765 uint16_t Shift; | 762 uint16_t Shift; |
| 766 SegmentRegisters SegmentReg : 16; | 763 SegmentRegisters SegmentReg : 16; |
| 767 /// A flag to show if this memory operand is a randomized one. Randomized | 764 /// A flag to show if this memory operand is a randomized one. Randomized |
| 768 /// memory operands are generated in | 765 /// memory operands are generated in |
| 769 /// TargetX86Base::randomizeOrPoolImmediate() | 766 /// TargetX86Base::randomizeOrPoolImmediate() |
| 770 bool Randomized; | 767 bool Randomized; |
| 771 /// Memory operations involving the stack pointer need to know when the | |
| 772 /// stack pointer was moved temporarily. Ignore that adjustment in | |
| 773 /// cases that should be pinned to the stack pointer, such as outgoing | |
| 774 /// arguments to calls. | |
| 775 bool IgnoreStackAdjust = false; | |
| 776 }; | 768 }; |
| 777 | 769 |
| 778 /// VariableSplit is a way to treat an f64 memory location as a pair of i32 | 770 /// VariableSplit is a way to treat an f64 memory location as a pair of i32 |
| 779 /// locations (Low and High). This is needed for some cases of the Bitcast | 771 /// locations (Low and High). This is needed for some cases of the Bitcast |
| 780 /// instruction. Since it's not possible for integer registers to access the | 772 /// instruction. Since it's not possible for integer registers to access the |
| 781 /// XMM registers and vice versa, the lowering forces the f64 to be spilled to | 773 /// XMM registers and vice versa, the lowering forces the f64 to be spilled to |
| 782 /// the stack and then accesses through the VariableSplit. | 774 /// the stack and then accesses through the VariableSplit. |
| 783 // TODO(jpp): remove references to VariableSplit from IceInstX86Base as 64bit | 775 // TODO(jpp): remove references to VariableSplit from IceInstX86Base as 64bit |
| 784 // targets can natively handle these. | 776 // targets can natively handle these. |
| 785 class VariableSplit : public X86Operand { | 777 class VariableSplit : public X86Operand { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 873 | 865 |
| 874 } // end of namespace X86Internal | 866 } // end of namespace X86Internal |
| 875 | 867 |
| 876 namespace X8632 { | 868 namespace X8632 { |
| 877 using Traits = ::Ice::X86Internal::MachineTraits<TargetX8632>; | 869 using Traits = ::Ice::X86Internal::MachineTraits<TargetX8632>; |
| 878 } // end of namespace X8632 | 870 } // end of namespace X8632 |
| 879 | 871 |
| 880 } // end of namespace Ice | 872 } // end of namespace Ice |
| 881 | 873 |
| 882 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632TRAITS_H | 874 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632TRAITS_H |
| OLD | NEW |