| OLD | NEW |
| 1 // | 1 // |
| 2 // The Subzero Code Generator | 2 // The Subzero Code Generator |
| 3 // | 3 // |
| 4 // This file is distributed under the University of Illinois Open Source | 4 // This file is distributed under the University of Illinois Open Source |
| 5 // License. See LICENSE.TXT for details. | 5 // License. See LICENSE.TXT for details. |
| 6 // | 6 // |
| 7 //===----------------------------------------------------------------------===// | 7 //===----------------------------------------------------------------------===// |
| 8 /// | 8 /// |
| 9 /// \file | 9 /// \file |
| 10 /// \brief Implements the TargetLoweringMIPS32 class, which consists almost | 10 /// \brief Implements the TargetLoweringMIPS32 class, which consists almost |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 assert(ClassNum < RCMIPS32_NUM); | 77 assert(ClassNum < RCMIPS32_NUM); |
| 78 switch (ClassNum) { | 78 switch (ClassNum) { |
| 79 default: | 79 default: |
| 80 assert(C < RC_Target); | 80 assert(C < RC_Target); |
| 81 return regClassString(C); | 81 return regClassString(C); |
| 82 // Add handling of new register classes below. | 82 // Add handling of new register classes below. |
| 83 } | 83 } |
| 84 } | 84 } |
| 85 | 85 |
| 86 // Stack alignment | 86 // Stack alignment |
| 87 constexpr uint32_t MIPS32_STACK_ALIGNMENT_BYTES = 8; | 87 constexpr uint32_t MIPS32_STACK_ALIGNMENT_BYTES = 16; |
| 88 | 88 |
| 89 // Value is in bytes. Return Value adjusted to the next highest multiple of the | 89 // Value is in bytes. Return Value adjusted to the next highest multiple of the |
| 90 // stack alignment required for the given type. | 90 // stack alignment required for the given type. |
| 91 uint32_t applyStackAlignmentTy(uint32_t Value, Type Ty) { | 91 uint32_t applyStackAlignmentTy(uint32_t Value, Type Ty) { |
| 92 size_t typeAlignInBytes = typeWidthInBytes(Ty); | 92 size_t typeAlignInBytes = typeWidthInBytes(Ty); |
| 93 if (isVectorType(Ty)) | 93 if (isVectorType(Ty)) |
| 94 UnimplementedError(getFlags()); | 94 UnimplementedError(getFlags()); |
| 95 return Utils::applyAlignment(Value, typeAlignInBytes); | 95 return Utils::applyAlignment(Value, typeAlignInBytes); |
| 96 } | 96 } |
| 97 | 97 |
| (...skipping 3521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3619 Str << "\t.set\t" | 3619 Str << "\t.set\t" |
| 3620 << "nomips16\n"; | 3620 << "nomips16\n"; |
| 3621 } | 3621 } |
| 3622 | 3622 |
| 3623 SmallBitVector TargetMIPS32::TypeToRegisterSet[RCMIPS32_NUM]; | 3623 SmallBitVector TargetMIPS32::TypeToRegisterSet[RCMIPS32_NUM]; |
| 3624 SmallBitVector TargetMIPS32::TypeToRegisterSetUnfiltered[RCMIPS32_NUM]; | 3624 SmallBitVector TargetMIPS32::TypeToRegisterSetUnfiltered[RCMIPS32_NUM]; |
| 3625 SmallBitVector TargetMIPS32::RegisterAliases[RegMIPS32::Reg_NUM]; | 3625 SmallBitVector TargetMIPS32::RegisterAliases[RegMIPS32::Reg_NUM]; |
| 3626 | 3626 |
| 3627 } // end of namespace MIPS32 | 3627 } // end of namespace MIPS32 |
| 3628 } // end of namespace Ice | 3628 } // end of namespace Ice |
| OLD | NEW |