[all-commits] [llvm/llvm-project] 4adcff: [ARM] Fix llvm-objdump disassembly of armv7m objec...

Eli Friedman via All-commits all-commits at lists.llvm.org
Wed Jul 28 11:43:49 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4adcff0b7004dc3c81fb8b1104044a188db8aa89
      https://github.com/llvm/llvm-project/commit/4adcff0b7004dc3c81fb8b1104044a188db8aa89
  Author: Eli Friedman <efriedma at quicinc.com>
  Date:   2021-07-28 (Wed, 28 Jul 2021)

  Changed paths:
    M llvm/lib/Object/ELFObjectFile.cpp
    M llvm/test/tools/llvm-objdump/ELF/ARM/v5t-subarch.s
    M llvm/test/tools/llvm-objdump/ELF/ARM/v5te-subarch.s
    M llvm/test/tools/llvm-objdump/ELF/ARM/v5tej-subarch.s
    M llvm/test/tools/llvm-objdump/ELF/ARM/v6-neg-subfeatures.s
    M llvm/test/tools/llvm-objdump/ELF/ARM/v6-subarch.s
    M llvm/test/tools/llvm-objdump/ELF/ARM/v6-subfeatures.s
    M llvm/test/tools/llvm-objdump/ELF/ARM/v6k-subarch.s
    M llvm/test/tools/llvm-objdump/ELF/ARM/v6m-subarch.s
    M llvm/test/tools/llvm-objdump/ELF/ARM/v6t2-subarch.s
    M llvm/test/tools/llvm-objdump/ELF/ARM/v7a-neg-subfeature.s
    M llvm/test/tools/llvm-objdump/ELF/ARM/v7a-subfeature.s
    M llvm/test/tools/llvm-objdump/ELF/ARM/v7m-neg-subfeatures.s
    M llvm/test/tools/llvm-objdump/ELF/ARM/v7m-subarch.s
    M llvm/test/tools/llvm-objdump/ELF/ARM/v7m-subfeatures.s
    M llvm/test/tools/llvm-objdump/ELF/ARM/v8a-subarch.s
    M llvm/test/tools/llvm-objdump/ELF/ARM/v8r-subarch.s

  Log Message:
  -----------
  [ARM] Fix llvm-objdump disassembly of armv7m object files.

Apparently, the features were getting mixed up, so we'd try to
disassemble in ARM mode. Fix sub-architecture detection to compute the
correct triple if we're detecting it automatically, so the user doesn't
need to pass --triple=thumb etc.

It's possible we should be somehow tying the "+thumb-mode" target
feature more directly to Tag_CPU_arch_profile? But this seems to work
reasonably well, anyway.

While I'm here, fix up the other llvm-objdump tests that were explicitly
specifying an ARM triple; that shouldn't be necessary.

Differential Revision: https://reviews.llvm.org/D106912




More information about the All-commits mailing list