32-bit immediates require special cares because they go across the normal word (16 bits) boundaries.
This patch also fixes some incorrect disassembler test cases.
Paths
| Differential D142080
[M68k][Disassembler] Use custom decoder for 32-bit immediates ClosedPublic Authored by myhsu on Jan 18 2023, 8:46 PM.
Details Summary 32-bit immediates require special cares because they go across the normal word (16 bits) boundaries. This patch also fixes some incorrect disassembler test cases.
Diff Detail
Event Timelinemyhsu added a parent revision: D142079: [TableGen] Support custom decoders for variable length instructions.Jan 18 2023, 8:46 PM myhsu mentioned this in D137902: [M68k][MC] Make immediate operands relocatable.Jan 18 2023, 8:50 PM barannikov88 added inline comments. This revision is now accepted and ready to land.Jan 18 2023, 9:35 PM This revision was landed with ongoing or failed builds.Jan 24 2023, 10:03 PM Closed by commit rGc40b158ea003: [M68k][Disassembler] Use custom decoder for 32-bit immediates (authored by myhsu). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 491995 llvm/lib/Target/M68k/Disassembler/M68kDisassembler.cpp
llvm/lib/Target/M68k/M68kInstrFormats.td
llvm/lib/Target/M68k/MCTargetDesc/M68kBaseInfo.h
llvm/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.cpp
llvm/test/MC/Disassembler/M68k/arithmetic.txt
llvm/test/MC/Disassembler/M68k/data.txt
|
(nitpick) It would be more reliable to specify template argument (static_cast becomes unnecessary).