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 <tobias.klauser@gmail.com>
Trust: Benny Siegert <bsiegert@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
// 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)