================
@@ -10,6 +10,46 @@
 //
 
//===----------------------------------------------------------------------===//
 
+class RVInstVXI<bits<6> funct6, RISCVVFormat opv, dag outs, dag ins,
+                string opcodestr, string argstr>
+    : RVInst<outs, ins, opcodestr, argstr, [], InstFormatR> {
+  bits<5> imm;
+  bits<5> rs1;
+  bits<5> vd;
+  bit vm;
+
+  let Inst{31-26} = funct6;
+  let Inst{25} = vm;
+  let Inst{24-20} = imm;
+  let Inst{19-15} = rs1;
+  let Inst{14-12} = opv.Value;
+  let Inst{11-7} = vd;
+  let Inst{6-0} = OPC_OP_V.Value;
----------------
preames wrote:

If you look at the instruction definitions which use these classes, they 
override this.  However, that's maybe a code smell of it's own.  I'd originally 
written these classes modeling RVInst ones, thinking we might have a 
standardized example eventually, and I'd kill off the custom ones.  However, 
since we don't, maybe I should rename and specialize them for the custom user 
here?  

Any preference?  It looks like SiFive specialized the custom ones, and avoided 
the generic sounding naming, so maybe we should do that here?  

https://github.com/llvm/llvm-project/pull/128773
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to