authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-04-07 13:08:40+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-04-07 13:09:10+02:00
logd3bf6c518f304741140a6a51236daefe5c87c0ef
tree088bdaed4c7ba5db7b313b20d0ab5e01b35317cf
parent8fea9f68e8c7ea256d8137e3b311aafacef25e3a
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

start: Align the stack on m68k.


1 files changed, 5 insertions(+), 1 deletions(-)

lib/std/start.zig+5-1
......@@ -366,7 +366,11 @@ fn _start() callconv(.naked) noreturn {
366366 // Note that the - 8 is needed because pc in the jsr instruction points into the middle
367367 // of the jsr instruction. (The lea is 6 bytes, the jsr is 4 bytes.)
368368 \\ suba.l %%fp, %%fp
369 \\ move.l %%sp, -(%%sp)
369 \\ move.l %%sp, %%a0
370 \\ move.l %%a0, %%d0
371 \\ and.l #-4, %%d0
372 \\ move.l %%d0, %%sp
373 \\ move.l %%a0, -(%%sp)
370374 \\ lea %[posixCallMainAndExit] - . - 8, %%a0
371375 \\ jsr (%%pc, %%a0)
372376 ,