Commit 0ecc6332b4

Alex Rønne Petersen <alex@alexrp.com>
2024-08-29 16:07:46
start: Fix arm stack alignment code to work for thumb too.
1 parent f021ad5
Changed files (1)
lib
lib/std/start.zig
@@ -283,7 +283,9 @@ fn _start() callconv(.Naked) noreturn {
             \\ mov fp, #0
             \\ mov lr, #0
             \\ mov a1, sp
-            \\ and sp, #-16
+            \\ mov ip, sp
+            \\ and ip, ip, #-16
+            \\ mov sp, ip
             \\ b %[posixCallMainAndExit]
             ,
             .csky =>