diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-06-21 14:13:43 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-06-21 17:03:04 -0700 |
| commit | d279a23c9362bd3716aa6fd65e2e832df714a775 (patch) | |
| tree | 2bfaed597d281d88b1c2abb5473182063e4217d1 /lib/std/os/linux/mips.zig | |
| parent | af9a2c7c50802435213b1f7eab0874f08ea0f19a (diff) | |
| download | zig-d279a23c9362bd3716aa6fd65e2e832df714a775.tar.gz zig-d279a23c9362bd3716aa6fd65e2e832df714a775.zip | |
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.
Diffstat (limited to 'lib/std/os/linux/mips.zig')
| -rw-r--r-- | lib/std/os/linux/mips.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/os/linux/mips.zig b/lib/std/os/linux/mips.zig index 26f62bfe0f..a04a592f3b 100644 --- a/lib/std/os/linux/mips.zig +++ b/lib/std/os/linux/mips.zig @@ -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" ); } |
