mirror of
https://github.com/ziglang/zig.git
synced 2025-12-29 17:43:17 +00:00
std.debug: use correct return address offset for s390x
Makes FP-based unwinding work.
This commit is contained in:
parent
91fa2c61aa
commit
0f56d7afe2
@ -952,6 +952,9 @@ const StackIterator = union(enum) {
|
|||||||
/// Offset of the saved return address wrt the frame pointer.
|
/// Offset of the saved return address wrt the frame pointer.
|
||||||
const ra_offset = off: {
|
const ra_offset = off: {
|
||||||
if (native_arch == .powerpc64le) break :off 2 * @sizeOf(usize);
|
if (native_arch == .powerpc64le) 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);
|
||||||
break :off @sizeOf(usize);
|
break :off @sizeOf(usize);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user