| OLD | NEW |
| 1 //===- subzero/src/IceTargetLoweringMIPS32.h - MIPS32 lowering ---*- C++-*-===// | 1 //===- subzero/src/IceTargetLoweringMIPS32.h - MIPS32 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 IceString getRegName(SizeT RegNum, Type Ty) const override; | 42 IceString getRegName(SizeT RegNum, Type Ty) const override; |
| 43 llvm::SmallBitVector getRegisterSet(RegSetMask Include, | 43 llvm::SmallBitVector getRegisterSet(RegSetMask Include, |
| 44 RegSetMask Exclude) const override; | 44 RegSetMask Exclude) const override; |
| 45 const llvm::SmallBitVector &getRegisterSetForType(Type Ty) const override { | 45 const llvm::SmallBitVector &getRegisterSetForType(Type Ty) const override { |
| 46 return TypeToRegisterSet[Ty]; | 46 return TypeToRegisterSet[Ty]; |
| 47 } | 47 } |
| 48 const llvm::SmallBitVector &getAliasesForRegister(SizeT Reg) const override { | 48 const llvm::SmallBitVector &getAliasesForRegister(SizeT Reg) const override { |
| 49 return RegisterAliases[Reg]; | 49 return RegisterAliases[Reg]; |
| 50 } | 50 } |
| 51 bool hasFramePointer() const override { return UsesFramePointer; } | 51 bool hasFramePointer() const override { return UsesFramePointer; } |
| 52 void setHasFramePointer() override { UsesFramePointer = true; } |
| 52 SizeT getStackReg() const override { return RegMIPS32::Reg_SP; } | 53 SizeT getStackReg() const override { return RegMIPS32::Reg_SP; } |
| 53 SizeT getFrameOrStackReg() const override { | 54 SizeT getFrameOrStackReg() const override { |
| 54 return UsesFramePointer ? RegMIPS32::Reg_FP : RegMIPS32::Reg_SP; | 55 return UsesFramePointer ? RegMIPS32::Reg_FP : RegMIPS32::Reg_SP; |
| 55 } | 56 } |
| 56 size_t typeWidthInBytesOnStack(Type Ty) const override { | 57 size_t typeWidthInBytesOnStack(Type Ty) const override { |
| 57 // Round up to the next multiple of 4 bytes. In particular, i1, i8, and i16 | 58 // Round up to the next multiple of 4 bytes. In particular, i1, i8, and i16 |
| 58 // are rounded up to 4 bytes. | 59 // are rounded up to 4 bytes. |
| 59 return (typeWidthInBytes(Ty) + 3) & ~3; | 60 return (typeWidthInBytes(Ty) + 3) & ~3; |
| 60 } | 61 } |
| 62 uint32_t getStackAlignment() const override { |
| 63 // TODO(sehr): what is the stack alignment? |
| 64 return 1; |
| 65 } |
| 61 | 66 |
| 62 bool shouldSplitToVariable64On32(Type Ty) const override { | 67 bool shouldSplitToVariable64On32(Type Ty) const override { |
| 63 return Ty == IceType_i64; | 68 return Ty == IceType_i64; |
| 64 } | 69 } |
| 65 | 70 |
| 66 // TODO(ascull): what is the best size of MIPS? | 71 // TODO(ascull): what is the best size of MIPS? |
| 67 SizeT getMinJumpTableSize() const override { return 3; } | 72 SizeT getMinJumpTableSize() const override { return 3; } |
| 68 void emitJumpTable(const Cfg *Func, | 73 void emitJumpTable(const Cfg *Func, |
| 69 const InstJumpTable *JumpTable) const override; | 74 const InstJumpTable *JumpTable) const override; |
| 70 | 75 |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 protected: | 279 protected: |
| 275 explicit TargetHeaderMIPS32(GlobalContext *Ctx); | 280 explicit TargetHeaderMIPS32(GlobalContext *Ctx); |
| 276 | 281 |
| 277 private: | 282 private: |
| 278 ~TargetHeaderMIPS32() = default; | 283 ~TargetHeaderMIPS32() = default; |
| 279 }; | 284 }; |
| 280 | 285 |
| 281 } // end of namespace Ice | 286 } // end of namespace Ice |
| 282 | 287 |
| 283 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H | 288 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H |
| OLD | NEW |