@@ -1432,6 +1432,7 @@ pub fn ipRegNum(arch: std.Target.Cpu.Arch) ?u16 {
1432
1432
.aarch64 , .aarch64_be = > 32 ,
1433
1433
.arm , .armeb , .thumb , .thumbeb = > 15 ,
1434
1434
.loongarch32 , .loongarch64 = > 32 ,
1435
+ .riscv32 , .riscv32be , .riscv64 , .riscv64be = > 32 ,
1435
1436
.x86 = > 8 ,
1436
1437
.x86_64 = > 16 ,
1437
1438
else = > null ,
@@ -1443,6 +1444,7 @@ pub fn fpRegNum(arch: std.Target.Cpu.Arch) u16 {
1443
1444
.aarch64 , .aarch64_be = > 29 ,
1444
1445
.arm , .armeb , .thumb , .thumbeb = > 11 ,
1445
1446
.loongarch32 , .loongarch64 = > 22 ,
1447
+ .riscv32 , .riscv32be , .riscv64 , .riscv64be = > 8 ,
1446
1448
.x86 = > 5 ,
1447
1449
.x86_64 = > 6 ,
1448
1450
else = > unreachable ,
@@ -1454,6 +1456,7 @@ pub fn spRegNum(arch: std.Target.Cpu.Arch) u16 {
1454
1456
.aarch64 , .aarch64_be = > 31 ,
1455
1457
.arm , .armeb , .thumb , .thumbeb = > 13 ,
1456
1458
.loongarch32 , .loongarch64 = > 3 ,
1459
+ .riscv32 , .riscv32be , .riscv64 , .riscv64be = > 2 ,
1457
1460
.x86 = > 4 ,
1458
1461
.x86_64 = > 7 ,
1459
1462
else = > unreachable ,
@@ -1473,10 +1476,6 @@ pub fn supportsUnwinding(target: *const std.Target) bool {
1473
1476
.spirv64 ,
1474
1477
= > false ,
1475
1478
1476
- // Enabling this causes relocation errors such as:
1477
- // error: invalid relocation type R_RISCV_SUB32 at offset 0x20
1478
- .riscv64 , .riscv64be , .riscv32 , .riscv32be = > false ,
1479
-
1480
1479
// Conservative guess. Feel free to update this logic with any targets
1481
1480
// that are known to not support Dwarf unwinding.
1482
1481
else = > true ,
0 commit comments