diff options
author | Michael Kuperstein <michael.m.kuperstein@intel.com> | 2015-07-22 10:49:44 +0000 |
---|---|---|
committer | Michael Kuperstein <michael.m.kuperstein@intel.com> | 2015-07-22 10:49:44 +0000 |
commit | 23d952b61120393fbd1b27c00b24e675a60be391 (patch) | |
tree | d652a613f1e79392d23e1962a685785fbaaee995 /llvm/lib/MC | |
parent | b6d60a69c0e9a8764b7fc4e12048068c5b0ef3c3 (diff) | |
download | bcm5719-llvm-23d952b61120393fbd1b27c00b24e675a60be391.tar.gz bcm5719-llvm-23d952b61120393fbd1b27c00b24e675a60be391.zip |
[X86] Add .intel_syntax noprefix directive to intel-syntax x86 asm output
Patch by: michael.zuckerman@intel.com
Differential Revision: http://reviews.llvm.org/D11223
llvm-svn: 242886
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r-- | llvm/lib/MC/MCAsmStreamer.cpp | 11 | ||||
-rw-r--r-- | llvm/lib/MC/MCStreamer.cpp | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp index 227c937e8d1..ec49058407f 100644 --- a/llvm/lib/MC/MCAsmStreamer.cpp +++ b/llvm/lib/MC/MCAsmStreamer.cpp @@ -78,6 +78,9 @@ public: } EmitCommentsAndEOL(); } + + virtual void EmitSyntaxDirective(); + void EmitCommentsAndEOL(); /// isVerboseAsm - Return true if this streamer supports verbose assembly at @@ -480,6 +483,14 @@ void MCAsmStreamer::EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) { 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); diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp index 7fbbbd95b56..a25cdfa971e 100644 --- a/llvm/lib/MC/MCStreamer.cpp +++ b/llvm/lib/MC/MCStreamer.cpp @@ -467,6 +467,8 @@ void MCStreamer::EmitWinEHHandlerData() { report_fatal_error("Chained unwind areas can't have handlers!"); } +void MCStreamer::EmitSyntaxDirective() {} + void MCStreamer::EmitWinCFIPushReg(unsigned Register) { EnsureValidWinFrameInfo(); |