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