| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 } | 46 } |
| 47 bool hasFramePointer() const override { return UsesFramePointer; } | 47 bool hasFramePointer() const override { return UsesFramePointer; } |
| 48 SizeT getFrameOrStackReg() const override { | 48 SizeT getFrameOrStackReg() const override { |
| 49 return UsesFramePointer ? RegMIPS32::Reg_FP : RegMIPS32::Reg_SP; | 49 return UsesFramePointer ? RegMIPS32::Reg_FP : RegMIPS32::Reg_SP; |
| 50 } | 50 } |
| 51 size_t typeWidthInBytesOnStack(Type Ty) const override { | 51 size_t typeWidthInBytesOnStack(Type Ty) const override { |
| 52 // Round up to the next multiple of 4 bytes. In particular, i1, | 52 // Round up to the next multiple of 4 bytes. In particular, i1, |
| 53 // i8, and i16 are rounded up to 4 bytes. | 53 // i8, and i16 are rounded up to 4 bytes. |
| 54 return (typeWidthInBytes(Ty) + 3) & ~3; | 54 return (typeWidthInBytes(Ty) + 3) & ~3; |
| 55 } | 55 } |
| 56 |
| 57 // TODO(ascull): what is the best size of MIPS? |
| 58 SizeT getMinJumpTableSize() const override { return 3; } |
| 59 |
| 56 void emitVariable(const Variable *Var) const override; | 60 void emitVariable(const Variable *Var) const override; |
| 57 | 61 |
| 58 const char *getConstantPrefix() const final { return ""; } | 62 const char *getConstantPrefix() const final { return ""; } |
| 59 void emit(const ConstantUndef *C) const final { | 63 void emit(const ConstantUndef *C) const final { |
| 60 (void)C; | 64 (void)C; |
| 61 llvm::report_fatal_error("Not yet implemented"); | 65 llvm::report_fatal_error("Not yet implemented"); |
| 62 } | 66 } |
| 63 void emit(const ConstantInteger32 *C) const final { | 67 void emit(const ConstantInteger32 *C) const final { |
| 64 (void)C; | 68 (void)C; |
| 65 llvm::report_fatal_error("Not yet implemented"); | 69 llvm::report_fatal_error("Not yet implemented"); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 protected: | 170 protected: |
| 167 explicit TargetHeaderMIPS32(GlobalContext *Ctx); | 171 explicit TargetHeaderMIPS32(GlobalContext *Ctx); |
| 168 | 172 |
| 169 private: | 173 private: |
| 170 ~TargetHeaderMIPS32() = default; | 174 ~TargetHeaderMIPS32() = default; |
| 171 }; | 175 }; |
| 172 | 176 |
| 173 } // end of namespace Ice | 177 } // end of namespace Ice |
| 174 | 178 |
| 175 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H | 179 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H |
| OLD | NEW |