================
@@ -54,6 +54,53 @@ defvar SlideEncodes = [SlideEncode<0b00, "1">,
SlideEncode<0b01, "2">,
SlideEncode<0b10, "3">];
+class HPEncode<bits<3> encoding, string name> {
+ bits<3> Encoding = encoding;
+ string Name = name;
+}
+defvar HPEncodes = [HPEncode<0b011, "u">,
+ HPEncode<0b110, "us">,
+ HPEncode<0b101, "su">,
+ HPEncode<0b100, "">];
+
+def SMTVType : AsmOperandClass {
+ let Name = "SMTVType";
+ let RenderMethod = "addSMTVTypeOperand";
+ let ParserMethod = "parseSMTVType";
+ let DiagnosticType = "InvalidSMTType";
+ let DiagnosticString =
+ "This Inst only supports i4 and i8, i8 is the default type";
+ let IsOptional = 1;
+ let DefaultMethod = "defaultSMTVType";
+}
+
+// SpacemiT's Integer Matrix only supports i4 and i8
+def SMT_INT : Operand<XLenVT> {
+ let ParserMatchClass = SMTVType;
+ let PrintMethod = "printSMTVType";
+ let DecoderMethod = "decodeUImmOperand<2>";
+ let OperandType = "OPERAND_SMTVType";
+ let OperandNamespace = "RISCVOp";
+}
+
+def SMTI8 : AsmOperandClass {
+ let Name = "SMTI8";
+ let RenderMethod = "addSMTVTypeOperand";
+ let DiagnosticType = "InvalidSMTI8";
+ let DiagnosticString = "smt.vmadot with slide only supports i8 type";
+ let ParserMethod = "parseSMTVType";
+ let IsOptional = 1;
+ let DefaultMethod = "defaultSMTVType";
+}
+
+def SMT_I8 : Operand<XLenVT> {
----------------
lukel97 wrote:
Nit
```suggestion
def SMT_I8 : Operand<XLenVT> {
```
https://github.com/llvm/llvm-project/pull/202533
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits