@@ -43,15 +43,15 @@ class THInstVdotVV<bits<6> funct6, RISCVVFormat opv, dag outs, dag ins,
4343 : RVInstVV<funct6, opv, outs, ins, opcodestr, argstr> {
4444 let Inst{26} = 0;
4545 let Inst{6-0} = OPC_CUSTOM_0.Value;
46- let DecoderNamespace = "XTHeadVdot ";
46+ let DecoderNamespace = "XTHead ";
4747}
4848
4949class THInstVdotVX<bits<6> funct6, RISCVVFormat opv, dag outs, dag ins,
5050 string opcodestr, string argstr>
5151 : RVInstVX<funct6, opv, outs, ins, opcodestr, argstr> {
5252 let Inst{26} = 1;
5353 let Inst{6-0} = OPC_CUSTOM_0.Value;
54- let DecoderNamespace = "XTHeadVdot ";
54+ let DecoderNamespace = "XTHead ";
5555}
5656
5757let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in {
@@ -243,11 +243,12 @@ multiclass THVdotVMAQA<string opcodestr, bits<6> funct6>
243243// Instructions
244244//===----------------------------------------------------------------------===//
245245
246- let Predicates = [HasVendorXTHeadBa], DecoderNamespace = "XTHeadBa" in
246+ let DecoderNamespace = "XTHead" in {
247+ let Predicates = [HasVendorXTHeadBa] in
247248def TH_ADDSL : THShiftALU_rri<0b001, "th.addsl">,
248249 Sched<[WriteSHXADD, ReadSHXADD, ReadSHXADD]>;
249250
250- let Predicates = [HasVendorXTHeadBb], DecoderNamespace = "XTHeadBb" in {
251+ let Predicates = [HasVendorXTHeadBb] in {
251252def TH_SRRI : THShift_ri<0b00010, 0b001, "th.srri">;
252253def TH_EXT : THBitfieldExtract_rii<0b010, "th.ext">;
253254def TH_EXTU : THBitfieldExtract_rii<0b011, "th.extu">;
@@ -257,24 +258,22 @@ def TH_REV : THRev_r<0b10000, 0b01, "th.rev">;
257258def TH_TSTNBZ : THRev_r<0b10000, 0b00, "th.tstnbz">;
258259} // Predicates = [HasVendorXTHeadBb]
259260
260- let Predicates = [HasVendorXTHeadBb, IsRV64], DecoderNamespace = "XTHeadBb",
261+ let Predicates = [HasVendorXTHeadBb, IsRV64],
261262 IsSignExtendingOpW = 1 in {
262263def TH_SRRIW : THShiftW_ri<0b0001010, 0b001, "th.srriw">;
263264def TH_REVW : THRev_r<0b10010, 0b00, "th.revw">;
264265} // Predicates = [HasVendorXTHeadBb, IsRV64]
265266
266- let Predicates = [HasVendorXTHeadBs], DecoderNamespace = "XTHeadBs",
267+ let Predicates = [HasVendorXTHeadBs],
267268 IsSignExtendingOpW = 1 in
268269def TH_TST : THShift_ri<0b10001, 0b001, "th.tst">,
269270 Sched<[WriteSingleBitImm, ReadSingleBitImm]>;
270271
271- let Predicates = [HasVendorXTHeadCondMov],
272- DecoderNamespace = "XTHeadCondMov" in {
272+ let Predicates = [HasVendorXTHeadCondMov] in {
273273def TH_MVEQZ : THCondMov_rr<0b0100000, "th.mveqz">;
274274def TH_MVNEZ : THCondMov_rr<0b0100001, "th.mvnez">;
275275} // Predicates = [HasVendorXTHeadCondMov]
276276
277- let DecoderNamespace = "XTHeadMac" in {
278277let Predicates = [HasVendorXTHeadMac] in {
279278def TH_MULA : THMulAccumulate_rr<0b0010000, "th.mula">;
280279def TH_MULS : THMulAccumulate_rr<0b0010001, "th.muls">;
@@ -289,9 +288,7 @@ let Predicates = [HasVendorXTHeadMac, IsRV64], IsSignExtendingOpW = 1 in {
289288def TH_MULAW : THMulAccumulate_rr<0b0010010, "th.mulaw">;
290289def TH_MULSW : THMulAccumulate_rr<0b0010011, "th.mulsw">;
291290} // Predicates = [HasVendorXTHeadMac, IsRV64]
292- } // DecoderNamespace = "XTHeadMac"
293291
294- let DecoderNamespace = "XTHeadMemPair" in {
295292let Predicates = [HasVendorXTHeadMemPair] in {
296293def TH_LWUD : THLoadPair<0b11110, "th.lwud">,
297294 Sched<[WriteLDW, WriteLDW, ReadMemBase]>;
@@ -308,9 +305,8 @@ def TH_LDD : THLoadPair<0b11111, "th.ldd">,
308305def TH_SDD : THStorePair<0b11111, "th.sdd">,
309306 Sched<[WriteSTD, WriteSTD, ReadStoreData, ReadMemBase]>;
310307}
311- } // DecoderNamespace = "XTHeadMemPair"
312308
313- let Predicates = [HasVendorXTHeadMemIdx], DecoderNamespace = "XTHeadMemIdx" in {
309+ let Predicates = [HasVendorXTHeadMemIdx] in {
314310// T-Head Load/Store + Update instructions.
315311def TH_LBIA : THLoadUpdate<0b00011, "th.lbia">,
316312 Sched<[WriteLDB, ReadMemBase]>;
@@ -390,7 +386,7 @@ def TH_SURW : THStoreIndexed<GPR, 0b01010, "th.surw">,
390386 Sched<[WriteLDB, ReadMemBase]>;
391387}
392388
393- let Predicates = [HasVendorXTHeadMemIdx, IsRV64], DecoderNamespace = "XTHeadMemIdx" in {
389+ let Predicates = [HasVendorXTHeadMemIdx, IsRV64] in {
394390// T-Head Load/Store + Update instructions.
395391def TH_LWUIA : THLoadUpdate<0b11011, "th.lwuia">,
396392 Sched<[WriteLDH, ReadMemBase]>;
@@ -426,37 +422,34 @@ def TH_SURD : THStoreIndexed<GPR, 0b01110, "th.surd">,
426422
427423// T-Head Load/Store Indexed instructions for floating point registers.
428424
429- let Predicates = [HasVendorXTHeadFMemIdx, HasStdExtF],
430- DecoderNamespace = "XTHeadFMemIdx" in {
425+ let Predicates = [HasVendorXTHeadFMemIdx, HasStdExtF] in {
431426def TH_FLRW : THLoadIndexed<FPR32, 0b01000, "th.flrw">,
432427 Sched<[WriteFLD32, ReadFMemBase]>;
433428def TH_FSRW : THStoreIndexed<FPR32, 0b01000, "th.fsrw">,
434429 Sched<[WriteFST32, ReadFStoreData, ReadFMemBase]>;
435430}
436431
437- let Predicates = [HasVendorXTHeadFMemIdx, HasStdExtD],
438- DecoderNamespace = "XTHeadFMemIdx" in {
432+ let Predicates = [HasVendorXTHeadFMemIdx, HasStdExtD] in {
439433def TH_FLRD : THLoadIndexed<FPR64, 0b01100, "th.flrd">,
440434 Sched<[WriteFLD64, ReadFMemBase]>;
441435def TH_FSRD : THStoreIndexed<FPR64, 0b01100, "th.fsrd">,
442436 Sched<[WriteFST64, ReadFStoreData, ReadFMemBase]>;
443437}
444438
445- let Predicates = [HasVendorXTHeadFMemIdx, HasStdExtF, IsRV64],
446- DecoderNamespace = "XTHeadFMemIdx" in {
439+ let Predicates = [HasVendorXTHeadFMemIdx, HasStdExtF, IsRV64] in {
447440def TH_FLURW : THLoadIndexed<FPR32, 0b01010, "th.flurw">,
448441 Sched<[WriteFLD32, ReadFMemBase]>;
449442def TH_FSURW : THStoreIndexed<FPR32, 0b01010, "th.fsurw">,
450443 Sched<[WriteFST32, ReadFStoreData, ReadFMemBase]>;
451444}
452445
453- let Predicates = [HasVendorXTHeadFMemIdx, HasStdExtD, IsRV64],
454- DecoderNamespace = "XTHeadFMemIdx" in {
446+ let Predicates = [HasVendorXTHeadFMemIdx, HasStdExtD, IsRV64] in {
455447def TH_FLURD : THLoadIndexed<FPR64, 0b01110, "th.flurd">,
456448 Sched<[WriteFLD64, ReadFMemBase]>;
457449def TH_FSURD : THStoreIndexed<FPR64, 0b01110, "th.fsurd">,
458450 Sched<[WriteFST64, ReadFStoreData, ReadFMemBase]>;
459451}
452+ } // DecoderNamespace = "XTHead"
460453
461454let Predicates = [HasVendorXTHeadVdot] in {
462455defm THVdotVMAQA : THVdotVMAQA<"th.vmaqa", 0b100000>;
@@ -692,7 +685,7 @@ let Predicates = [HasVendorXTHeadMemPair] in {
692685 (TH_SWD GPR:$rd1, GPR:$rd2, GPR:$rs1, uimm2_3:$uimm2_3, 3)>;
693686}
694687
695- let Predicates = [HasVendorXTHeadCmo], DecoderNamespace = "XTHeadCmo " in {
688+ let Predicates = [HasVendorXTHeadCmo], DecoderNamespace = "XTHead " in {
696689def TH_DCACHE_CSW : THCacheInst_r<0b00001, "th.dcache.csw">;
697690def TH_DCACHE_ISW : THCacheInst_r<0b00010, "th.dcache.isw">;
698691def TH_DCACHE_CISW : THCacheInst_r<0b00011, "th.dcache.cisw">;
@@ -717,7 +710,7 @@ def TH_L2CACHE_IALL : THCacheInst_void<0b10110, "th.l2cache.iall">;
717710def TH_L2CACHE_CIALL : THCacheInst_void<0b10111, "th.l2cache.ciall">;
718711}
719712
720- let Predicates = [HasVendorXTHeadSync], DecoderNamespace = "XTHeadSync " in {
713+ let Predicates = [HasVendorXTHeadSync], DecoderNamespace = "XTHead " in {
721714def TH_SFENCE_VMAS : THCacheInst_rr<0b0000010, "th.sfence.vmas">;
722715def TH_SYNC : THCacheInst_void<0b11000, "th.sync">;
723716def TH_SYNC_S : THCacheInst_void<0b11001, "th.sync.s">;
0 commit comments