@@ -319,30 +319,24 @@ class CVSIMDRRWb<bits<5> funct5, bit F, bit funct1, bits<3> funct3,
319
319
let Constraints = "$rd = $rd_wb";
320
320
}
321
321
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>
323
324
: 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">;
325
326
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>
327
329
: 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),
329
331
opcodestr, "$rd, $rs1, $imm6"> {
330
332
let Constraints = "$rd = $rd_wb";
331
333
}
332
334
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>;
338
337
339
338
class 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>;
346
340
347
341
class CVSIMDR<bits<5> funct5, bit F, bit funct1, bits<3> funct3,
348
342
string opcodestr>
@@ -374,8 +368,8 @@ multiclass CVSIMDShift<bits<5> funct5, bit F, bit funct1, string mnemonic> {
374
368
def CV_ # NAME # _B : CVSIMDRR<funct5, F, funct1, 0b001, "cv." # mnemonic # ".b">;
375
369
def CV_ # NAME # _SC_H : CVSIMDRR<funct5, F, funct1, 0b100, "cv." # mnemonic # ".sc.h">;
376
370
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>;
379
373
}
380
374
381
375
multiclass CVSIMDBinarySignedWb<bits<5> funct5, bit F, bit funct1, string mnemonic> {
0 commit comments