authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-10-03 03:45:52+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-10-03 03:45:52+02:00
log95bdb0c1c65c128923ffac3f4be6b4619eb4a54b
tree7eb2c831d2eecdd768c847c9ffe7948de7f2d24f
parent8263f55ab271c499a8a2133ef52e615850846bd1
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.debug.Dwarf.SelfUnwinder: default some s390x registers to the same-value rule


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

lib/std/debug/Dwarf/SelfUnwinder.zig+7-3
......@@ -197,9 +197,13 @@ fn nextInner(unwinder: *SelfUnwinder, gpa: Allocator, cache_entry: *const CacheE
197197 // If unspecified, we'll use the default rule for the return address register, which is
198198 // typically equivalent to `.undefined` (meaning there is no return address), but may be
199199 // overriden by ABIs.
200 var has_return_address: bool = builtin.cpu.arch.isAARCH64() and
201 return_address_register >= 19 and
202 return_address_register <= 28;
200 var has_return_address: bool = switch (builtin.cpu.arch) {
201 // DWARF for the Arm 64-bit Architecture (AArch64) §4.3, p1
202 .aarch64, .aarch64_be => return_address_register >= 19 and return_address_register <= 28,
203 // ELF ABI s390x Supplement §1.6.4
204 .s390x => return_address_register >= 6 and return_address_register <= 15,
205 else => false,
206 };
203207
204208 // Create a copy of the CPU state, to which we will apply the new rules.
205209 var new_cpu_state = unwinder.cpu_state;