================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to