| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 return (typeWidthInBytes(Ty) + 3) & ~3; | 94 return (typeWidthInBytes(Ty) + 3) & ~3; |
| 95 } | 95 } |
| 96 uint32_t getStackAlignment() const override; | 96 uint32_t getStackAlignment() const override; |
| 97 void reserveFixedAllocaArea(size_t Size, size_t Align) override { | 97 void reserveFixedAllocaArea(size_t Size, size_t Align) override { |
| 98 FixedAllocaSizeBytes = Size; | 98 FixedAllocaSizeBytes = Size; |
| 99 assert(llvm::isPowerOf2_32(Align)); | 99 assert(llvm::isPowerOf2_32(Align)); |
| 100 FixedAllocaAlignBytes = Align; | 100 FixedAllocaAlignBytes = Align; |
| 101 PrologEmitsFixedAllocas = true; | 101 PrologEmitsFixedAllocas = true; |
| 102 } | 102 } |
| 103 int32_t getFrameFixedAllocaOffset() const override { | 103 int32_t getFrameFixedAllocaOffset() const override { |
| 104 // TODO(sehr): Implement fixed stack layout. | 104 return FixedAllocaSizeBytes - (SpillAreaSizeBytes - MaxOutArgsSizeBytes); |
| 105 llvm::report_fatal_error("Not yet implemented"); | |
| 106 return 0; | |
| 107 } | 105 } |
| 108 | 106 |
| 109 uint32_t maxOutArgsSizeBytes() const override { return MaxOutArgsSizeBytes; } | 107 uint32_t maxOutArgsSizeBytes() const override { return MaxOutArgsSizeBytes; } |
| 110 | 108 |
| 111 bool shouldSplitToVariable64On32(Type Ty) const override { | 109 bool shouldSplitToVariable64On32(Type Ty) const override { |
| 112 return Ty == IceType_i64; | 110 return Ty == IceType_i64; |
| 113 } | 111 } |
| 114 | 112 |
| 115 // TODO(ascull): what is the best size of MIPS? | 113 // TODO(ascull): what is the best size of MIPS? |
| 116 SizeT getMinJumpTableSize() const override { return 3; } | 114 SizeT getMinJumpTableSize() const override { return 3; } |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 /// the helpers will create a new Operand and emit instructions that | 439 /// the helpers will create a new Operand and emit instructions that |
| 442 /// guarantee that the Operand kind is one of those indicated by the | 440 /// guarantee that the Operand kind is one of those indicated by the |
| 443 /// LegalMask (a bitmask of allowed kinds). If the input Operand is known | 441 /// LegalMask (a bitmask of allowed kinds). If the input Operand is known |
| 444 /// to already meet the constraints, it may be simply returned as the result, | 442 /// to already meet the constraints, it may be simply returned as the result, |
| 445 /// without creating any new instructions or operands. | 443 /// without creating any new instructions or operands. |
| 446 enum OperandLegalization { | 444 enum OperandLegalization { |
| 447 Legal_None = 0, | 445 Legal_None = 0, |
| 448 Legal_Reg = 1 << 0, // physical register, not stack location | 446 Legal_Reg = 1 << 0, // physical register, not stack location |
| 449 Legal_Imm = 1 << 1, | 447 Legal_Imm = 1 << 1, |
| 450 Legal_Mem = 1 << 2, | 448 Legal_Mem = 1 << 2, |
| 449 Legal_Rematerializable = 1 << 3, |
| 451 Legal_Default = ~Legal_None | 450 Legal_Default = ~Legal_None |
| 452 }; | 451 }; |
| 453 typedef uint32_t LegalMask; | 452 typedef uint32_t LegalMask; |
| 454 Operand *legalize(Operand *From, LegalMask Allowed = Legal_Default, | 453 Operand *legalize(Operand *From, LegalMask Allowed = Legal_Default, |
| 455 RegNumT RegNum = RegNumT()); | 454 RegNumT RegNum = RegNumT()); |
| 456 | 455 |
| 457 Variable *legalizeToVar(Operand *From, RegNumT RegNum = RegNumT()); | 456 Variable *legalizeToVar(Operand *From, RegNumT RegNum = RegNumT()); |
| 458 | 457 |
| 459 Variable *legalizeToReg(Operand *From, RegNumT RegNum = RegNumT()); | 458 Variable *legalizeToReg(Operand *From, RegNumT RegNum = RegNumT()); |
| 460 | 459 |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 explicit TargetHeaderMIPS32(GlobalContext *Ctx); | 726 explicit TargetHeaderMIPS32(GlobalContext *Ctx); |
| 728 | 727 |
| 729 private: | 728 private: |
| 730 ~TargetHeaderMIPS32() = default; | 729 ~TargetHeaderMIPS32() = default; |
| 731 }; | 730 }; |
| 732 | 731 |
| 733 } // end of namespace MIPS32 | 732 } // end of namespace MIPS32 |
| 734 } // end of namespace Ice | 733 } // end of namespace Ice |
| 735 | 734 |
| 736 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H | 735 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H |
| OLD | NEW |