For ELF, .comm takes alignment value as the optional 3rd argument. It must be
specified in bytes.
llvm-svn: 26043
diff --git a/llvm/lib/Target/X86/X86AsmPrinter.cpp b/llvm/lib/Target/X86/X86AsmPrinter.cpp
index dd19d9f..1b05691 100644
--- a/llvm/lib/Target/X86/X86AsmPrinter.cpp
+++ b/llvm/lib/Target/X86/X86AsmPrinter.cpp
@@ -105,7 +105,9 @@
O << COMMDirective << name << "," << Size;
} else {
SwitchSection(".local", I);
- O << COMMDirective << name << "," << Size << "," << Align;
+ O << COMMDirective << name << "," << Size;
+ if (COMMDirectiveTakesAlignment)
+ O << "," << (AlignmentIsInBytes ? (1 << Align) : Align);
}
O << "\t\t" << CommentString << " '" << I->getName() << "'\n";
} else {