This is more readable and less error-prone than using RSP offsets.
Suggested during review of CL 212765.
Change-Id: I070190abeeac8eae5dbd414407602619d9d57422
Reviewed-on: https://go-review.googlesource.com/c/go/+/213577
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
// func pipe() (r, w int32, errno int32)
TEXT runtime·pipe(SB),NOSPLIT|NOFRAME,$0-12
- ADD $8, RSP, R0
+ MOVD $r+0(FP), R0
MOVW $0, R1
MOVD $SYS_pipe2, R8
SVC
// func pipe2(flags int32) (r, w int32, errno int32)
TEXT runtime·pipe2(SB),NOSPLIT|NOFRAME,$0-20
- ADD $16, RSP, R0
+ MOVD $r+8(FP), R0
MOVW flags+0(FP), R1
MOVD $SYS_pipe2, R8
SVC
// func pipe() (r, w int32, errno int32)
TEXT runtime·pipe(SB),NOSPLIT|NOFRAME,$0-12
- ADD $8, RSP, R0
+ MOVD $r+0(FP), R0
MOVW $0, R1
MOVW $SYS_pipe2, R8
SVC
// func pipe2(flags int32) (r, w int32, errno int32)
TEXT runtime·pipe2(SB),NOSPLIT|NOFRAME,$0-20
- ADD $16, RSP, R0
+ MOVD $r+8(FP), R0
MOVW flags+0(FP), R1
MOVW $SYS_pipe2, R8
SVC