Commit 5ef70b8b87

Andrew Kelley <andrew@ziglang.org>
2021-06-21 23:13:43
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.
1 parent e75dfbc
Changed files (1)
lib
std
os
linux
lib/std/os/linux/mips.zig
@@ -31,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"
     );
 }