@@ -43,15 +43,15 @@ class THInstVdotVV<bits<6> funct6, RISCVVFormat opv, dag outs, dag ins,
43
43
: RVInstVV<funct6, opv, outs, ins, opcodestr, argstr> {
44
44
let Inst{26} = 0;
45
45
let Inst{6-0} = OPC_CUSTOM_0.Value;
46
- let DecoderNamespace = "XTHeadVdot ";
46
+ let DecoderNamespace = "XTHead ";
47
47
}
48
48
49
49
class THInstVdotVX<bits<6> funct6, RISCVVFormat opv, dag outs, dag ins,
50
50
string opcodestr, string argstr>
51
51
: RVInstVX<funct6, opv, outs, ins, opcodestr, argstr> {
52
52
let Inst{26} = 1;
53
53
let Inst{6-0} = OPC_CUSTOM_0.Value;
54
- let DecoderNamespace = "XTHeadVdot ";
54
+ let DecoderNamespace = "XTHead ";
55
55
}
56
56
57
57
let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in {
@@ -243,11 +243,12 @@ multiclass THVdotVMAQA<string opcodestr, bits<6> funct6>
243
243
// Instructions
244
244
//===----------------------------------------------------------------------===//
245
245
246
- let Predicates = [HasVendorXTHeadBa], DecoderNamespace = "XTHeadBa" in
246
+ let DecoderNamespace = "XTHead" in {
247
+ let Predicates = [HasVendorXTHeadBa] in
247
248
def TH_ADDSL : THShiftALU_rri<0b001, "th.addsl">,
248
249
Sched<[WriteSHXADD, ReadSHXADD, ReadSHXADD]>;
249
250
250
- let Predicates = [HasVendorXTHeadBb], DecoderNamespace = "XTHeadBb" in {
251
+ let Predicates = [HasVendorXTHeadBb] in {
251
252
def TH_SRRI : THShift_ri<0b00010, 0b001, "th.srri">;
252
253
def TH_EXT : THBitfieldExtract_rii<0b010, "th.ext">;
253
254
def TH_EXTU : THBitfieldExtract_rii<0b011, "th.extu">;
@@ -257,24 +258,22 @@ def TH_REV : THRev_r<0b10000, 0b01, "th.rev">;
257
258
def TH_TSTNBZ : THRev_r<0b10000, 0b00, "th.tstnbz">;
258
259
} // Predicates = [HasVendorXTHeadBb]
259
260
260
- let Predicates = [HasVendorXTHeadBb, IsRV64], DecoderNamespace = "XTHeadBb",
261
+ let Predicates = [HasVendorXTHeadBb, IsRV64],
261
262
IsSignExtendingOpW = 1 in {
262
263
def TH_SRRIW : THShiftW_ri<0b0001010, 0b001, "th.srriw">;
263
264
def TH_REVW : THRev_r<0b10010, 0b00, "th.revw">;
264
265
} // Predicates = [HasVendorXTHeadBb, IsRV64]
265
266
266
- let Predicates = [HasVendorXTHeadBs], DecoderNamespace = "XTHeadBs",
267
+ let Predicates = [HasVendorXTHeadBs],
267
268
IsSignExtendingOpW = 1 in
268
269
def TH_TST : THShift_ri<0b10001, 0b001, "th.tst">,
269
270
Sched<[WriteSingleBitImm, ReadSingleBitImm]>;
270
271
271
- let Predicates = [HasVendorXTHeadCondMov],
272
- DecoderNamespace = "XTHeadCondMov" in {
272
+ let Predicates = [HasVendorXTHeadCondMov] in {
273
273
def TH_MVEQZ : THCondMov_rr<0b0100000, "th.mveqz">;
274
274
def TH_MVNEZ : THCondMov_rr<0b0100001, "th.mvnez">;
275
275
} // Predicates = [HasVendorXTHeadCondMov]
276
276
277
- let DecoderNamespace = "XTHeadMac" in {
278
277
let Predicates = [HasVendorXTHeadMac] in {
279
278
def TH_MULA : THMulAccumulate_rr<0b0010000, "th.mula">;
280
279
def TH_MULS : THMulAccumulate_rr<0b0010001, "th.muls">;
@@ -289,9 +288,7 @@ let Predicates = [HasVendorXTHeadMac, IsRV64], IsSignExtendingOpW = 1 in {
289
288
def TH_MULAW : THMulAccumulate_rr<0b0010010, "th.mulaw">;
290
289
def TH_MULSW : THMulAccumulate_rr<0b0010011, "th.mulsw">;
291
290
} // Predicates = [HasVendorXTHeadMac, IsRV64]
292
- } // DecoderNamespace = "XTHeadMac"
293
291
294
- let DecoderNamespace = "XTHeadMemPair" in {
295
292
let Predicates = [HasVendorXTHeadMemPair] in {
296
293
def TH_LWUD : THLoadPair<0b11110, "th.lwud">,
297
294
Sched<[WriteLDW, WriteLDW, ReadMemBase]>;
@@ -308,9 +305,8 @@ def TH_LDD : THLoadPair<0b11111, "th.ldd">,
308
305
def TH_SDD : THStorePair<0b11111, "th.sdd">,
309
306
Sched<[WriteSTD, WriteSTD, ReadStoreData, ReadMemBase]>;
310
307
}
311
- } // DecoderNamespace = "XTHeadMemPair"
312
308
313
- let Predicates = [HasVendorXTHeadMemIdx], DecoderNamespace = "XTHeadMemIdx" in {
309
+ let Predicates = [HasVendorXTHeadMemIdx] in {
314
310
// T-Head Load/Store + Update instructions.
315
311
def TH_LBIA : THLoadUpdate<0b00011, "th.lbia">,
316
312
Sched<[WriteLDB, ReadMemBase]>;
@@ -390,7 +386,7 @@ def TH_SURW : THStoreIndexed<GPR, 0b01010, "th.surw">,
390
386
Sched<[WriteLDB, ReadMemBase]>;
391
387
}
392
388
393
- let Predicates = [HasVendorXTHeadMemIdx, IsRV64], DecoderNamespace = "XTHeadMemIdx" in {
389
+ let Predicates = [HasVendorXTHeadMemIdx, IsRV64] in {
394
390
// T-Head Load/Store + Update instructions.
395
391
def TH_LWUIA : THLoadUpdate<0b11011, "th.lwuia">,
396
392
Sched<[WriteLDH, ReadMemBase]>;
@@ -426,37 +422,34 @@ def TH_SURD : THStoreIndexed<GPR, 0b01110, "th.surd">,
426
422
427
423
// T-Head Load/Store Indexed instructions for floating point registers.
428
424
429
- let Predicates = [HasVendorXTHeadFMemIdx, HasStdExtF],
430
- DecoderNamespace = "XTHeadFMemIdx" in {
425
+ let Predicates = [HasVendorXTHeadFMemIdx, HasStdExtF] in {
431
426
def TH_FLRW : THLoadIndexed<FPR32, 0b01000, "th.flrw">,
432
427
Sched<[WriteFLD32, ReadFMemBase]>;
433
428
def TH_FSRW : THStoreIndexed<FPR32, 0b01000, "th.fsrw">,
434
429
Sched<[WriteFST32, ReadFStoreData, ReadFMemBase]>;
435
430
}
436
431
437
- let Predicates = [HasVendorXTHeadFMemIdx, HasStdExtD],
438
- DecoderNamespace = "XTHeadFMemIdx" in {
432
+ let Predicates = [HasVendorXTHeadFMemIdx, HasStdExtD] in {
439
433
def TH_FLRD : THLoadIndexed<FPR64, 0b01100, "th.flrd">,
440
434
Sched<[WriteFLD64, ReadFMemBase]>;
441
435
def TH_FSRD : THStoreIndexed<FPR64, 0b01100, "th.fsrd">,
442
436
Sched<[WriteFST64, ReadFStoreData, ReadFMemBase]>;
443
437
}
444
438
445
- let Predicates = [HasVendorXTHeadFMemIdx, HasStdExtF, IsRV64],
446
- DecoderNamespace = "XTHeadFMemIdx" in {
439
+ let Predicates = [HasVendorXTHeadFMemIdx, HasStdExtF, IsRV64] in {
447
440
def TH_FLURW : THLoadIndexed<FPR32, 0b01010, "th.flurw">,
448
441
Sched<[WriteFLD32, ReadFMemBase]>;
449
442
def TH_FSURW : THStoreIndexed<FPR32, 0b01010, "th.fsurw">,
450
443
Sched<[WriteFST32, ReadFStoreData, ReadFMemBase]>;
451
444
}
452
445
453
- let Predicates = [HasVendorXTHeadFMemIdx, HasStdExtD, IsRV64],
454
- DecoderNamespace = "XTHeadFMemIdx" in {
446
+ let Predicates = [HasVendorXTHeadFMemIdx, HasStdExtD, IsRV64] in {
455
447
def TH_FLURD : THLoadIndexed<FPR64, 0b01110, "th.flurd">,
456
448
Sched<[WriteFLD64, ReadFMemBase]>;
457
449
def TH_FSURD : THStoreIndexed<FPR64, 0b01110, "th.fsurd">,
458
450
Sched<[WriteFST64, ReadFStoreData, ReadFMemBase]>;
459
451
}
452
+ } // DecoderNamespace = "XTHead"
460
453
461
454
let Predicates = [HasVendorXTHeadVdot] in {
462
455
defm THVdotVMAQA : THVdotVMAQA<"th.vmaqa", 0b100000>;
@@ -692,7 +685,7 @@ let Predicates = [HasVendorXTHeadMemPair] in {
692
685
(TH_SWD GPR:$rd1, GPR:$rd2, GPR:$rs1, uimm2_3:$uimm2_3, 3)>;
693
686
}
694
687
695
- let Predicates = [HasVendorXTHeadCmo], DecoderNamespace = "XTHeadCmo " in {
688
+ let Predicates = [HasVendorXTHeadCmo], DecoderNamespace = "XTHead " in {
696
689
def TH_DCACHE_CSW : THCacheInst_r<0b00001, "th.dcache.csw">;
697
690
def TH_DCACHE_ISW : THCacheInst_r<0b00010, "th.dcache.isw">;
698
691
def TH_DCACHE_CISW : THCacheInst_r<0b00011, "th.dcache.cisw">;
@@ -717,7 +710,7 @@ def TH_L2CACHE_IALL : THCacheInst_void<0b10110, "th.l2cache.iall">;
717
710
def TH_L2CACHE_CIALL : THCacheInst_void<0b10111, "th.l2cache.ciall">;
718
711
}
719
712
720
- let Predicates = [HasVendorXTHeadSync], DecoderNamespace = "XTHeadSync " in {
713
+ let Predicates = [HasVendorXTHeadSync], DecoderNamespace = "XTHead " in {
721
714
def TH_SFENCE_VMAS : THCacheInst_rr<0b0000010, "th.sfence.vmas">;
722
715
def TH_SYNC : THCacheInst_void<0b11000, "th.sync">;
723
716
def TH_SYNC_S : THCacheInst_void<0b11001, "th.sync.s">;
0 commit comments