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-08 12:10:16+02:00
log79e3c4a9a8d662a7d9203476e74d3fa01b1c4eb8
treec39311132fc4d998ee496e61a0bd8affb8fb8c80
parent60922dbf345d52be26c5981a168c91c8cf7a7fa1
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
...@@ -355,7 +355,11 @@ fn _start() callconv(.naked) noreturn {...@@ -355,7 +355,11 @@ fn _start() callconv(.naked) noreturn {
355 // Note that the - 8 is needed because pc in the jsr instruction points into the middle355 // Note that the - 8 is needed because pc in the jsr instruction points into the middle
356 // of the jsr instruction. (The lea is 6 bytes, the jsr is 4 bytes.)356 // of the jsr instruction. (The lea is 6 bytes, the jsr is 4 bytes.)
357 \\ suba.l %%fp, %%fp357 \\ suba.l %%fp, %%fp
358 \\ move.l %%sp, -(%%sp)358 \\ move.l %%sp, %%a0
359 \\ move.l %%a0, %%d0
360 \\ and.l #-4, %%d0
361 \\ move.l %%d0, %%sp
362 \\ move.l %%a0, -(%%sp)
359 \\ lea %[posixCallMainAndExit] - . - 8, %%a0363 \\ lea %[posixCallMainAndExit] - . - 8, %%a0
360 \\ jsr (%%pc, %%a0)364 \\ jsr (%%pc, %%a0)
361 ,365 ,