mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
the latest assembler that runs on powerpc 10.4 machines doesn't
support aligned comm. Detect when compiling for 10.4 and don't emit an alignment for comm. THis will hopefully fix PR8198. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114817 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -282,8 +282,12 @@ void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
|
||||
|
||||
// Handle common symbols.
|
||||
if (GVKind.isCommon()) {
|
||||
unsigned Align = 1 << AlignLog;
|
||||
if (!getObjFileLowering().getCommDirectiveSupportsAlignment())
|
||||
Align = 0;
|
||||
|
||||
// .comm _foo, 42, 4
|
||||
OutStreamer.EmitCommonSymbol(GVSym, Size, 1 << AlignLog);
|
||||
OutStreamer.EmitCommonSymbol(GVSym, Size, Align);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -301,11 +305,15 @@ void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
|
||||
OutStreamer.EmitLocalCommonSymbol(GVSym, Size);
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned Align = 1 << AlignLog;
|
||||
if (!getObjFileLowering().getCommDirectiveSupportsAlignment())
|
||||
Align = 0;
|
||||
|
||||
// .local _foo
|
||||
OutStreamer.EmitSymbolAttribute(GVSym, MCSA_Local);
|
||||
// .comm _foo, 42, 4
|
||||
OutStreamer.EmitCommonSymbol(GVSym, Size, 1 << AlignLog);
|
||||
OutStreamer.EmitCommonSymbol(GVSym, Size, Align);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user