[llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Feb 8 15:42:08 PST 2006
Changes in directory llvm/lib/CodeGen:
AsmPrinter.cpp updated: 1.48 -> 1.49
---
Log message:
Add support for assembler directives that wrap inline asm
---
Diffs of the changes: (+4 -1)
AsmPrinter.cpp | 5 ++++-
1 files changed, 4 insertions(+), 1 deletion(-)
Index: llvm/lib/CodeGen/AsmPrinter.cpp
diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.48 llvm/lib/CodeGen/AsmPrinter.cpp:1.49
--- llvm/lib/CodeGen/AsmPrinter.cpp:1.48 Mon Feb 6 16:17:23 2006
+++ llvm/lib/CodeGen/AsmPrinter.cpp Wed Feb 8 17:41:56 2006
@@ -32,6 +32,8 @@
GlobalVarAddrSuffix(""),
FunctionAddrPrefix(""),
FunctionAddrSuffix(""),
+ InlineAsmStart("#APP\n"),
+ InlineAsmEnd("#NO_APP\n"),
ZeroDirective("\t.zero\t"),
AsciiDirective("\t.ascii\t"),
AscizDirective("\t.asciz\t"),
@@ -482,6 +484,7 @@
/// printInlineAsm - This method formats and prints the specified machine
/// instruction that is an inline asm.
void AsmPrinter::printInlineAsm(const MachineInstr *MI) const {
+ O << InlineAsmStart;
unsigned NumOperands = MI->getNumOperands();
// Count the number of register definitions.
@@ -613,7 +616,7 @@
break;
}
}
- O << "\n";
+ O << "\n" << InlineAsmEnd;
}
/// PrintAsmOperand - Print the specified operand of MI, an INLINEASM
More information about the llvm-commits
mailing list