================
@@ -16,6 +16,28 @@
// Instructions
//===----------------------------------------------------------------------===//
+def TileLambdaAsmOperand : AsmOperandClass {
+ let Name = "TileLambda";
+ let RenderMethod = "addImmOperands";
+ let ParserMethod = "parseTileLambda";
+ let DiagnosticType = "InvalidTileLambda";
+ let DiagnosticString = "operand must be L1, L2, L4, L8, L16, L32, or L64";
+}
+
+def TileLambdaOp : RISCVOp {
+ let ParserMatchClass = TileLambdaAsmOperand;
+ let PrintMethod = "printTileLambda";
+ let EncoderMethod = "getImmOpValue";
+ let DecoderMethod = "decodeUImmOperand<3>";
+ let OperandType = "OPERAND_UIMM3";
+ let MCOperandPredicate = [{
+ int64_t Imm;
+ if (!MCOp.evaluateAsConstantImm(Imm))
+ return false;
+ return Imm >= 1 && Imm <= 7;
----------------
mshockwave wrote:
perhaps `Imm && isUInt<3>(Imm)`
https://github.com/llvm/llvm-project/pull/198229
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits