Make more progress on aarch64

This commit is contained in:
Justine Tunney 2023-05-03 00:00:09 -07:00
parent 135080fd3e
commit aef9a69a60
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
42 changed files with 563 additions and 387 deletions

View file

@ -61,7 +61,7 @@ struct DirectMap sys_mmap(void *addr, size_t size, int prot, int flags, int fd,
register long r5 asm("x5") = (long)off;
register long res_x0 asm("x0");
long res;
asm volatile("mov\tx8,%1\n"
asm volatile("mov\tx8,%1\n\t"
"svc\t0"
: "=r"(res_x0)
: "i"(222), "r"(r0), "r"(r1), "r"(r2), "r"(r3), "r"(r4), "r"(r5)

View file

@ -67,7 +67,7 @@ privileged wontreturn void _Exit(int exitcode) {
for (;;) asm("ud2");
#elif defined(__aarch64__)
register long x0 asm("x0") = exitcode;
asm volatile("mov\tx8,%1\n"
asm volatile("mov\tx8,%1\n\t"
"svc\t0"
: /* no outputs */
: "i"(94), "r"(x0)

View file

@ -75,7 +75,7 @@ privileged wontreturn void _Exit1(int rc) {
notpossible;
#elif defined(__aarch64__)
register long r0 asm("x0") = rc;
asm volatile("mov\tx8,%1\n"
asm volatile("mov\tx8,%1\n\t"
"svc\t0"
: /* no outputs */
: "i"(93), "r"(r0)

View file

@ -52,7 +52,7 @@ int getpid(void) {
rc = sys_getpid().ax;
#elif defined(__aarch64__)
register long res_x0 asm("x0");
asm volatile("mov\tx8,%1\n"
asm volatile("mov\tx8,%1\n\t"
"svc\t0"
: "=r"(res_x0)
: "i"(172)

View file

@ -202,7 +202,7 @@ privileged static void klog(const char *b, size_t n) {
register long r1 asm("x1") = (long)b;
register long r2 asm("x2") = (long)n;
register long res_x0 asm("x0");
asm volatile("mov\tx8,%1\n"
asm volatile("mov\tx8,%1\n\t"
"svc\t0"
: "=r"(res_x0)
: "i"(64), "r"(r0), "r"(r1), "r"(r2)

View file

@ -64,7 +64,7 @@ privileged int sys_gettid(void) {
return tid;
#elif defined(__aarch64__)
register long res_x0 asm("x0");
asm volatile("mov\tx8,%1\n"
asm volatile("mov\tx8,%1\n\t"
"svc\t0"
: "=r"(res_x0)
: "i"(178)