aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug.zig
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/debug.zig')
-rw-r--r--lib/std/debug.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig
index 51c0cf24ca..2ae9a23f85 100644
--- a/lib/std/debug.zig
+++ b/lib/std/debug.zig
@@ -993,6 +993,8 @@ 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.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
// register save area (ELF ABI s390x Supplement ยง1.2.2.2).