Get LIBC_RUNTIME and LIBC_CALLS building on aarch64

This commit is contained in:
Justine Tunney 2023-05-09 01:56:56 -07:00
parent 7e46645193
commit e5e3cdf447
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
1200 changed files with 5341 additions and 3677 deletions

View file

@ -53,6 +53,9 @@
// @threadsafe
// @vforksafe
vfork:
#ifdef __x86_64__
#if !IsTiny()
push %rbp
mov %rsp,%rbp
@ -124,6 +127,19 @@ vfork:
pop %r9
pop %rbp
jmp 1b
#endif
#elif defined(__aarch64__)
mov x8,#220 // __NR_clone
mov x0,#0x4111 // SIGCHLD | CLONE_VM | CLONE_VFORK
mov x1,#0
svc 0
.hidden _sysret
b _sysret
#else
#error "architecture unsupported"
#endif
.endfn vfork,globl