| ... | ... | @@ -994,6 +994,11 @@ const StackIterator = union(enum) { |
| 994 | 994 | |
| 995 | 995 | /// Offset of the saved base pointer (previous frame pointer) wrt the frame pointer. |
| 996 | 996 | const fp_to_bp_offset = off: { |
| 997 | // On 32-bit PA-RISC, the base pointer is the final word of the frame marker. |
| 998 | if (native_arch == .hppa) break :off -1 * @sizeOf(usize); |
| 999 | // On 64-bit PA-RISC, the frame marker was shrunk significantly; now there's just the return |
| 1000 | // address followed by the base pointer. |
| 1001 | if (native_arch == .hppa64) break :off -1 * @sizeOf(usize); |
| 997 | 1002 | // On LoongArch and RISC-V, the frame pointer points to the top of the saved register area, |
| 998 | 1003 | // in which the base pointer is the first word. |
| 999 | 1004 | if (native_arch.isLoongArch() or native_arch.isRISCV()) break :off -2 * @sizeOf(usize); |
| ... | ... | @@ -1008,6 +1013,11 @@ const StackIterator = union(enum) { |
| 1008 | 1013 | |
| 1009 | 1014 | /// Offset of the saved return address wrt the frame pointer. |
| 1010 | 1015 | const fp_to_ra_offset = off: { |
| 1016 | // On 32-bit PA-RISC, the return address sits in the middle-ish of the frame marker. |
| 1017 | if (native_arch == .hppa) break :off -5 * @sizeOf(usize); |
| 1018 | // On 64-bit PA-RISC, the frame marker was shrunk significantly; now there's just the return |
| 1019 | // address followed by the base pointer. |
| 1020 | if (native_arch == .hppa64) break :off -2 * @sizeOf(usize); |
| 1011 | 1021 | // On LoongArch and RISC-V, the frame pointer points to the top of the saved register area, |
| 1012 | 1022 | // in which the return address is the second word. |
| 1013 | 1023 | if (native_arch.isLoongArch() or native_arch.isRISCV()) break :off -1 * @sizeOf(usize); |