mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 08:12:28 +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
|
@ -62,9 +62,11 @@ struct DirectMap sys_mmap(void *addr, size_t size, int prot, int flags, int fd,
|
|||
register long res_x0 asm("x0");
|
||||
long res;
|
||||
asm volatile("mov\tx8,%1\n\t"
|
||||
"mov\tx16,%2\n\t"
|
||||
"svc\t0"
|
||||
: "=r"(res_x0)
|
||||
: "i"(222), "r"(r0), "r"(r1), "r"(r2), "r"(r3), "r"(r4), "r"(r5)
|
||||
: "i"(222), "i"(197), "r"(r0), "r"(r1), "r"(r2), "r"(r3),
|
||||
"r"(r4), "r"(r5)
|
||||
: "x8", "memory");
|
||||
res = res_x0;
|
||||
if ((unsigned long)res >= (unsigned long)-4095) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue