Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: src/IceTargetLoweringMIPS32.cpp

Issue 1179313004: Fix a bug that would cause subzero to fail when --threads=0. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses codereview comments. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 } 664 }
665 665
666 void ConstantUndef::emit(GlobalContext *) const { 666 void ConstantUndef::emit(GlobalContext *) const {
667 llvm_unreachable("undef value encountered by emitter."); 667 llvm_unreachable("undef value encountered by emitter.");
668 } 668 }
669 */ 669 */
670 670
671 TargetDataMIPS32::TargetDataMIPS32(GlobalContext *Ctx) 671 TargetDataMIPS32::TargetDataMIPS32(GlobalContext *Ctx)
672 : TargetDataLowering(Ctx) {} 672 : TargetDataLowering(Ctx) {}
673 673
674 void TargetDataMIPS32::lowerGlobals( 674 void TargetDataMIPS32::lowerGlobals(const VariableDeclarationList &Vars,
675 std::unique_ptr<VariableDeclarationList> Vars) { 675 const IceString &SectionSuffix) {
676 switch (Ctx->getFlags().getOutFileType()) { 676 switch (Ctx->getFlags().getOutFileType()) {
677 case FT_Elf: { 677 case FT_Elf: {
678 ELFObjectWriter *Writer = Ctx->getObjectWriter(); 678 ELFObjectWriter *Writer = Ctx->getObjectWriter();
679 Writer->writeDataSection(*Vars, llvm::ELF::R_MIPS_GLOB_DAT); 679 Writer->writeDataSection(Vars, llvm::ELF::R_MIPS_GLOB_DAT, SectionSuffix);
680 } break; 680 } break;
681 case FT_Asm: 681 case FT_Asm:
682 case FT_Iasm: { 682 case FT_Iasm: {
683 const IceString &TranslateOnly = Ctx->getFlags().getTranslateOnly(); 683 const IceString &TranslateOnly = Ctx->getFlags().getTranslateOnly();
684 OstreamLocker L(Ctx); 684 OstreamLocker L(Ctx);
685 for (const VariableDeclaration *Var : *Vars) { 685 for (const VariableDeclaration *Var : Vars) {
686 if (GlobalContext::matchSymbolName(Var->getName(), TranslateOnly)) { 686 if (GlobalContext::matchSymbolName(Var->getName(), TranslateOnly)) {
687 emitGlobal(*Var); 687 emitGlobal(*Var, SectionSuffix);
688 } 688 }
689 } 689 }
690 } break; 690 } break;
691 } 691 }
692 } 692 }
693 693
694 void TargetDataMIPS32::lowerConstants() { 694 void TargetDataMIPS32::lowerConstants(const IceString &) {
695 if (Ctx->getFlags().getDisableTranslation()) 695 if (Ctx->getFlags().getDisableTranslation())
696 return; 696 return;
697 llvm::report_fatal_error("Not yet implemented"); 697 llvm::report_fatal_error("Not yet implemented");
698 } 698 }
699 699
700 TargetHeaderMIPS32::TargetHeaderMIPS32(GlobalContext *Ctx) 700 TargetHeaderMIPS32::TargetHeaderMIPS32(GlobalContext *Ctx)
701 : TargetHeaderLowering(Ctx) {} 701 : TargetHeaderLowering(Ctx) {}
702 702
703 } // end of namespace Ice 703 } // end of namespace Ice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698