mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:44:43 +01:00
std.debug.Dwarf.SelfUnwinder: default some s390x registers to the same-value rule
This commit is contained in:
parent
8263f55ab2
commit
95bdb0c1c6
1 changed files with 7 additions and 3 deletions
|
|
@ -197,9 +197,13 @@ fn nextInner(unwinder: *SelfUnwinder, gpa: Allocator, cache_entry: *const CacheE
|
|||
// If unspecified, we'll use the default rule for the return address register, which is
|
||||
// typically equivalent to `.undefined` (meaning there is no return address), but may be
|
||||
// overriden by ABIs.
|
||||
var has_return_address: bool = builtin.cpu.arch.isAARCH64() and
|
||||
return_address_register >= 19 and
|
||||
return_address_register <= 28;
|
||||
var has_return_address: bool = switch (builtin.cpu.arch) {
|
||||
// DWARF for the Arm 64-bit Architecture (AArch64) §4.3, p1
|
||||
.aarch64, .aarch64_be => return_address_register >= 19 and return_address_register <= 28,
|
||||
// ELF ABI s390x Supplement §1.6.4
|
||||
.s390x => return_address_register >= 6 and return_address_register <= 15,
|
||||
else => false,
|
||||
};
|
||||
|
||||
// Create a copy of the CPU state, to which we will apply the new rules.
|
||||
var new_cpu_state = unwinder.cpu_state;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue