[clang] [llvm] [RISCV] Add MC layer support for XSfmm*. (PR #133031)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 17 11:09:41 PDT 2025


================
@@ -2302,6 +2316,81 @@ bool RISCVAsmParser::generateVTypeError(SMLoc ErrorLoc) {
       "e[8|16|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]");
 }
 
+bool RISCVAsmParser::parseXSfmmVTypeToken(const AsmToken &Tok, WWEEState &State,
+                                          unsigned &WW, unsigned &EE,
+                                          bool &AltFmt) {
+  if (getLexer().isNot(AsmToken::Identifier))
+    return true;
+
+  StringRef Identifier = getTok().getIdentifier();
+
+  switch (State) {
+  case WWEEState_SEW:
+    if (!Identifier.consume_front("e"))
+      break;
----------------
preames wrote:

Minor, but use return instead of break for readability.  

https://github.com/llvm/llvm-project/pull/133031


More information about the llvm-commits mailing list