authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-07-24 22:37:26+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-07-26 02:32:19+02:00
log389ce984b5fc601b1b4e28e4ba47d051750afd83
tree2c0a5f24015132eeb14209ccca636e5b218c7d9a
parent7c98a65ae4fcebf9ebc918fe3e7af9d062805d36
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

start: Add POSIX arc support.


1 files changed, 9 insertions(+), 0 deletions(-)

lib/std/start.zig+9
...@@ -300,6 +300,15 @@ fn _start() callconv(.Naked) noreturn {...@@ -300,6 +300,15 @@ fn _start() callconv(.Naked) noreturn {
300 \\ and sp, x0, #-16300 \\ and sp, x0, #-16
301 \\ b %[posixCallMainAndExit]301 \\ b %[posixCallMainAndExit]
302 ,302 ,
303 .arc =>
304 // The `arc` tag currently means ARCv2, which has an unusually low stack alignment
305 // requirement. ARCv3 increases it from 4 to 16, but we don't support ARCv3 yet.
306 \\ mov fp, 0
307 \\ mov blink, 0
308 \\ mov r0, sp
309 \\ and sp, sp, -4
310 \\ b %[posixCallMainAndExit]
311 ,
303 .arm, .armeb, .thumb, .thumbeb =>312 .arm, .armeb, .thumb, .thumbeb =>
304 \\ mov fp, #0313 \\ mov fp, #0
305 \\ mov lr, #0314 \\ mov lr, #0