Added 6 parameters syscalls for zen

This commit is contained in:
Andrea Orru 2018-03-09 22:24:52 -08:00
parent 7a893691c0
commit 70c3008a00

View File

@ -103,3 +103,17 @@ pub inline fn syscall5(number: usize, arg1: usize, arg2: usize, arg3: usize,
[arg4] "{esi}" (arg4),
[arg5] "{edi}" (arg5));
}
pub inline fn syscall6(number: usize, arg1: usize, arg2: usize, arg3: usize,
arg4: usize, arg5: usize, arg6: usize) usize
{
return asm volatile ("int $0x80"
: [ret] "={eax}" (-> usize)
: [number] "{eax}" (number),
[arg1] "{ecx}" (arg1),
[arg2] "{edx}" (arg2),
[arg3] "{ebx}" (arg3),
[arg4] "{esi}" (arg4),
[arg5] "{edi}" (arg5),
[arg6] "{ebp}" (arg6));
}