mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-07 11:48:30 +00:00
Get LIBC_RUNTIME and LIBC_CALLS building on aarch64
This commit is contained in:
parent
7e46645193
commit
e5e3cdf447
1200 changed files with 5341 additions and 3677 deletions
|
@ -65,19 +65,8 @@ privileged void *sys_mremap(void *p, size_t n, size_t m, int f, void *q) {
|
|||
res = enosys();
|
||||
}
|
||||
#elif defined(__aarch64__)
|
||||
long res;
|
||||
register long r0 asm("x0") = (long)p;
|
||||
register long r1 asm("x1") = (long)n;
|
||||
register long r2 asm("x2") = (long)m;
|
||||
register long r3 asm("x3") = (long)f;
|
||||
register long r4 asm("x4") = (long)q;
|
||||
register long res_x0 asm("x0");
|
||||
asm volatile("mov\tx8,%1\n\t"
|
||||
"svc\t0"
|
||||
: "=r"(res_x0)
|
||||
: "i"(216), "r"(r0), "r"(r1), "r"(r2), "r"(r3), "r"(r4)
|
||||
: "x8", "memory");
|
||||
res = _sysret64(res_x0);
|
||||
void *res;
|
||||
res = __sys_mremap(p, n, m, f, q);
|
||||
#else
|
||||
#error "arch unsupported"
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue