[PATCH] D60927: [WIP][llvm-objdump] Switch between ARM/Thumb based on mapping symbols.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 19 16:38:52 PDT 2019


efriedma created this revision.
efriedma added reviewers: MaskRay, srhines.
Herald added subscribers: rupprecht, mgrang, kristof.beyls, eraman, javed.absar.
Herald added a project: LLVM.

This is basically a rough draft; I'm not sure this is really the best approach.  In particular, I'm not really happy about putting the switching logic into llvm-objdump.cpp; it seems like there should be a better way to refactor the interface so the target-specific logic is somewhere inside the target.

The ARMDisassembler changes allow changing between ARM and Thumb mode based on the MCSubtargetInfo, rather than the Target, which simplifies the other changes a bit.

The patch needs a little more work to handle ELF files that don't have mapping symbols; we need some way to override the default mode.  I guess we could check whether the user specified -triple=thumb?


Repository:
  rL LLVM

https://reviews.llvm.org/D60927

Files:
  lib/Target/ARM/Disassembler/ARMDisassembler.cpp
  test/CodeGen/ARM/inlineasm-switch-mode.ll
  tools/llvm-objdump/llvm-objdump.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60927.195936.patch
Type: text/x-patch
Size: 13151 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190419/82fe62b7/attachment.bin>


More information about the llvm-commits mailing list