diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2024-08-29 16:07:46 +0200 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2024-08-31 03:38:35 +0200 |
| commit | 0ecc6332b4eb1ced547ffa38f57471134aaa4d13 (patch) | |
| tree | 2c8cf5fbdcb748e4d807a42b612f52c253ce767c /lib/std/start.zig | |
| parent | f021ad548fd8ad6c7d8d8ea7e7c409c695dce1e5 (diff) | |
| download | zig-0ecc6332b4eb1ced547ffa38f57471134aaa4d13.tar.gz zig-0ecc6332b4eb1ced547ffa38f57471134aaa4d13.zip | |
start: Fix arm stack alignment code to work for thumb too.
Diffstat (limited to 'lib/std/start.zig')
| -rw-r--r-- | lib/std/start.zig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/std/start.zig b/lib/std/start.zig index ea6f347bd6..5c94a4b591 100644 --- 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 => |
