Patch by: michael.zuckerman@intel.com
Differential Revision: http://reviews.llvm.org/D11223
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242886
91177308-0d34-0410-b5e6-
96231b3b80d8
virtual void EmitWinEHHandler(const MCSymbol *Sym, bool Unwind, bool Except);
virtual void EmitWinEHHandlerData();
+ virtual void EmitSyntaxDirective();
+
/// \brief Emit the given \p Instruction into the current section.
virtual void EmitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI);
}
EmitCommentsAndEOL();
}
+
+ virtual void EmitSyntaxDirective();
+
void EmitCommentsAndEOL();
/// isVerboseAsm - Return true if this streamer supports verbose assembly at
EmitEOL();
}
+void MCAsmStreamer::EmitSyntaxDirective() {
+ if (MAI->getAssemblerDialect() == 1)
+ OS << "\t.intel_syntax noprefix\n";
+ // FIXME: Currently emit unprefix'ed registers.
+ // The intel_syntax directive has one optional argument
+ // with may have a value of prefix or noprefix.
+}
+
void MCAsmStreamer::BeginCOFFSymbolDef(const MCSymbol *Symbol) {
OS << "\t.def\t ";
Symbol->print(OS, MAI);
report_fatal_error("Chained unwind areas can't have handlers!");
}
+void MCStreamer::EmitSyntaxDirective() {}
+
void MCStreamer::EmitWinCFIPushReg(unsigned Register) {
EnsureValidWinFrameInfo();
S, MCConstantExpr::create(int64_t(1), MMI->getContext()));
}
}
+ OutStreamer->EmitSyntaxDirective();
}
static void
--- /dev/null
+; RUN: llc -x86-asm-syntax=intel < %s | FileCheck %s -check-prefix=INTEL
+; RUN: llc -x86-asm-syntax=att < %s | FileCheck %s -check-prefix=ATT
+
+; INTEL: .intel_syntax noprefix
+; ATT-NOT: .intel_syntax noprefix
+define i32 @test() {
+entry:
+ ret i32 0
+}