[PATCH] D101695: [llvm-objdump] Add -M {att,intel} as user-facing alternatives to --x86-asm-syntax={att,intel}

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 3 21:53:58 PDT 2021


MaskRay marked an inline comment as done.
MaskRay added inline comments.


================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:2480
+  llvm::erase_if(DisassemblerOptions, [&](StringRef V) {
+    if (V == "att") {
+      LLVMArgs.push_back("--x86-asm-syntax=att");
----------------
hoy wrote:
> MaskRay wrote:
> > MaskRay wrote:
> > > hoy wrote:
> > > > thakis wrote:
> > > > > equals_lower() for better objdump compat?
> > > > Can this be made an alias switch of `OBJDUMP_x86_asm_syntax_att`?
> > > I think GNU objdump uses startswith for case-sensitive "intel" and "att" and ignores unrecognized values.
> > > 
> > > I don't think anyone wants to use "intel*" (other than the unimplemented "intel-mnenomic" so I'll just use rigid `==` here.
> > > Can this be made an alias switch of OBJDUMP_x86_asm_syntax_att?
> > 
> > No. `llvm-objdump --x86-asm-syntax` will retire.
> Or the other way around? The `AsmSyntax` assignments looks a bit redundant. It's fine if you are going to remove the `OBJDUMP_x86_asm` cases later.
No, it is needed to avoid duplicate `--x86-asm-syntax`.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101695/new/

https://reviews.llvm.org/D101695



More information about the llvm-commits mailing list