| ... | @@ -988,6 +988,8 @@ const StackIterator = union(enum) { | ... | @@ -988,6 +988,8 @@ const StackIterator = union(enum) { |
| 988 | // On LoongArch and RISC-V, the frame pointer points to the top of the saved register area, | 988 | // On LoongArch and RISC-V, the frame pointer points to the top of the saved register area, |
| 989 | // in which the base pointer is the first word. | 989 | // in which the base pointer is the first word. |
| 990 | if (native_arch.isLoongArch() or native_arch.isRISCV()) break :off -2 * @sizeOf(usize); | 990 | if (native_arch.isLoongArch() or native_arch.isRISCV()) break :off -2 * @sizeOf(usize); |
| | 991 | // On OpenRISC, the frame pointer is stored below the return address. |
| | 992 | if (native_arch == .or1k) break :off -2 * @sizeOf(usize); |
| 991 | // On SPARC, the frame pointer points to the save area which holds 16 slots for the local | 993 | // On SPARC, the frame pointer points to the save area which holds 16 slots for the local |
| 992 | // and incoming registers. The base pointer (i6) is stored in its customary save slot. | 994 | // and incoming registers. The base pointer (i6) is stored in its customary save slot. |
| 993 | if (native_arch.isSPARC()) break :off 14 * @sizeOf(usize); | 995 | if (native_arch.isSPARC()) break :off 14 * @sizeOf(usize); |
| ... | @@ -999,7 +1001,9 @@ const StackIterator = union(enum) { | ... | @@ -999,7 +1001,9 @@ const StackIterator = union(enum) { |
| 999 | const fp_to_ra_offset = off: { | 1001 | const fp_to_ra_offset = off: { |
| 1000 | // On LoongArch and RISC-V, the frame pointer points to the top of the saved register area, | 1002 | // On LoongArch and RISC-V, the frame pointer points to the top of the saved register area, |
| 1001 | // in which the return address is the second word. | 1003 | // in which the return address is the second word. |
| 1002 | if (native_arch.isRISCV() or native_arch.isLoongArch()) break :off -1 * @sizeOf(usize); | 1004 | if (native_arch.isLoongArch() or native_arch.isRISCV()) break :off -1 * @sizeOf(usize); |
| | 1005 | // On OpenRISC, the return address is stored below the stack parameter area. |
| | 1006 | if (native_arch == .or1k) break :off -1 * @sizeOf(usize); |
| 1003 | if (native_arch.isPowerPC64()) break :off 2 * @sizeOf(usize); | 1007 | if (native_arch.isPowerPC64()) break :off 2 * @sizeOf(usize); |
| 1004 | // On s390x, r14 is the link register and we need to grab it from its customary slot in the | 1008 | // On s390x, r14 is the link register and we need to grab it from its customary slot in the |
| 1005 | // register save area (ELF ABI s390x Supplement §1.2.2.2). | 1009 | // register save area (ELF ABI s390x Supplement §1.2.2.2). |