mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 07:17:36 +00:00
add a bool for whether .lcomm takes an alignment instead of basing this on "isdarwin".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93852 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -647,17 +647,18 @@ void X86AsmPrinter::printMachineInstruction(const MachineInstr *MI) {
|
||||
}
|
||||
|
||||
void X86AsmPrinter::PrintGlobalVariable(const GlobalVariable* GVar) {
|
||||
const TargetData *TD = TM.getTargetData();
|
||||
|
||||
MCSymbol *GVarSym = GetGlobalValueSymbol(GVar);
|
||||
Constant *C = GVar->getInitializer();
|
||||
const Type *Type = C->getType();
|
||||
|
||||
const TargetData *TD = TM.getTargetData();
|
||||
unsigned Size = TD->getTypeAllocSize(Type);
|
||||
unsigned Align = TD->getPreferredAlignmentLog(GVar);
|
||||
|
||||
printVisibility(GVarSym, GVar->getVisibility());
|
||||
|
||||
if (Subtarget->isTargetELF())
|
||||
if (MAI->hasDotTypeDotSizeDirective())
|
||||
O << "\t.type\t" << *GVarSym << ",@object\n";
|
||||
|
||||
SectionKind GVKind = TargetLoweringObjectFile::getKindForGlobal(GVar, TM);
|
||||
@@ -685,7 +686,7 @@ void X86AsmPrinter::PrintGlobalVariable(const GlobalVariable* GVar) {
|
||||
if (const char *LComm = MAI->getLCOMMDirective()) {
|
||||
if (GVar->hasLocalLinkage()) {
|
||||
O << LComm << *GVarSym << ',' << Size;
|
||||
if (Subtarget->isTargetDarwin())
|
||||
if (MAI->getLCOMMDirectiveTakesAlignment())
|
||||
O << ',' << Align;
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user