[PATCH] D62592: [RISCV] Add assembler support for RVC HINT instructions

Luís Marques via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 17 06:57:27 PDT 2019


luismarques marked an inline comment as done.
luismarques added inline comments.
Herald added a subscriber: Jim.


================
Comment at: lib/Target/RISCV/RISCVInstrInfoC.td:577
+  let Inst{6-2} = imm{4-0};
+  let isAsmParserOnly = 1;
+}
----------------
shiva0217 wrote:
> We could remove "let isAsmParserOnly = 1" and add "let Inst{11} = 0". So tablegen won't complain the encoding ambiguous and will invoke DecodeGPRX0RegisterClass in RISCVGenDisassemblerTables.inc.
If I do that then the (non-hint) `c.li` instruction instruction is decoded as `<unknown>`.
To correctly decode both the regular and the hint instructions wouldn't we need to add support for decoding based on the operand classes?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D62592





More information about the llvm-commits mailing list