Ensure the frame pointer is always 0

This commit is contained in:
Gwilym Inzani 2024-06-04 21:39:58 +01:00
parent b405a04a4a
commit 32c6ed4e35

View file

@ -80,8 +80,12 @@ CommonInit:
ldr r0, =0 ldr r0, =0
mov r1, r0 mov r1, r0
@ ensure the frame pointer is zero so that stack traces are guaranteed to terminate
mov r7, r0
@ load main and branch @ load main and branch
ldr r2, =main ldr r2, =main
mov lr, pc
bx r2 bx r2
@ loop if we end up here @ loop if we end up here