Commit 4f364be0 authored by Ian Lance Taylor's avatar Ian Lance Taylor

runtime: correctly negate errno value for *BSD ARM

Fixes #35037

Change-Id: I0b9bcd001556cd409994d83dabcdd6e32b001d28
Reviewed-on: https://go-review.googlesource.com/c/go/+/202441
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: default avatarBryan C. Mills <bcmills@google.com>
parent 16f0f9c8
...@@ -117,7 +117,7 @@ TEXT runtime·read(SB),NOSPLIT|NOFRAME,$0 ...@@ -117,7 +117,7 @@ TEXT runtime·read(SB),NOSPLIT|NOFRAME,$0
MOVW n+8(FP), R2 // arg 3 count MOVW n+8(FP), R2 // arg 3 count
MOVW $SYS_read, R7 MOVW $SYS_read, R7
SWI $0 SWI $0
SUB.CS $0, R0, R0 // caller expects negative errno RSB.CS $0, R0 // caller expects negative errno
MOVW R0, ret+12(FP) MOVW R0, ret+12(FP)
RET RET
...@@ -153,7 +153,7 @@ TEXT runtime·write1(SB),NOSPLIT|NOFRAME,$0 ...@@ -153,7 +153,7 @@ TEXT runtime·write1(SB),NOSPLIT|NOFRAME,$0
MOVW n+8(FP), R2 // arg 3 count MOVW n+8(FP), R2 // arg 3 count
MOVW $SYS_write, R7 MOVW $SYS_write, R7
SWI $0 SWI $0
SUB.CS $0, R0, R0 // caller expects negative errno RSB.CS $0, R0 // caller expects negative errno
MOVW R0, ret+12(FP) MOVW R0, ret+12(FP)
RET RET
......
...@@ -92,7 +92,7 @@ TEXT runtime·read(SB),NOSPLIT|NOFRAME,$0 ...@@ -92,7 +92,7 @@ TEXT runtime·read(SB),NOSPLIT|NOFRAME,$0
MOVW p+4(FP), R1 MOVW p+4(FP), R1
MOVW n+8(FP), R2 MOVW n+8(FP), R2
SWI $SYS_read SWI $SYS_read
SUB.CS $0, R0, R0 // caller expects negative errno RSB.CS $0, R0 // caller expects negative errno
MOVW R0, ret+12(FP) MOVW R0, ret+12(FP)
RET RET
...@@ -125,7 +125,7 @@ TEXT runtime·write1(SB),NOSPLIT|NOFRAME,$0 ...@@ -125,7 +125,7 @@ TEXT runtime·write1(SB),NOSPLIT|NOFRAME,$0
MOVW p+4(FP), R1 // arg 2 - buf MOVW p+4(FP), R1 // arg 2 - buf
MOVW n+8(FP), R2 // arg 3 - nbyte MOVW n+8(FP), R2 // arg 3 - nbyte
SWI $SYS_write SWI $SYS_write
SUB.CS $0, R0, R0 // caller expects negative errno RSB.CS $0, R0 // caller expects negative errno
MOVW R0, ret+12(FP) MOVW R0, ret+12(FP)
RET RET
......
...@@ -55,7 +55,7 @@ TEXT runtime·read(SB),NOSPLIT|NOFRAME,$0 ...@@ -55,7 +55,7 @@ TEXT runtime·read(SB),NOSPLIT|NOFRAME,$0
MOVW n+8(FP), R2 // arg 3 - nbyte MOVW n+8(FP), R2 // arg 3 - nbyte
MOVW $3, R12 // sys_read MOVW $3, R12 // sys_read
SWI $0 SWI $0
SUB.CS $0, R0, R0 // caller expects negative errno RSB.CS $0, R0 // caller expects negative errno
MOVW R0, ret+12(FP) MOVW R0, ret+12(FP)
RET RET
...@@ -82,7 +82,7 @@ TEXT runtime·write1(SB),NOSPLIT|NOFRAME,$0 ...@@ -82,7 +82,7 @@ TEXT runtime·write1(SB),NOSPLIT|NOFRAME,$0
MOVW n+8(FP), R2 // arg 3 - nbyte MOVW n+8(FP), R2 // arg 3 - nbyte
MOVW $4, R12 // sys_write MOVW $4, R12 // sys_write
SWI $0 SWI $0
SUB.CS $0, R0, R0 // caller expects negative errno RSB.CS $0, R0 // caller expects negative errno
MOVW R0, ret+12(FP) MOVW R0, ret+12(FP)
RET RET
......
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