For ELF, .comm takes alignment value as the optional 3rd argument. It must be
authorEvan Cheng <evan.cheng@apple.com>
Tue, 7 Feb 2006 21:54:08 +0000 (21:54 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 7 Feb 2006 21:54:08 +0000 (21:54 +0000)
specified in bytes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26043 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86AsmPrinter.cpp

index dd19d9fd2a0ca8e906e627049b4b96e4a537b4c7..1b05691a0be181df961123ed72c0a4b689e31ef7 100644 (file)
@@ -105,7 +105,9 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
           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 {