@@ -45,6 +45,7 @@ class RISCVReg64<RISCVReg32 subreg>
45
45
let SubRegIndices = [sub_32];
46
46
}
47
47
48
+ let FallbackRegAltNameIndex = NoRegAltName in
48
49
def ABIRegAltName : RegAltNameIndex;
49
50
50
51
def sub_vrm4_0 : SubRegIndex<256>;
@@ -415,51 +416,46 @@ class VRegList<list<dag> LIn, int start, int nf, int lmul, bit isV0> {
415
416
}
416
417
417
418
// Vector registers
418
- let RegAltNameIndices = [ABIRegAltName] in {
419
- foreach Index = 0-31 in {
420
- def V#Index : RISCVReg<Index, "v"#Index, ["v"#Index]>, DwarfRegNum<[!add(Index, 96)]>;
421
- }
419
+ foreach Index = 0-31 in {
420
+ def V#Index : RISCVReg<Index, "v"#Index>, DwarfRegNum<[!add(Index, 96)]>;
421
+ }
422
422
423
- foreach Index = [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22,
424
- 24, 26, 28, 30] in {
425
- def V#Index#M2 : RISCVRegWithSubRegs<Index, "v"#Index,
426
- [!cast<Register>("V"#Index),
427
- !cast<Register>("V"#!add(Index, 1))],
428
- ["v"#Index]>,
429
- DwarfRegAlias<!cast<Register>("V"#Index)> {
430
- let SubRegIndices = [sub_vrm1_0, sub_vrm1_1];
431
- }
423
+ foreach Index = [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22,
424
+ 24, 26, 28, 30] in {
425
+ def V#Index#M2 : RISCVRegWithSubRegs<Index, "v"#Index,
426
+ [!cast<Register>("V"#Index),
427
+ !cast<Register>("V"#!add(Index, 1))]>,
428
+ DwarfRegAlias<!cast<Register>("V"#Index)> {
429
+ let SubRegIndices = [sub_vrm1_0, sub_vrm1_1];
432
430
}
431
+ }
433
432
434
- foreach Index = [0, 4, 8, 12, 16, 20, 24, 28] in {
435
- def V#Index#M4 : RISCVRegWithSubRegs<Index, "v"#Index,
436
- [!cast<Register>("V"#Index#"M2"),
437
- !cast<Register>("V"#!add(Index, 2)#"M2")],
438
- ["v"#Index]>,
439
- DwarfRegAlias<!cast<Register>("V"#Index)> {
440
- let SubRegIndices = [sub_vrm2_0, sub_vrm2_1];
441
- }
433
+ foreach Index = [0, 4, 8, 12, 16, 20, 24, 28] in {
434
+ def V#Index#M4 : RISCVRegWithSubRegs<Index, "v"#Index,
435
+ [!cast<Register>("V"#Index#"M2"),
436
+ !cast<Register>("V"#!add(Index, 2)#"M2")]>,
437
+ DwarfRegAlias<!cast<Register>("V"#Index)> {
438
+ let SubRegIndices = [sub_vrm2_0, sub_vrm2_1];
442
439
}
440
+ }
443
441
444
- foreach Index = [0, 8, 16, 24] in {
445
- def V#Index#M8 : RISCVRegWithSubRegs<Index, "v"#Index,
446
- [!cast<Register>("V"#Index#"M4"),
447
- !cast<Register>("V"#!add(Index, 4)#"M4")],
448
- ["v"#Index]>,
449
- DwarfRegAlias<!cast<Register>("V"#Index)> {
450
- let SubRegIndices = [sub_vrm4_0, sub_vrm4_1];
451
- }
442
+ foreach Index = [0, 8, 16, 24] in {
443
+ def V#Index#M8 : RISCVRegWithSubRegs<Index, "v"#Index,
444
+ [!cast<Register>("V"#Index#"M4"),
445
+ !cast<Register>("V"#!add(Index, 4)#"M4")]>,
446
+ DwarfRegAlias<!cast<Register>("V"#Index)> {
447
+ let SubRegIndices = [sub_vrm4_0, sub_vrm4_1];
452
448
}
453
-
454
- def VTYPE : RISCVReg<0, "vtype", ["vtype"]>;
455
- def VL : RISCVReg<0, "vl", ["vl"]>;
456
- def VXSAT : RISCVReg<0, "vxsat", ["vxsat"]>;
457
- def VXRM : RISCVReg<0, "vxrm", ["vxrm"]>;
458
- let isConstant = true in
459
- def VLENB : RISCVReg<0, "vlenb", ["vlenb"]>,
460
- DwarfRegNum<[!add(4096, SysRegVLENB.Encoding)]>;
461
449
}
462
450
451
+ def VTYPE : RISCVReg<0, "vtype">;
452
+ def VL : RISCVReg<0, "vl">;
453
+ def VXSAT : RISCVReg<0, "vxsat">;
454
+ def VXRM : RISCVReg<0, "vxrm">;
455
+ let isConstant = true in
456
+ def VLENB : RISCVReg<0, "vlenb">,
457
+ DwarfRegNum<[!add(4096, SysRegVLENB.Encoding)]>;
458
+
463
459
def VCSR : RegisterClass<"RISCV", [XLenVT], 32,
464
460
(add VTYPE, VL, VLENB)> {
465
461
let RegInfos = XLenRI;
0 commit comments