OLD | NEW |
1 //===- subzero/src/IceTargetLoweringX86Base.h - x86 lowering ----*- C++ -*-===// | 1 //===- subzero/src/IceTargetLoweringX86Base.h - x86 lowering ----*- 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 const llvm::SmallBitVector &getRegisterSetForType(Type Ty) const override { | 75 const llvm::SmallBitVector &getRegisterSetForType(Type Ty) const override { |
76 return TypeToRegisterSet[Ty]; | 76 return TypeToRegisterSet[Ty]; |
77 } | 77 } |
78 | 78 |
79 const llvm::SmallBitVector &getAliasesForRegister(SizeT Reg) const override { | 79 const llvm::SmallBitVector &getAliasesForRegister(SizeT Reg) const override { |
80 assert(Reg < Traits::RegisterSet::Reg_NUM); | 80 assert(Reg < Traits::RegisterSet::Reg_NUM); |
81 return RegisterAliases[Reg]; | 81 return RegisterAliases[Reg]; |
82 } | 82 } |
83 | 83 |
84 bool hasFramePointer() const override { return IsEbpBasedFrame; } | 84 bool hasFramePointer() const override { return IsEbpBasedFrame; } |
| 85 SizeT getStackReg() const override { return Traits::RegisterSet::Reg_esp; } |
85 SizeT getFrameOrStackReg() const override { | 86 SizeT getFrameOrStackReg() const override { |
86 return IsEbpBasedFrame ? Traits::RegisterSet::Reg_ebp | 87 return IsEbpBasedFrame ? Traits::RegisterSet::Reg_ebp |
87 : Traits::RegisterSet::Reg_esp; | 88 : Traits::RegisterSet::Reg_esp; |
88 } | 89 } |
89 size_t typeWidthInBytesOnStack(Type Ty) const override { | 90 size_t typeWidthInBytesOnStack(Type Ty) const override { |
90 // Round up to the next multiple of WordType bytes. | 91 // Round up to the next multiple of WordType bytes. |
91 const uint32_t WordSizeInBytes = typeWidthInBytes(Traits::WordType); | 92 const uint32_t WordSizeInBytes = typeWidthInBytes(Traits::WordType); |
92 return Utils::applyAlignment(typeWidthInBytes(Ty), WordSizeInBytes); | 93 return Utils::applyAlignment(typeWidthInBytes(Ty), WordSizeInBytes); |
93 } | 94 } |
94 | 95 |
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 Operand *Src1Lo, Variable *DestLo, Variable *DestHi); | 723 Operand *Src1Lo, Variable *DestLo, Variable *DestHi); |
723 | 724 |
724 BoolFolding FoldingInfo; | 725 BoolFolding FoldingInfo; |
725 }; | 726 }; |
726 } // end of namespace X86Internal | 727 } // end of namespace X86Internal |
727 } // end of namespace Ice | 728 } // end of namespace Ice |
728 | 729 |
729 #include "IceTargetLoweringX86BaseImpl.h" | 730 #include "IceTargetLoweringX86BaseImpl.h" |
730 | 731 |
731 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASE_H | 732 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASE_H |
OLD | NEW |