[clang] [llvm] [RISCV][MC] Add experimental `Zvvmtls` and `Zvvmttls` support (PR #198229)

via cfe-commits cfe-commits at lists.llvm.org
Sun May 17 23:49:41 PDT 2026


================
@@ -2543,6 +2553,53 @@ ParseStatus RISCVAsmParser::parseVScaleReg(OperandVector &Operands) {
   return ParseStatus::Success;
 }
 
+ParseStatus RISCVAsmParser::parseTileLambda(OperandVector &Operands) {
+  if (getLexer().isNot(AsmToken::Identifier))
+    return ParseStatus::NoMatch;
+
+  SMLoc S = getLoc();
+  StringRef Name = getLexer().getTok().getIdentifier();
+  if (!Name.consume_front("L"))
+    return ParseStatus::NoMatch;
+
+  unsigned Lambda;
+  if (Name.getAsInteger(10, Lambda))
+    return Error(S, "operand must be L1, L2, L4, L8, L16, L32, or L64");
+
+  unsigned EncodedLambda;
+  switch (Lambda) {
+  case 1:
+    EncodedLambda = 1;
+    break;
+  case 2:
+    EncodedLambda = 2;
+    break;
+  case 4:
+    EncodedLambda = 3;
+    break;
+  case 8:
+    EncodedLambda = 4;
+    break;
+  case 16:
+    EncodedLambda = 5;
+    break;
+  case 32:
+    EncodedLambda = 6;
+    break;
+  case 64:
+    EncodedLambda = 7;
+    break;
+  default:
+    return Error(S, "operand must be L1, L2, L4, L8, L16, L32, or L64");
+  }
----------------
imkiva wrote:

Fixed, thanks~

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


More information about the cfe-commits mailing list