diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2025-04-07 13:08:40 +0200 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2025-04-07 13:09:10 +0200 |
| commit | d3bf6c518f304741140a6a51236daefe5c87c0ef (patch) | |
| tree | 088bdaed4c7ba5db7b313b20d0ab5e01b35317cf /lib/std/start.zig | |
| parent | 8fea9f68e8c7ea256d8137e3b311aafacef25e3a (diff) | |
| download | zig-d3bf6c518f304741140a6a51236daefe5c87c0ef.tar.gz zig-d3bf6c518f304741140a6a51236daefe5c87c0ef.zip | |
start: Align the stack on m68k.
Diffstat (limited to 'lib/std/start.zig')
| -rw-r--r-- | lib/std/start.zig | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/std/start.zig b/lib/std/start.zig index e91201a0bb..90255e0a1b 100644 --- a/lib/std/start.zig +++ b/lib/std/start.zig @@ -366,7 +366,11 @@ fn _start() callconv(.naked) noreturn { // Note that the - 8 is needed because pc in the jsr instruction points into the middle // of the jsr instruction. (The lea is 6 bytes, the jsr is 4 bytes.) \\ suba.l %%fp, %%fp - \\ move.l %%sp, -(%%sp) + \\ move.l %%sp, %%a0 + \\ move.l %%a0, %%d0 + \\ and.l #-4, %%d0 + \\ move.l %%d0, %%sp + \\ move.l %%a0, -(%%sp) \\ lea %[posixCallMainAndExit] - . - 8, %%a0 \\ jsr (%%pc, %%a0) , |
