[llvm] [MC][X86/M68k] Emit syntax directive for AT&T (PR #167234)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 10 09:55:16 PST 2025


================
@@ -190,7 +190,9 @@ void M68kAsmPrinter::emitFunctionBodyStart() {}
 void M68kAsmPrinter::emitFunctionBodyEnd() {}
 
 void M68kAsmPrinter::emitStartOfAsmFile(Module &M) {
-  OutStreamer->emitSyntaxDirective();
+  const bool IntelSyntax{MAI->getAssemblerDialect() == InlineAsm::AD_Intel};
+  OutStreamer->emitSyntaxDirective(IntelSyntax ? "intel" : "att",
----------------
mshockwave wrote:

I don't think `.att_syntax` is a universal accepted directive for m68k. For example m68k GNU as does not recognize it.

https://github.com/llvm/llvm-project/pull/167234


More information about the llvm-commits mailing list