[PATCH] D146663: [RISCV] Add .insn support compressed formats.

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 22 14:43:22 PDT 2023


jrtc27 added inline comments.


================
Comment at: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:1569
+
+  Error(S, "opcode must be in the range [0, 2]");
+  return MatchOperand_ParseFail;
----------------
This is a slightly weird error to give in this case... then again so is the non-C equivalent by the looks of it


================
Comment at: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:2515
+
+  return Format == "cr" || Format == "ci" || Format == "ciw" || Format == "css" || Format == "cl" || Format == "cs" || Format == "ca" || Format == "cb" || Format == "cj";
+}
----------------
Wrap?


================
Comment at: llvm/test/MC/RISCV/insn_c.s:1
+# RUN: llvm-mc %s -triple=riscv32 -mattr=+f,+c -riscv-no-aliases -show-encoding \
+# RUN:     | FileCheck -check-prefixes=CHECK-ASM %s
----------------
Test errors?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146663



More information about the llvm-commits mailing list