libc: Pass the last argument in __luna_syscall5 correctly

This commit is contained in:
apio 2022-10-14 19:24:58 +02:00
parent 0e64c57e10
commit 4e08c9d8ce

View File

@ -42,7 +42,7 @@ long int __luna_syscall5(long int sys_num, unsigned long int arg0, unsigned long
{ {
long int result; long int result;
register unsigned long int value0 asm("r10") = arg3; register unsigned long int value0 asm("r10") = arg3;
register unsigned long int value1 asm("r10") = arg4; register unsigned long int value1 asm("r8") = arg4;
asm volatile("int $0x42" : "=a"(result) : "a"(sys_num), "D"(arg0), "S"(arg1), "d"(arg2), "r"(value0), "r"(value1)); asm volatile("int $0x42" : "=a"(result) : "a"(sys_num), "D"(arg0), "S"(arg1), "d"(arg2), "r"(value0), "r"(value1));
return result; return result;
} }