From 501587fa68ac76d679118fbe629e2a9544ea7a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Fri, 3 Oct 2025 20:08:06 +0200 Subject: [PATCH] std.debug: fix FP-based unwinding on powerpc64 This just needs to do the same thing as powerpc64le. Note that the saved LR is at the same position in both ELF v1 and v2. --- lib/std/debug.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/debug.zig b/lib/std/debug.zig index 6d705f3c8633..4203027863b7 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -951,7 +951,7 @@ const StackIterator = union(enum) { /// Offset of the saved return address wrt the frame pointer. const ra_offset = off: { - if (native_arch == .powerpc64le) break :off 2 * @sizeOf(usize); + if (native_arch.isPowerPC64()) break :off 2 * @sizeOf(usize); // On s390x, r14 is the link register and we need to grab it from its customary slot in the // register save area (ELF ABI s390x Supplement ยง1.2.2.2). if (native_arch == .s390x) break :off 14 * @sizeOf(usize);