mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
std.debug: fix FP unwinding for LoongArch
This commit is contained in:
parent
98f0bf9b67
commit
3f5e782357
1 changed files with 2 additions and 2 deletions
|
|
@ -988,7 +988,7 @@ const StackIterator = union(enum) {
|
|||
// On RISC-V the frame pointer points to the top of the saved register
|
||||
// area, on pretty much every other architecture it points to the stack
|
||||
// slot where the previous frame pointer is saved.
|
||||
if (native_arch.isRISCV()) break :off -2 * @sizeOf(usize);
|
||||
if (native_arch.isLoongArch() or native_arch.isRISCV()) break :off -2 * @sizeOf(usize);
|
||||
// On SPARC the previous frame pointer is stored at 14 slots past %fp+BIAS.
|
||||
if (native_arch.isSPARC()) break :off 14 * @sizeOf(usize);
|
||||
break :off 0;
|
||||
|
|
@ -996,7 +996,7 @@ const StackIterator = union(enum) {
|
|||
|
||||
/// Offset of the saved return address wrt the frame pointer.
|
||||
const ra_offset = off: {
|
||||
if (native_arch.isRISCV()) break :off -1 * @sizeOf(usize);
|
||||
if (native_arch.isLoongArch() or native_arch.isRISCV()) break :off -1 * @sizeOf(usize);
|
||||
if (native_arch.isSPARC()) break :off 15 * @sizeOf(usize);
|
||||
if (native_arch.isPowerPC64()) break :off 2 * @sizeOf(usize);
|
||||
// On s390x, r14 is the link register and we need to grab it from its customary slot in the
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue