| 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 // This file implements the TargetLoweringMIPS32 class, which consists almost | 10 // This file implements the TargetLoweringMIPS32 class, which consists almost |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 | 670 |
| 671 TargetDataMIPS32::TargetDataMIPS32(GlobalContext *Ctx) | 671 TargetDataMIPS32::TargetDataMIPS32(GlobalContext *Ctx) |
| 672 : TargetDataLowering(Ctx) {} | 672 : TargetDataLowering(Ctx) {} |
| 673 | 673 |
| 674 void TargetDataMIPS32::lowerGlobal(const VariableDeclaration &Var) const { | 674 void TargetDataMIPS32::lowerGlobal(const VariableDeclaration &Var) const { |
| 675 (void)Var; | 675 (void)Var; |
| 676 llvm::report_fatal_error("Not yet implemented"); | 676 llvm::report_fatal_error("Not yet implemented"); |
| 677 } | 677 } |
| 678 | 678 |
| 679 void TargetDataMIPS32::lowerGlobals( | 679 void TargetDataMIPS32::lowerGlobals( |
| 680 std::unique_ptr<VariableDeclarationList> Vars) const { | 680 std::unique_ptr<VariableDeclarationList> Vars) { |
| 681 switch (Ctx->getFlags().getOutFileType()) { | 681 switch (Ctx->getFlags().getOutFileType()) { |
| 682 case FT_Elf: { | 682 case FT_Elf: { |
| 683 ELFObjectWriter *Writer = Ctx->getObjectWriter(); | 683 ELFObjectWriter *Writer = Ctx->getObjectWriter(); |
| 684 Writer->writeDataSection(*Vars, llvm::ELF::R_MIPS_GLOB_DAT); | 684 Writer->writeDataSection(*Vars, llvm::ELF::R_MIPS_GLOB_DAT); |
| 685 } break; | 685 } break; |
| 686 case FT_Asm: | 686 case FT_Asm: |
| 687 case FT_Iasm: { | 687 case FT_Iasm: { |
| 688 const IceString &TranslateOnly = Ctx->getFlags().getTranslateOnly(); | 688 const IceString &TranslateOnly = Ctx->getFlags().getTranslateOnly(); |
| 689 OstreamLocker L(Ctx); | 689 OstreamLocker L(Ctx); |
| 690 for (const VariableDeclaration *Var : *Vars) { | 690 for (const VariableDeclaration *Var : *Vars) { |
| 691 if (GlobalContext::matchSymbolName(Var->getName(), TranslateOnly)) { | 691 if (GlobalContext::matchSymbolName(Var->getName(), TranslateOnly)) { |
| 692 lowerGlobal(*Var); | 692 lowerGlobal(*Var); |
| 693 } | 693 } |
| 694 } | 694 } |
| 695 } break; | 695 } break; |
| 696 } | 696 } |
| 697 } | 697 } |
| 698 | 698 |
| 699 void TargetDataMIPS32::lowerConstants() const { | 699 void TargetDataMIPS32::lowerConstants() { |
| 700 if (Ctx->getFlags().getDisableTranslation()) | 700 if (Ctx->getFlags().getDisableTranslation()) |
| 701 return; | 701 return; |
| 702 llvm::report_fatal_error("Not yet implemented"); | 702 llvm::report_fatal_error("Not yet implemented"); |
| 703 } | 703 } |
| 704 | 704 |
| 705 TargetHeaderMIPS32::TargetHeaderMIPS32(GlobalContext *Ctx) | 705 TargetHeaderMIPS32::TargetHeaderMIPS32(GlobalContext *Ctx) |
| 706 : TargetHeaderLowering(Ctx) {} | 706 : TargetHeaderLowering(Ctx) {} |
| 707 | 707 |
| 708 } // end of namespace Ice | 708 } // end of namespace Ice |
| OLD | NEW |