mirror of
https://github.com/ziglang/zig.git
synced 2024-11-29 00:22:33 +00:00
Added 6 parameters syscalls for zen
This commit is contained in:
parent
7a893691c0
commit
70c3008a00
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user