[PATCH] D141984: [RISCV][MC] Add support for experimental zfa extension(FLI instruction not included)

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 31 13:04:36 PST 2023


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:1859
 
+OperandMatchResultTy RISCVAsmParser::parseRTZArg(OperandVector &Operands) {
+  if (getLexer().isNot(AsmToken::Identifier)) {
----------------
Can we reuse parseFRMArg and check the value in isRTZArg()? Add a `DiagnosticType` to `RTZArg` and diagnose in RISCVAsmParser::MatchAndEmitInstruction


================
Comment at: llvm/test/MC/RISCV/rv32zfa-valid.s:38
+# CHECK-ASM: encoding: [0xd3,0x74,0x49,0x40]
+fround.s fs1, fs2, dyn
+
----------------
Need tests that the "dyn" argument is optional. This used to require InstAliases to be added to the .td file, but in the last 24 hours I modified FRMArg to be an `Optional` operand. See D142959


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

https://reviews.llvm.org/D141984



More information about the llvm-commits mailing list