[PATCH] D97766: [objdump][ARM] Use correct offset when printing ARM/Thumb branch targets

Simon Tatham via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 2 09:36:30 PST 2021


simon_tatham added inline comments.


================
Comment at: llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp:423
+      OpId = 0;
+      Offset = 8;
+      break;
----------------
Is it possible to find out from the `MCInstrDesc` whether something's an Arm or a Thumb instruction? If so, you could set `Offset` based on that, and then you wouldn't have to get it right in each individual switch case, including future updates.

It //looks// as if `(Desc.TSFlags & FormMask) == ThumbFrm` ought to do that, but that is based on quite a quick look, so I might be wrong about what it means.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97766



More information about the llvm-commits mailing list