OLD | NEW |
1 //===- subzero/src/IceTargetLowering.h - Lowering interface -----*- C++ -*-===// | 1 //===- subzero/src/IceTargetLowering.h - Lowering interface -----*- 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 virtual bool hasFramePointer() const { return false; } | 246 virtual bool hasFramePointer() const { return false; } |
247 virtual void setHasFramePointer() = 0; | 247 virtual void setHasFramePointer() = 0; |
248 virtual RegNumT getStackReg() const = 0; | 248 virtual RegNumT getStackReg() const = 0; |
249 virtual RegNumT getFrameReg() const = 0; | 249 virtual RegNumT getFrameReg() const = 0; |
250 virtual RegNumT getFrameOrStackReg() const = 0; | 250 virtual RegNumT getFrameOrStackReg() const = 0; |
251 virtual size_t typeWidthInBytesOnStack(Type Ty) const = 0; | 251 virtual size_t typeWidthInBytesOnStack(Type Ty) const = 0; |
252 virtual uint32_t getStackAlignment() const = 0; | 252 virtual uint32_t getStackAlignment() const = 0; |
253 virtual void reserveFixedAllocaArea(size_t Size, size_t Align) = 0; | 253 virtual void reserveFixedAllocaArea(size_t Size, size_t Align) = 0; |
254 virtual int32_t getFrameFixedAllocaOffset() const = 0; | 254 virtual int32_t getFrameFixedAllocaOffset() const = 0; |
255 virtual uint32_t maxOutArgsSizeBytes() const { return 0; } | 255 virtual uint32_t maxOutArgsSizeBytes() const { return 0; } |
256 | 256 // Addressing relative to frame pointer differs in MIPS compared to X86/ARM |
| 257 // since MIPS decrements its stack pointer prior to saving it in the frame |
| 258 // pointer register. |
| 259 virtual uint32_t getFramePointerOffset(uint32_t CurrentOffset, |
| 260 uint32_t Size) const { |
| 261 return -(CurrentOffset + Size); |
| 262 } |
257 /// Return whether a 64-bit Variable should be split into a Variable64On32. | 263 /// Return whether a 64-bit Variable should be split into a Variable64On32. |
258 virtual bool shouldSplitToVariable64On32(Type Ty) const = 0; | 264 virtual bool shouldSplitToVariable64On32(Type Ty) const = 0; |
259 | 265 |
260 /// Return whether a Vector Variable should be split into a VariableVecOn32. | 266 /// Return whether a Vector Variable should be split into a VariableVecOn32. |
261 virtual bool shouldSplitToVariableVecOn32(Type Ty) const { | 267 virtual bool shouldSplitToVariableVecOn32(Type Ty) const { |
262 (void)Ty; | 268 (void)Ty; |
263 return false; | 269 return false; |
264 } | 270 } |
265 | 271 |
266 bool hasComputedFrame() const { return HasComputedFrame; } | 272 bool hasComputedFrame() const { return HasComputedFrame; } |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 virtual void lower() {} | 653 virtual void lower() {} |
648 | 654 |
649 protected: | 655 protected: |
650 explicit TargetHeaderLowering(GlobalContext *Ctx) : Ctx(Ctx) {} | 656 explicit TargetHeaderLowering(GlobalContext *Ctx) : Ctx(Ctx) {} |
651 GlobalContext *Ctx; | 657 GlobalContext *Ctx; |
652 }; | 658 }; |
653 | 659 |
654 } // end of namespace Ice | 660 } // end of namespace Ice |
655 | 661 |
656 #endif // SUBZERO_SRC_ICETARGETLOWERING_H | 662 #endif // SUBZERO_SRC_ICETARGETLOWERING_H |
OLD | NEW |