std.debug.Dwarf: use 67 as the (fake) PowerPC PC register

It's free real estate, as it turns out.
This commit is contained in:
Alex Rønne Petersen 2025-10-07 02:13:43 +02:00
parent feba8a83a7
commit f6403ed5ea
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -1434,7 +1434,7 @@ pub fn ipRegNum(arch: std.Target.Cpu.Arch) ?u16 {
.hexagon => 76,
.loongarch32, .loongarch64 => 64,
.mips, .mipsel, .mips64, .mips64el => 37,
.powerpc, .powerpcle, .powerpc64, .powerpc64le => 357,
.powerpc, .powerpcle, .powerpc64, .powerpc64le => 67,
.riscv32, .riscv32be, .riscv64, .riscv64be => 65,
.s390x => 65,
.x86 => 8,

View File

@ -918,7 +918,7 @@ pub const Powerpc = extern struct {
switch (register_num) {
0...31 => return @ptrCast(&ctx.r[register_num]),
65 => return @ptrCast(&ctx.lr),
357 => return @ptrCast(&ctx.pc),
67 => return @ptrCast(&ctx.pc),
else => return error.InvalidRegister,
}