From: Tobias Klauser Date: Tue, 29 Sep 2020 13:13:17 +0000 (+0200) Subject: runtime: correct arguments to pipe2 syscall in pipe on netbsd/arm64 X-Git-Tag: go1.16beta1~896 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=567ef8bd8e76bdbc00df6b1903976b89b34a84d8;p=gostls13.git runtime: correct arguments to pipe2 syscall in pipe on netbsd/arm64 Follow the implementation of pipe2 to pass arguments and handle return values. With this fix the runtime tests pass on netbsd/arm64 (tested using gomote on the netbsd-arm64-bsiegert builder). Update #30824 Change-Id: I346db68fc9dde8dc7f11351af05c1ad3105f4a32 Reviewed-on: https://go-review.googlesource.com/c/go/+/258000 Trust: Tobias Klauser Trust: Benny Siegert Run-TryBot: Tobias Klauser Reviewed-by: Benny Siegert TryBot-Result: Go Bot --- diff --git a/src/runtime/sys_netbsd_arm64.s b/src/runtime/sys_netbsd_arm64.s index f19a8b78f6..4d9b05478f 100644 --- a/src/runtime/sys_netbsd_arm64.s +++ b/src/runtime/sys_netbsd_arm64.s @@ -152,19 +152,13 @@ ok: // func pipe() (r, w int32, errno int32) TEXT runtime·pipe(SB),NOSPLIT|NOFRAME,$0-12 - MOVW $0, R0 + ADD $8, RSP, R0 + MOVW $0, R1 SVC $SYS_pipe2 BCC pipeok - MOVW $-1,R1 - MOVW R1, r+0(FP) - MOVW R1, w+4(FP) NEG R0, R0 - MOVW R0, errno+8(FP) - RET pipeok: - MOVW R0, r+0(FP) - MOVW R1, w+4(FP) - MOVW ZR, errno+8(FP) + MOVW R0, errno+8(FP) RET // func pipe2(flags int32) (r, w int32, errno int32)