| 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 if (PhysicalRegisters[Ty].empty()) | 239 if (PhysicalRegisters[Ty].empty()) |
| 240 PhysicalRegisters[Ty].resize(RegMIPS32::Reg_NUM); | 240 PhysicalRegisters[Ty].resize(RegMIPS32::Reg_NUM); |
| 241 assert(RegNum < PhysicalRegisters[Ty].size()); | 241 assert(RegNum < PhysicalRegisters[Ty].size()); |
| 242 Variable *Reg = PhysicalRegisters[Ty][RegNum]; | 242 Variable *Reg = PhysicalRegisters[Ty][RegNum]; |
| 243 if (Reg == nullptr) { | 243 if (Reg == nullptr) { |
| 244 Reg = Func->makeVariable(Ty); | 244 Reg = Func->makeVariable(Ty); |
| 245 Reg->setRegNum(RegNum); | 245 Reg->setRegNum(RegNum); |
| 246 PhysicalRegisters[Ty][RegNum] = Reg; | 246 PhysicalRegisters[Ty][RegNum] = Reg; |
| 247 // Specially mark SP as an "argument" so that it is considered | 247 // Specially mark SP as an "argument" so that it is considered |
| 248 // live upon function entry. | 248 // live upon function entry. |
| 249 if (RegNum == RegMIPS32::Reg_SP) { | 249 if (RegNum == RegMIPS32::Reg_SP || RegNum == RegMIPS32::Reg_RA) { |
| 250 Func->addImplicitArg(Reg); | 250 Func->addImplicitArg(Reg); |
| 251 Reg->setIgnoreLiveness(); | 251 Reg->setIgnoreLiveness(); |
| 252 } | 252 } |
| 253 } | 253 } |
| 254 return Reg; | 254 return Reg; |
| 255 } | 255 } |
| 256 | 256 |
| 257 void TargetMIPS32::emitJumpTable(const Cfg *Func, | 257 void TargetMIPS32::emitJumpTable(const Cfg *Func, |
| 258 const InstJumpTable *JumpTable) const { | 258 const InstJumpTable *JumpTable) const { |
| 259 (void)JumpTable; | 259 (void)JumpTable; |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 void TargetDataMIPS32::lowerJumpTables() { | 714 void TargetDataMIPS32::lowerJumpTables() { |
| 715 if (Ctx->getFlags().getDisableTranslation()) | 715 if (Ctx->getFlags().getDisableTranslation()) |
| 716 return; | 716 return; |
| 717 UnimplementedError(Ctx->getFlags()); | 717 UnimplementedError(Ctx->getFlags()); |
| 718 } | 718 } |
| 719 | 719 |
| 720 TargetHeaderMIPS32::TargetHeaderMIPS32(GlobalContext *Ctx) | 720 TargetHeaderMIPS32::TargetHeaderMIPS32(GlobalContext *Ctx) |
| 721 : TargetHeaderLowering(Ctx) {} | 721 : TargetHeaderLowering(Ctx) {} |
| 722 | 722 |
| 723 } // end of namespace Ice | 723 } // end of namespace Ice |
| OLD | NEW |