Fixes for __sys_call on aarch64-mes-gcc
This commit is contained in:
parent
84491f3bd9
commit
63e731a01f
|
@ -87,7 +87,7 @@ typedef unsigned uintmax_t;
|
|||
|
||||
#define INT_MIN -2147483648
|
||||
#define INT_MAX 2147483647
|
||||
#if __i386__ || __arm__ || __riscv_xlen == 32
|
||||
#if __i386__ || __arm__ || __aarch64__ || __riscv_xlen == 32
|
||||
#define LONG_MIN INT_MIN
|
||||
#define LONG_MAX INT_MAX
|
||||
#define UINT_MAX UINT32_MAX
|
||||
|
|
|
@ -29,7 +29,7 @@ __sys_call (long sys_call)
|
|||
long r;
|
||||
asm (
|
||||
"mov x7, %1\n\t"
|
||||
"svc $0\n\t"
|
||||
"svc #0\n\t"
|
||||
"mov %0, x0\n\t"
|
||||
: "=r" (r)
|
||||
: "r" (sys_call)
|
||||
|
@ -61,7 +61,7 @@ __sys_call1 (long sys_call, long one)
|
|||
asm (
|
||||
"mov x7, %1\n\t"
|
||||
"mov x0, %2\n\t"
|
||||
"svc $0\n\t"
|
||||
"svc #0\n\t"
|
||||
"mov %0, x0\n\t"
|
||||
: "=r" (r)
|
||||
: "r" (sys_call), "r" (one)
|
||||
|
@ -94,7 +94,7 @@ __sys_call2 (long sys_call, long one, long two)
|
|||
"mov x7, %1\n\t"
|
||||
"mov x0, %2\n\t"
|
||||
"mov x1, %3\n\t"
|
||||
"svc $0\n\t"
|
||||
"svc #0\n\t"
|
||||
"mov %0, x0\n\t"
|
||||
: "=r" (r)
|
||||
: "r" (sys_call), "r" (one), "r" (two)
|
||||
|
@ -128,8 +128,8 @@ __sys_call3 (long sys_call, long one, long two, long three)
|
|||
"mov x0, %2\n\t"
|
||||
"mov x1, %3\n\t"
|
||||
"mov x2, %4\n\t"
|
||||
"svc $0\n\t"
|
||||
"mov %0, r0\n\t"
|
||||
"svc #0\n\t"
|
||||
"mov %0, x0\n\t"
|
||||
: "=r" (r)
|
||||
: "r" (sys_call), "r" (one), "r" (two), "r" (three)
|
||||
: "x0", "x1", "x2", "x7"
|
||||
|
@ -163,8 +163,8 @@ __sys_call4 (long sys_call, long one, long two, long three, long four)
|
|||
"mov x1, %3\n\t"
|
||||
"mov x2, %4\n\t"
|
||||
"mov x3, %5\n\t"
|
||||
"svc $0\n\t"
|
||||
"mov %0, r0\n\t"
|
||||
"svc #0\n\t"
|
||||
"mov %0, x0\n\t"
|
||||
: "=r" (r)
|
||||
: "r" (sys_call), "r" (one), "r" (two), "r" (three), "r" (four)
|
||||
: "x0", "x1", "x2", "x3", "x7"
|
||||
|
|
Loading…
Reference in a new issue