[PATCH] D142865: [RISCV] Use custom operand parsing for FenceArg.

Fraser Cormack via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 30 03:39:48 PST 2023


frasercrmck added inline comments.


================
Comment at: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:1854-1865
+    case 'i':
+      Imm |= RISCVFenceField::I;
+      break;
+    case 'o':
+      Imm |= RISCVFenceField::O;
+      break;
+    case 'r':
----------------
luismarques wrote:
> In a follow-up patch, we should reject repeated letters, like `iiorrrrrw`. Binutils seems to reject that, which IMO is the right decision.
I took the `c <= Prev` check below to do just that


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142865



More information about the llvm-commits mailing list