| OLD | NEW |
| 1 //===- subzero/src/IceTargetLoweringMIPS32.cpp - MIPS32 lowering ----------===// | 1 //===- subzero/src/IceTargetLoweringMIPS32.cpp - MIPS32 lowering ----------===// |
| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 if (Ty == IceType_void) | 236 if (Ty == IceType_void) |
| 237 Ty = IceType_i32; | 237 Ty = IceType_i32; |
| 238 if (PhysicalRegisters[Ty].empty()) | 238 if (PhysicalRegisters[Ty].empty()) |
| 239 PhysicalRegisters[Ty].resize(RegMIPS32::Reg_NUM); | 239 PhysicalRegisters[Ty].resize(RegMIPS32::Reg_NUM); |
| 240 assert(RegNum < PhysicalRegisters[Ty].size()); | 240 assert(RegNum < PhysicalRegisters[Ty].size()); |
| 241 Variable *Reg = PhysicalRegisters[Ty][RegNum]; | 241 Variable *Reg = PhysicalRegisters[Ty][RegNum]; |
| 242 if (Reg == nullptr) { | 242 if (Reg == nullptr) { |
| 243 Reg = Func->makeVariable(Ty); | 243 Reg = Func->makeVariable(Ty); |
| 244 Reg->setRegNum(RegNum); | 244 Reg->setRegNum(RegNum); |
| 245 PhysicalRegisters[Ty][RegNum] = Reg; | 245 PhysicalRegisters[Ty][RegNum] = Reg; |
| 246 // Specially mark SP as an "argument" so that it is considered live upon | 246 // Specially mark a named physical register as an "argument" so that it is |
| 247 // function entry. | 247 // considered live upon function entry. Otherwise it's possible to get |
| 248 if (RegNum == RegMIPS32::Reg_SP || RegNum == RegMIPS32::Reg_RA) { | 248 // liveness validation errors for saving callee-save registers. |
| 249 Func->addImplicitArg(Reg); | 249 Func->addImplicitArg(Reg); |
| 250 Reg->setIgnoreLiveness(); | 250 // Don't bother tracking the live range of a named physical register. |
| 251 } | 251 Reg->setIgnoreLiveness(); |
| 252 } | 252 } |
| 253 return Reg; | 253 return Reg; |
| 254 } | 254 } |
| 255 | 255 |
| 256 void TargetMIPS32::emitJumpTable(const Cfg *Func, | 256 void TargetMIPS32::emitJumpTable(const Cfg *Func, |
| 257 const InstJumpTable *JumpTable) const { | 257 const InstJumpTable *JumpTable) const { |
| 258 (void)JumpTable; | 258 (void)JumpTable; |
| 259 UnimplementedError(Func->getContext()->getFlags()); | 259 UnimplementedError(Func->getContext()->getFlags()); |
| 260 } | 260 } |
| 261 | 261 |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 void TargetDataMIPS32::lowerJumpTables() { | 713 void TargetDataMIPS32::lowerJumpTables() { |
| 714 if (Ctx->getFlags().getDisableTranslation()) | 714 if (Ctx->getFlags().getDisableTranslation()) |
| 715 return; | 715 return; |
| 716 UnimplementedError(Ctx->getFlags()); | 716 UnimplementedError(Ctx->getFlags()); |
| 717 } | 717 } |
| 718 | 718 |
| 719 TargetHeaderMIPS32::TargetHeaderMIPS32(GlobalContext *Ctx) | 719 TargetHeaderMIPS32::TargetHeaderMIPS32(GlobalContext *Ctx) |
| 720 : TargetHeaderLowering(Ctx) {} | 720 : TargetHeaderLowering(Ctx) {} |
| 721 | 721 |
| 722 } // end of namespace Ice | 722 } // end of namespace Ice |
| OLD | NEW |