commit fff5ce053fcfaf0cf3fea815b4c50c000036ff5b (tree)
parent ebefee608810d947fb9a17e853acd30dc619cb88
Author: Alex Rønne Petersen <alex@alexrp.com>
Date: Wed, 24 Jul 2024 20:11:36 +0200
start: Align the stack on sparc64 just in case.
The kernel does this as required, but we cannot trust dynamic linkers to do it.
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/lib/std/start.zig b/lib/std/start.zig
@@ -378,6 +378,9 @@ fn _start() callconv(.Naked) noreturn {
// (2047 bytes).
\\ mov %%g0, %%fp
\\ add %%sp, 2175, %%o0
+ \\ add %%sp, 2047, %%sp
+ \\ and %%sp, -16, %%sp
+ \\ sub %%sp, 2047, %%sp
\\ ba,a %[posixCallMainAndExit]
,
else => @compileError("unsupported arch"),