[llvm-commits] [llvm] r78737 - in /llvm/trunk/lib: CodeGen/AsmPrinter/AsmPrinter.cpp Target/ARM/ARMTargetAsmInfo.cpp Target/Blackfin/BlackfinTargetAsmInfo.cpp Target/CellSPU/SPUTargetAsmInfo.cpp Target/DarwinTargetAsmInfo.cpp Target/PowerPC/PPCTargetAsmInfo.cpp Target/TargetAsmInfo.cpp Target/X86/X86TargetAsmInfo.cpp
Chris Lattner
sabre at nondot.org
Tue Aug 11 15:39:40 PDT 2009
Author: lattner
Date: Tue Aug 11 17:39:40 2009
New Revision: 78737
URL: http://llvm.org/viewvc/llvm-project?rev=78737&view=rev
Log:
Change the asmprinter to print the comment character before the
"inlineasmstart/end" strings so that the contents of the directive
are separate from the comment character. This lets elf targets
get #APP/#NOAPP for free even if they don't use "#" as the comment
character. This also allows hoisting the darwin stuff up to the
shared TAI class.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp
llvm/trunk/lib/Target/Blackfin/BlackfinTargetAsmInfo.cpp
llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.cpp
llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp
llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
llvm/trunk/lib/Target/TargetAsmInfo.cpp
llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=78737&r1=78736&r2=78737&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Tue Aug 11 17:39:40 2009
@@ -1336,11 +1336,12 @@
// If this asmstr is empty, just print the #APP/#NOAPP markers.
// These are useful to see where empty asm's wound up.
if (AsmStr[0] == 0) {
- O << TAI->getInlineAsmStart() << "\n\t" << TAI->getInlineAsmEnd() << '\n';
+ O << TAI->getCommentString() << TAI->getInlineAsmStart() << "\n\t";
+ O << TAI->getCommentString() << TAI->getInlineAsmEnd() << '\n';
return;
}
- O << TAI->getInlineAsmStart() << "\n\t";
+ O << TAI->getCommentString() << TAI->getInlineAsmStart() << "\n\t";
// The variant of the current asmprinter.
int AsmPrinterVariant = TAI->getAssemblerDialect();
@@ -1511,7 +1512,7 @@
}
}
}
- O << "\n\t" << TAI->getInlineAsmEnd() << '\n';
+ O << "\n\t" << TAI->getCommentString() << TAI->getInlineAsmEnd() << '\n';
}
/// printImplicitDef - This method prints the specified machine instruction
Modified: llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp?rev=78737&r1=78736&r2=78737&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp Tue Aug 11 17:39:40 2009
@@ -45,9 +45,6 @@
Data64bitsDirective = 0;
CommentString = "@";
COMMDirectiveTakesAlignment = false;
- InlineAsmStart = "@ InlineAsm Start";
- InlineAsmEnd = "@ InlineAsm End";
-
SupportsDebugInformation = true;
// Exceptions handling
@@ -60,8 +57,6 @@
Data64bitsDirective = 0;
CommentString = "@";
COMMDirectiveTakesAlignment = false;
- InlineAsmStart = "@ InlineAsm Start";
- InlineAsmEnd = "@ InlineAsm End";
NeedsSet = false;
HasLEB128 = true;
Modified: llvm/trunk/lib/Target/Blackfin/BlackfinTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Blackfin/BlackfinTargetAsmInfo.cpp?rev=78737&r1=78736&r2=78737&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Blackfin/BlackfinTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/Blackfin/BlackfinTargetAsmInfo.cpp Tue Aug 11 17:39:40 2009
@@ -18,6 +18,4 @@
BlackfinTargetAsmInfo::BlackfinTargetAsmInfo() {
GlobalPrefix = "_";
CommentString = "//";
- InlineAsmStart = "// APP";
- InlineAsmEnd = "// NO_APP";
}
Modified: llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.cpp?rev=78737&r1=78736&r2=78737&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.cpp Tue Aug 11 17:39:40 2009
@@ -20,8 +20,6 @@
Data64bitsDirective = "\t.quad\t";
AlignmentIsInBytes = false;
LCOMMDirective = "\t.lcomm\t";
- InlineAsmStart = "# InlineAsm Start";
- InlineAsmEnd = "# InlineAsm End";
PCSymbol = ".";
CommentString = "#";
Modified: llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp?rev=78737&r1=78736&r2=78737&view=diff
==============================================================================
--- llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp Tue Aug 11 17:39:40 2009
@@ -27,6 +27,8 @@
HasSingleParameterDotFile = false;
AlignmentIsInBytes = false;
+ InlineAsmStart = " InlineAsm Start";
+ InlineAsmEnd = " InlineAsm End";
// In non-PIC modes, emit a special label before jump tables so that the
// linker can perform more accurate dead code stripping. We do not check the
Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp?rev=78737&r1=78736&r2=78737&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp Tue Aug 11 17:39:40 2009
@@ -29,8 +29,6 @@
if (!isPPC64)
Data64bitsDirective = 0; // we can't emit a 64-bit unit
- InlineAsmStart = "# InlineAsm Start";
- InlineAsmEnd = "# InlineAsm End";
AssemblerDialect = Subtarget->getAsmFlavor();
}
@@ -63,8 +61,6 @@
Data64bitsDirective = isPPC64 ? "\t.quad\t" : 0;
AlignmentIsInBytes = false;
LCOMMDirective = "\t.lcomm\t";
- InlineAsmStart = "# InlineAsm Start";
- InlineAsmEnd = "# InlineAsm End";
AssemblerDialect = Subtarget->getAsmFlavor();
}
Modified: llvm/trunk/lib/Target/TargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetAsmInfo.cpp?rev=78737&r1=78736&r2=78737&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/TargetAsmInfo.cpp Tue Aug 11 17:39:40 2009
@@ -37,8 +37,8 @@
PersonalityPrefix = "";
PersonalitySuffix = "";
NeedsIndirectEncoding = false;
- InlineAsmStart = "#APP";
- InlineAsmEnd = "#NO_APP";
+ InlineAsmStart = "APP";
+ InlineAsmEnd = "NO_APP";
AssemblerDialect = 0;
AllowQuotesInName = false;
ZeroDirective = "\t.zero\t";
Modified: llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp?rev=78737&r1=78736&r2=78737&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp Tue Aug 11 17:39:40 2009
@@ -61,8 +61,6 @@
PersonalitySuffix = "$non_lazy_ptr";
}
- InlineAsmStart = "## InlineAsm Start";
- InlineAsmEnd = "## InlineAsm End";
CommentString = "##";
PCSymbol = ".";
@@ -113,9 +111,6 @@
GlobalPrefix = "_";
CommentString = ";";
- InlineAsmStart = "; InlineAsm Start";
- InlineAsmEnd = "; InlineAsm End";
-
PrivateGlobalPrefix = "$";
AlignDirective = "\tALIGN\t";
ZeroDirective = "\tdb\t";
More information about the llvm-commits
mailing list