| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 return TypeToRegisterSet[Ty]; | 45 return TypeToRegisterSet[Ty]; |
| 46 } | 46 } |
| 47 const llvm::SmallBitVector &getAliasesForRegister(SizeT Reg) const override { | 47 const llvm::SmallBitVector &getAliasesForRegister(SizeT Reg) const override { |
| 48 return RegisterAliases[Reg]; | 48 return RegisterAliases[Reg]; |
| 49 } | 49 } |
| 50 bool hasFramePointer() const override { return UsesFramePointer; } | 50 bool hasFramePointer() const override { return UsesFramePointer; } |
| 51 SizeT getFrameOrStackReg() const override { | 51 SizeT getFrameOrStackReg() const override { |
| 52 return UsesFramePointer ? RegMIPS32::Reg_FP : RegMIPS32::Reg_SP; | 52 return UsesFramePointer ? RegMIPS32::Reg_FP : RegMIPS32::Reg_SP; |
| 53 } | 53 } |
| 54 size_t typeWidthInBytesOnStack(Type Ty) const override { | 54 size_t typeWidthInBytesOnStack(Type Ty) const override { |
| 55 // Round up to the next multiple of 4 bytes. In particular, i1, | 55 // Round up to the next multiple of 4 bytes. In particular, i1, i8, and i16 |
| 56 // i8, and i16 are rounded up to 4 bytes. | 56 // are rounded up to 4 bytes. |
| 57 return (typeWidthInBytes(Ty) + 3) & ~3; | 57 return (typeWidthInBytes(Ty) + 3) & ~3; |
| 58 } | 58 } |
| 59 | 59 |
| 60 // TODO(ascull): what is the best size of MIPS? | 60 // TODO(ascull): what is the best size of MIPS? |
| 61 SizeT getMinJumpTableSize() const override { return 3; } | 61 SizeT getMinJumpTableSize() const override { return 3; } |
| 62 void emitJumpTable(const Cfg *Func, | 62 void emitJumpTable(const Cfg *Func, |
| 63 const InstJumpTable *JumpTable) const override; | 63 const InstJumpTable *JumpTable) const override; |
| 64 | 64 |
| 65 void emitVariable(const Variable *Var) const override; | 65 void emitVariable(const Variable *Var) const override; |
| 66 | 66 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 protected: | 176 protected: |
| 177 explicit TargetHeaderMIPS32(GlobalContext *Ctx); | 177 explicit TargetHeaderMIPS32(GlobalContext *Ctx); |
| 178 | 178 |
| 179 private: | 179 private: |
| 180 ~TargetHeaderMIPS32() = default; | 180 ~TargetHeaderMIPS32() = default; |
| 181 }; | 181 }; |
| 182 | 182 |
| 183 } // end of namespace Ice | 183 } // end of namespace Ice |
| 184 | 184 |
| 185 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H | 185 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H |
| OLD | NEW |