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

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 3 12:53:05 PDT 2021


thakis accepted this revision.
thakis added a comment.
This revision is now accepted and ready to land.

Thanks!

As mentioned in D101761 <https://reviews.llvm.org/D101761>, consider using the code bits there (especially if the plan is to remove the old-style options after the next branch).



================
Comment at: llvm/test/tools/llvm-objdump/X86/syntax-mode.s:4
+# RUN: llvm-objdump -d --no-show-raw-insn -M att %t | FileCheck %s --check-prefix=ATT
+# RUN: llvm-objdump -d --no-show-raw-insn -M intel %t | FileCheck %s --check-prefix=INTEL
+# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s --check-prefix=ATT
----------------
Maybe spell it `-dMIntel` here to cover that spelling


================
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");
----------------
equals_lower() for better objdump compat?


================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:2484
+    }
+    if (V == "intel") {
+      LLVMArgs.push_back("--x86-asm-syntax=intel");
----------------
(same)


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