[all-commits] [llvm/llvm-project] aac056: [objdump][ARM] Use correct offset when printing AR...

ostannard via All-commits all-commits at lists.llvm.org
Thu Mar 4 03:17:04 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: aac056c528cf139e6881211ee7fe6743c79a68d4
      https://github.com/llvm/llvm-project/commit/aac056c528cf139e6881211ee7fe6743c79a68d4
  Author: Oliver Stannard <oliver.stannard at linaro.org>
  Date:   2021-03-04 (Thu, 04 Mar 2021)

  Changed paths:
    M lld/test/ELF/arm-thunk-many-passes.s
    M llvm/lib/Target/ARM/ARMInstrInfo.td
    M llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
    A llvm/test/tools/llvm-objdump/ELF/ARM/branch-symbols.s

  Log Message:
  -----------
  [objdump][ARM] Use correct offset when printing ARM/Thumb branch targets

llvm-objdump only uses one MCInstrAnalysis object, so if ARM and Thumb
code is mixed in one object, or if an object is disassembled without
explicitly setting the triple to match the ISA used, then branch and
call targets will be printed incorrectly.

This could be fixed by creating two MCInstrAnalysis objects in
llvm-objdump, like we currently do for SubtargetInfo. However, I don't
think there's any reason we need two separate sub-classes of
MCInstrAnalysis, so instead these can be merged into one, and the ISA
determined by checking the opcode of the instruction.

Differential revision: https://reviews.llvm.org/D97766




More information about the All-commits mailing list