mirror of
https://github.com/golang/go
synced 2024-11-17 14:14:56 -07:00
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 <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>
This commit is contained in:
parent
66770f4b1d
commit
567ef8bd8e
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user