diff options
Diffstat (limited to 'lib/Target/XCore')
-rw-r--r-- | lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp | 22 | ||||
-rw-r--r-- | lib/Target/XCore/MCSectionXCore.cpp | 2 | ||||
-rw-r--r-- | lib/Target/XCore/MCSectionXCore.h | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp b/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp index bf32d69784..9ee0e86da1 100644 --- a/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp +++ b/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp @@ -97,7 +97,7 @@ namespace { void XCoreAsmPrinter:: emitGlobalDirective(const std::string &name) { - O << TAI->getGlobalDirective() << name; + O << MAI->getGlobalDirective() << name; O << "\n"; } @@ -117,12 +117,12 @@ emitArrayBound(const std::string &name, const GlobalVariable *GV) if (const ArrayType *ATy = dyn_cast<ArrayType>( cast<PointerType>(GV->getType())->getElementType())) { - O << TAI->getGlobalDirective() << name << ".globound" << "\n"; - O << TAI->getSetDirective() << name << ".globound" << "," + O << MAI->getGlobalDirective() << name << ".globound" << "\n"; + O << MAI->getSetDirective() << name << ".globound" << "," << ATy->getNumElements() << "\n"; if (GV->hasWeakLinkage() || GV->hasLinkOnceLinkage()) { // TODO Use COMDAT groups for LinkOnceLinkage - O << TAI->getWeakDefDirective() << name << ".globound" << "\n"; + O << MAI->getWeakDefDirective() << name << ".globound" << "\n"; } } } @@ -156,7 +156,7 @@ void XCoreAsmPrinter::PrintGlobalVariable(const GlobalVariable *GV) { emitGlobalDirective(name); // TODO Use COMDAT groups for LinkOnceLinkage if (GV->hasWeakLinkage() || GV->hasLinkOnceLinkage()) { - O << TAI->getWeakDefDirective() << name << "\n"; + O << MAI->getWeakDefDirective() << name << "\n"; } // FALL THROUGH case GlobalValue::InternalLinkage: @@ -179,7 +179,7 @@ void XCoreAsmPrinter::PrintGlobalVariable(const GlobalVariable *GV) { if (GV->isThreadLocal()) { Size *= MaxThreads; } - if (TAI->hasDotTypeDotSizeDirective()) { + if (MAI->hasDotTypeDotSizeDirective()) { O << "\t.type " << name << ",@object\n"; O << "\t.size " << name << "," << Size << "\n"; } @@ -225,13 +225,13 @@ void XCoreAsmPrinter::emitFunctionStart(MachineFunction &MF) { case Function::WeakAnyLinkage: case Function::WeakODRLinkage: // TODO Use COMDAT groups for LinkOnceLinkage - O << TAI->getGlobalDirective() << CurrentFnName << "\n"; - O << TAI->getWeakDefDirective() << CurrentFnName << "\n"; + O << MAI->getGlobalDirective() << CurrentFnName << "\n"; + O << MAI->getWeakDefDirective() << CurrentFnName << "\n"; break; } // (1 << 1) byte aligned EmitAlignment(MF.getAlignment(), F, 1); - if (TAI->hasDotTypeDotSizeDirective()) { + if (MAI->hasDotTypeDotSizeDirective()) { O << "\t.type " << CurrentFnName << ",@function\n"; } O << CurrentFnName << ":\n"; @@ -331,11 +331,11 @@ void XCoreAsmPrinter::printOperand(const MachineInstr *MI, int opNum) { O << MO.getSymbolName(); break; case MachineOperand::MO_ConstantPoolIndex: - O << TAI->getPrivateGlobalPrefix() << "CPI" << getFunctionNumber() + O << MAI->getPrivateGlobalPrefix() << "CPI" << getFunctionNumber() << '_' << MO.getIndex(); break; case MachineOperand::MO_JumpTableIndex: - O << TAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber() + O << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber() << '_' << MO.getIndex(); break; default: diff --git a/lib/Target/XCore/MCSectionXCore.cpp b/lib/Target/XCore/MCSectionXCore.cpp index a40f0326a5..5acceafe9e 100644 --- a/lib/Target/XCore/MCSectionXCore.cpp +++ b/lib/Target/XCore/MCSectionXCore.cpp @@ -26,7 +26,7 @@ MCSectionXCore::Create(const StringRef &Section, unsigned Type, /// PrintTargetSpecificSectionFlags - This handles the XCore-specific cp/dp /// section flags. -void MCSectionXCore::PrintTargetSpecificSectionFlags(const MCAsmInfo &TAI, +void MCSectionXCore::PrintTargetSpecificSectionFlags(const MCAsmInfo &MAI, raw_ostream &OS) const { if (getFlags() & MCSectionXCore::SHF_CP_SECTION) OS << 'c'; diff --git a/lib/Target/XCore/MCSectionXCore.h b/lib/Target/XCore/MCSectionXCore.h index 7396f4e4c1..02f8f95572 100644 --- a/lib/Target/XCore/MCSectionXCore.h +++ b/lib/Target/XCore/MCSectionXCore.h @@ -44,7 +44,7 @@ public: /// PrintTargetSpecificSectionFlags - This handles the XCore-specific cp/dp /// section flags. - virtual void PrintTargetSpecificSectionFlags(const MCAsmInfo &TAI, + virtual void PrintTargetSpecificSectionFlags(const MCAsmInfo &MAI, raw_ostream &OS) const; }; |