@@ -319,30 +319,24 @@ class CVSIMDRRWb<bits<5> funct5, bit F, bit funct1, bits<3> funct3,
319319 let Constraints = "$rd = $rd_wb";
320320}
321321
322- class CVSIMDRI<bits<5> funct5, bit F, bits<3> funct3, string opcodestr>
322+ class CVSIMDRI<bits<5> funct5, bit F, bits<3> funct3, string opcodestr,
323+ Operand immtype = simm6>
323324 : CVInstSIMDRI<funct5, F, funct3, OPC_CUSTOM_3, (outs GPR:$rd),
324- (ins GPR:$rs1, simm6 :$imm6), opcodestr, "$rd, $rs1, $imm6">;
325+ (ins GPR:$rs1, immtype :$imm6), opcodestr, "$rd, $rs1, $imm6">;
325326
326- class CVSIMDRIWb<bits<5> funct5, bit F, bits<3> funct3, string opcodestr>
327+ class CVSIMDRIWb<bits<5> funct5, bit F, bits<3> funct3, string opcodestr,
328+ Operand immtype = simm6>
327329 : CVInstSIMDRI<funct5, F, funct3, OPC_CUSTOM_3,
328- (outs GPR:$rd_wb), (ins GPR:$rd, GPR:$rs1, simm6 :$imm6),
330+ (outs GPR:$rd_wb), (ins GPR:$rd, GPR:$rs1, immtype :$imm6),
329331 opcodestr, "$rd, $rs1, $imm6"> {
330332 let Constraints = "$rd = $rd_wb";
331333}
332334
333- class CVSIMDRU<bits<5> funct5, bit F, bits<3> funct3, string opcodestr,
334- Operand immtype = uimm6>
335- : CVInstSIMDRI<funct5, F, funct3, OPC_CUSTOM_3,
336- (outs GPR:$rd), (ins GPR:$rs1, immtype:$imm6),
337- opcodestr, "$rd, $rs1, $imm6">;
335+ class CVSIMDRU<bits<5> funct5, bit F, bits<3> funct3, string opcodestr>
336+ : CVSIMDRI<funct5, F, funct3, opcodestr, uimm6>;
338337
339338class CVSIMDRUWb<bits<5> funct5, bit F, bits<3> funct3, string opcodestr>
340- : CVInstSIMDRI<funct5, F, funct3, OPC_CUSTOM_3,
341- (outs GPR:$rd_wb),
342- (ins GPR:$rd, GPR:$rs1, uimm6:$imm6),
343- opcodestr, "$rd, $rs1, $imm6"> {
344- let Constraints = "$rd = $rd_wb";
345- }
339+ : CVSIMDRIWb<funct5, F, funct3, opcodestr, uimm6>;
346340
347341class CVSIMDR<bits<5> funct5, bit F, bit funct1, bits<3> funct3,
348342 string opcodestr>
@@ -374,8 +368,8 @@ multiclass CVSIMDShift<bits<5> funct5, bit F, bit funct1, string mnemonic> {
374368 def CV_ # NAME # _B : CVSIMDRR<funct5, F, funct1, 0b001, "cv." # mnemonic # ".b">;
375369 def CV_ # NAME # _SC_H : CVSIMDRR<funct5, F, funct1, 0b100, "cv." # mnemonic # ".sc.h">;
376370 def CV_ # NAME # _SC_B : CVSIMDRR<funct5, F, funct1, 0b101, "cv." # mnemonic # ".sc.b">;
377- def CV_ # NAME # _SCI_H : CVSIMDRU <funct5, F, 0b110, "cv." # mnemonic # ".sci.h", uimm4>;
378- def CV_ # NAME # _SCI_B : CVSIMDRU <funct5, F, 0b111, "cv." # mnemonic # ".sci.b", uimm3>;
371+ def CV_ # NAME # _SCI_H : CVSIMDRI <funct5, F, 0b110, "cv." # mnemonic # ".sci.h", uimm4>;
372+ def CV_ # NAME # _SCI_B : CVSIMDRI <funct5, F, 0b111, "cv." # mnemonic # ".sci.b", uimm3>;
379373}
380374
381375multiclass CVSIMDBinarySignedWb<bits<5> funct5, bit F, bit funct1, string mnemonic> {
0 commit comments