mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-04 02:08:30 +00:00
Introduce native support for MacOS ARM64
There's a new program named ape/ape-m1.c which will be used to build an embeddable binary that can load ape and elf executables. The support is mostly working so far, but still chasing down ABI issues.
This commit is contained in:
parent
b852650c08
commit
1422e96b4e
757 changed files with 2988 additions and 1321 deletions
|
@ -20,21 +20,9 @@
|
|||
.text.unlikely
|
||||
|
||||
__errfun:
|
||||
#ifdef __x86_64__
|
||||
call __errno_location
|
||||
mov %ecx,(%rax)
|
||||
push $-1
|
||||
pop %rax
|
||||
.leafepilogue // .leafprologue is in errfuns/...
|
||||
#elif defined(__aarch64__)
|
||||
stp x19,x30,[sp,#-16]!
|
||||
mov w19,w0
|
||||
bl __errno_location
|
||||
str w19,[x0]
|
||||
mov x0,#-1
|
||||
ldp x19,x30,[sp],#16
|
||||
ret
|
||||
#else
|
||||
#error "unsupported architecture"
|
||||
#endif
|
||||
.endfn __errfun,globl,hidden
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue