| ... | ... | @@ -197,9 +197,13 @@ fn nextInner(unwinder: *SelfUnwinder, gpa: Allocator, cache_entry: *const CacheE |
| 197 | 197 | // If unspecified, we'll use the default rule for the return address register, which is |
| 198 | 198 | // typically equivalent to `.undefined` (meaning there is no return address), but may be |
| 199 | 199 | // 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 | }; |
| 203 | 207 | |
| 204 | 208 | // Create a copy of the CPU state, to which we will apply the new rules. |
| 205 | 209 | var new_cpu_state = unwinder.cpu_state; |