[llvm-dev] Generate MCDisassembler for VLIW?

Zhang via llvm-dev llvm-dev at lists.llvm.org
Sun Dec 27 19:54:25 PST 2020


Hi:
For now I've already successfully generated DisassemblerTable from TableGen with ``-gen-disassembler`` which contains the following function:


```
template<typename InsnType>
static DecodeStatus decodeInstruction(const uint8_t DecodeTable[], MCInst &MI,
                                      InsnType insn, uint64_t Address,
                                      const void *DisAsm,
                                      const MCSubtargetInfo &STI)

```


From my understanding here, insn is supposed to contain the actual instruction.
However in our ISA, instructions can exceed the limit of uint64_t, and passing APInt as InsnType fails to compile because this function calls ``InsnType CurFieldValue = 0`` which is invalid for APInt.
My question is, which type should I use here?




Zhang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201228/7a8ac3c9/attachment.html>


More information about the llvm-dev mailing list