[llvm-commits] [llvm] r54542 - in /llvm/trunk/lib/Target/X86: X86ATTAsmPrinter.cpp X86TargetAsmInfo.cpp
Anton Korobeynikov
asl at math.spbu.ru
Fri Aug 8 11:25:52 PDT 2008
Author: asl
Date: Fri Aug 8 13:25:52 2008
New Revision: 54542
URL: http://llvm.org/viewvc/llvm-project?rev=54542&view=rev
Log:
Generalize
Modified:
llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp
llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp
Modified: llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp?rev=54542&r1=54541&r2=54542&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp Fri Aug 8 13:25:52 2008
@@ -806,10 +806,8 @@
return;
} else {
O << TAI->getCOMMDirective() << name << ',' << Size;
-
- // Leopard and above support aligned common symbols.
- if (Subtarget->getDarwinVers() >= 9)
- O << ',' << Align;
+ if (TAI->getCOMMDirectiveTakesAlignment())
+ O << ',' << (TAI->getAlignmentIsInBytes() ? (1 << Align) : Align);
}
} else {
if (!Subtarget->isTargetCygMing()) {
Modified: llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp?rev=54542&r1=54541&r2=54542&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp Fri Aug 8 13:25:52 2008
@@ -126,7 +126,8 @@
X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
X86TargetAsmInfo(TM), DarwinTargetAsmInfo(TM) {
- bool is64Bit = DTM->getSubtarget<X86Subtarget>().is64Bit();
+ const X86Subtarget* Subtarget = &DTM->getSubtarget<X86Subtarget>();
+ bool is64Bit = Subtarget->is64Bit();
AlignmentIsInBytes = false;
TextAlignFillValue = 0x90;
@@ -156,7 +157,8 @@
LCOMMDirective = "\t.lcomm\t";
SwitchToSectionDirective = "\t.section ";
StringConstantPrefix = "\1LC";
- COMMDirectiveTakesAlignment = false;
+ // Leopard and above support aligned common symbols.
+ COMMDirectiveTakesAlignment = (Subtarget->getDarwinVers() >= 9);
HasDotTypeDotSizeDirective = false;
if (TM.getRelocationModel() == Reloc::Static) {
StaticCtorsSection = ".constructor";
More information about the llvm-commits
mailing list