From d279a23c9362bd3716aa6fd65e2e832df714a775 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 21 Jun 2021 14:13:43 -0700 Subject: [PATCH] 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. --- lib/std/os/linux/mips.zig | 4 ++-- 1 file 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" ); }