From f6403ed5ea05bcdbb55da15ee65204b1c8cdf423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Tue, 7 Oct 2025 02:13:43 +0200 Subject: [PATCH] std.debug.Dwarf: use 67 as the (fake) PowerPC PC register It's free real estate, as it turns out. --- lib/std/debug/Dwarf.zig | 2 +- lib/std/debug/cpu_context.zig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/std/debug/Dwarf.zig b/lib/std/debug/Dwarf.zig index 4af4dd7f34..a6ecd07b23 100644 --- a/lib/std/debug/Dwarf.zig +++ b/lib/std/debug/Dwarf.zig @@ -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, diff --git a/lib/std/debug/cpu_context.zig b/lib/std/debug/cpu_context.zig index 5cd5360dc6..6243131d25 100644 --- a/lib/std/debug/cpu_context.zig +++ b/lib/std/debug/cpu_context.zig @@ -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, }