commit 0ecc6332b4eb1ced547ffa38f57471134aaa4d13 (tree)
parent f021ad548fd8ad6c7d8d8ea7e7c409c695dce1e5
Author: Alex Rønne Petersen <alex@alexrp.com>
Date: Thu, 29 Aug 2024 16:07:46 +0200
start: Fix arm stack alignment code to work for thumb too.
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/std/start.zig b/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 =>