diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2024-07-24 22:37:26 +0200 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2024-07-26 02:32:19 +0200 |
| commit | 389ce984b5fc601b1b4e28e4ba47d051750afd83 (patch) | |
| tree | 2c0a5f24015132eeb14209ccca636e5b218c7d9a | |
| parent | 7c98a65ae4fcebf9ebc918fe3e7af9d062805d36 (diff) | |
| download | zig-389ce984b5fc601b1b4e28e4ba47d051750afd83.tar.gz zig-389ce984b5fc601b1b4e28e4ba47d051750afd83.zip | |
start: Add POSIX arc support.
| -rw-r--r-- | lib/std/start.zig | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/std/start.zig b/lib/std/start.zig index d97381ef0d..74e177ce0b 100644 --- a/lib/std/start.zig +++ b/lib/std/start.zig @@ -300,6 +300,15 @@ fn _start() callconv(.Naked) noreturn { \\ and sp, x0, #-16 \\ b %[posixCallMainAndExit] , + .arc => + // The `arc` tag currently means ARCv2, which has an unusually low stack alignment + // requirement. ARCv3 increases it from 4 to 16, but we don't support ARCv3 yet. + \\ mov fp, 0 + \\ mov blink, 0 + \\ mov r0, sp + \\ and sp, sp, -4 + \\ b %[posixCallMainAndExit] + , .arm, .armeb, .thumb, .thumbeb => \\ mov fp, #0 \\ mov lr, #0 |
