mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
mips: fix syscall_pipe
Previously the fd parameter was ignored and so the result would not get populated. Now it passes the fd pointer to the inline assembly so that the results can be observed.
This commit is contained in:
parent
af9a2c7c50
commit
d279a23c93
@ -18,7 +18,6 @@ pub fn syscall0(number: SYS) usize {
|
||||
}
|
||||
|
||||
pub fn syscall_pipe(fd: *[2]i32) usize {
|
||||
_ = fd;
|
||||
return asm volatile (
|
||||
\\ .set noat
|
||||
\\ .set noreorder
|
||||
@ -32,7 +31,8 @@ pub fn syscall_pipe(fd: *[2]i32) usize {
|
||||
\\ sw $3, 4($4)
|
||||
\\ 2:
|
||||
: [ret] "={$2}" (-> usize)
|
||||
: [number] "{$2}" (@enumToInt(SYS.pipe))
|
||||
: [number] "{$2}" (@enumToInt(SYS.pipe)),
|
||||
[fd] "{$4}" (fd)
|
||||
: "memory", "cc", "$7"
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user