[PATCH] D142080: [M68k][Disassembler] Use custom decoder for 32-bit immediates

Sergei Barannikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 18 21:35:14 PST 2023


barannikov88 accepted this revision.
barannikov88 added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Target/M68k/Disassembler/M68kDisassembler.cpp:100
+  auto Imm = static_cast<uint32_t>(Imm64);
+  Inst.addOperand(MCOperand::createImm(M68k::swapWord(Imm)));
+  return DecodeStatus::Success;
----------------
(nitpick) It would be more reliable to specify template argument (static_cast becomes unnecessary).



================
Comment at: llvm/lib/Target/M68k/MCTargetDesc/M68kBaseInfo.h:24
 #include "llvm/Support/DataTypes.h"
+#include "llvm/Support/EndianStream.h"
 #include "llvm/Support/ErrorHandling.h"
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142080



More information about the llvm-commits mailing list