aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-02-08 23:41:56 +0000
committerChris Lattner <sabre@nondot.org>2006-02-08 23:41:56 +0000
commitd6c65ea92449bfba377baccf9b15d9346e96a029 (patch)
treef8a10d75e03e172d69be6f69cf82cf3d39f3927f /lib/CodeGen/AsmPrinter.cpp
parent6f4a072e1f41fb2d0392ab818266efe8120c5a03 (diff)
Add support for assembler directives that wrap inline asm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26065 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp
index 6fa6623550..263b35cf4d 100644
--- a/lib/CodeGen/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter.cpp
@@ -32,6 +32,8 @@ AsmPrinter::AsmPrinter(std::ostream &o, TargetMachine &tm)
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 @@ void AsmPrinter::EmitGlobalConstant(const Constant *CV) {
/// 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 @@ void AsmPrinter::printInlineAsm(const MachineInstr *MI) const {
break;
}
}
- O << "\n";
+ O << "\n" << InlineAsmEnd;
}
/// PrintAsmOperand - Print the specified operand of MI, an INLINEASM