Commit 4b1b18d1 authored by Joel Sing's avatar Joel Sing

runtime: use FP offsets for pipe/pipe2 on freebsd/arm64 and linux/arm64

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: default avatarCherry Zhang <cherryyz@google.com>
parent daacf269
...@@ -129,7 +129,7 @@ ok: ...@@ -129,7 +129,7 @@ ok:
// func pipe() (r, w int32, errno int32) // func pipe() (r, w int32, errno int32)
TEXT runtime·pipe(SB),NOSPLIT|NOFRAME,$0-12 TEXT runtime·pipe(SB),NOSPLIT|NOFRAME,$0-12
ADD $8, RSP, R0 MOVD $r+0(FP), R0
MOVW $0, R1 MOVW $0, R1
MOVD $SYS_pipe2, R8 MOVD $SYS_pipe2, R8
SVC SVC
...@@ -141,7 +141,7 @@ ok: ...@@ -141,7 +141,7 @@ ok:
// func pipe2(flags int32) (r, w int32, errno int32) // func pipe2(flags int32) (r, w int32, errno int32)
TEXT runtime·pipe2(SB),NOSPLIT|NOFRAME,$0-20 TEXT runtime·pipe2(SB),NOSPLIT|NOFRAME,$0-20
ADD $16, RSP, R0 MOVD $r+8(FP), R0
MOVW flags+0(FP), R1 MOVW flags+0(FP), R1
MOVD $SYS_pipe2, R8 MOVD $SYS_pipe2, R8
SVC SVC
......
...@@ -112,7 +112,7 @@ TEXT runtime·read(SB),NOSPLIT|NOFRAME,$0-28 ...@@ -112,7 +112,7 @@ TEXT runtime·read(SB),NOSPLIT|NOFRAME,$0-28
// func pipe() (r, w int32, errno int32) // func pipe() (r, w int32, errno int32)
TEXT runtime·pipe(SB),NOSPLIT|NOFRAME,$0-12 TEXT runtime·pipe(SB),NOSPLIT|NOFRAME,$0-12
ADD $8, RSP, R0 MOVD $r+0(FP), R0
MOVW $0, R1 MOVW $0, R1
MOVW $SYS_pipe2, R8 MOVW $SYS_pipe2, R8
SVC SVC
...@@ -121,7 +121,7 @@ TEXT runtime·pipe(SB),NOSPLIT|NOFRAME,$0-12 ...@@ -121,7 +121,7 @@ TEXT runtime·pipe(SB),NOSPLIT|NOFRAME,$0-12
// func pipe2(flags int32) (r, w int32, errno int32) // func pipe2(flags int32) (r, w int32, errno int32)
TEXT runtime·pipe2(SB),NOSPLIT|NOFRAME,$0-20 TEXT runtime·pipe2(SB),NOSPLIT|NOFRAME,$0-20
ADD $16, RSP, R0 MOVD $r+8(FP), R0
MOVW flags+0(FP), R1 MOVW flags+0(FP), R1
MOVW $SYS_pipe2, R8 MOVW $SYS_pipe2, R8
SVC SVC
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment