mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-03 21:51:34 +11:00
The link register points to the next instruction
This commit is contained in:
parent
fafa4ba7ea
commit
d9243ded6b
|
@ -77,7 +77,10 @@ pub(crate) fn unwind_exception() -> Frames {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
frames.push(lr);
|
// need to subtract 2 here since the link register points to the _next_ instruction
|
||||||
|
// to execute, not the one that is being branched from which is the one we care about
|
||||||
|
// in the stack trace.
|
||||||
|
frames.push(lr - 2);
|
||||||
|
|
||||||
frame_pointer = sp;
|
frame_pointer = sp;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue