authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-10-03 20:08:06+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-10-04 03:03:54+02:00
logd8268fac9829965ac0ffff72fb2f96a36d04d996
treeab609aaa33d818157d7c390ec318345800e57a39
parent07c3f9ef8e0a5a557dce70322334b0d1b49fe154

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.

1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/debug.zig+1-1
...@@ -951,7 +951,7 @@ const StackIterator = union(enum) {...@@ -951,7 +951,7 @@ const StackIterator = union(enum) {
951951
952 /// Offset of the saved return address wrt the frame pointer.952 /// Offset of the saved return address wrt the frame pointer.
953 const ra_offset = off: {953 const ra_offset = off: {
954 if (native_arch == .powerpc64le) break :off 2 * @sizeOf(usize);954 if (native_arch.isPowerPC64()) break :off 2 * @sizeOf(usize);
955 // On s390x, r14 is the link register and we need to grab it from its customary slot in the955 // On s390x, r14 is the link register and we need to grab it from its customary slot in the
956 // register save area (ELF ABI s390x Supplement §1.2.2.2).956 // register save area (ELF ABI s390x Supplement §1.2.2.2).
957 if (native_arch == .s390x) break :off 14 * @sizeOf(usize);957 if (native_arch == .s390x) break :off 14 * @sizeOf(usize);