Commit 58e38ff1f8

Alex Rønne Petersen <alex@alexrp.com>
2024-07-24 17:36:15
start: Add a comment explaining the sparc64 stack bias.
1 parent 5c96192
Changed files (1)
lib
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