From 58e38ff1f82b19ee529f0f5abe74a2c03c204dfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 24 Jul 2024 17:36:15 +0200 Subject: [PATCH] start: Add a comment explaining the sparc64 stack bias. --- lib/std/start.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/std/start.zig b/lib/std/start.zig index 21baacc764..336526b7b4 100644 --- a/lib/std/start.zig +++ b/lib/std/start.zig @@ -379,7 +379,8 @@ fn _start() callconv(.Naked) noreturn { \\ jg %[posixCallMainAndExit] , .sparc64 => - // argc is stored after a register window (16 registers) plus stack bias + // argc is stored after a register window (16 registers * 8 bytes) plus the stack bias + // (2047 bytes). \\ mov %%g0, %%i6 \\ add %%o6, 2175, %%l0 \\ mov %%l0, %%o0