]> Cypherpunks repositories - gostls13.git/commit
runtime: fix syscall error returns on mips/mips64/ppc64
authorDavid Wimmer <davidlwimmer@gmail.com>
Wed, 25 Jul 2018 18:44:07 +0000 (18:44 +0000)
committerIan Lance Taylor <iant@golang.org>
Wed, 1 Aug 2018 18:44:46 +0000 (18:44 +0000)
commitacd30e9a827a1df4d99592cdd16e26a4395ebcfe
tree537e70ebcc4796da6df627bdeccafc1e75797598
parentb8669ef1ceabd386b58a99b4e2f4e67915fec428
runtime: fix syscall error returns on mips/mips64/ppc64

The linux syscall functions used in runtime are designed around the calling
convention of returning errors as negative numbers. On some other systems
(like mips and ppc) the actual syscalls signal errors in other ways. This
means that the assembly implementations of the syscall functions on these
platforms need to transform the return values in the error cases to match
the expected negative errno values. This was addressed for certain syscalls
in https://golang.org/cl/19455 and https://golang.org/cl/89235. This patch
handles the rest of the syscall functions in sys_linux_*.s that return any
value for mips/mips64/ppc64.

Fixes #23446

Change-Id: I302100261231f76d5850ab2c2ea080170d7dba72
GitHub-Last-Rev: e358e2b08c76897b13f917cfa12b5085e20337f9
GitHub-Pull-Request: golang/go#26606
Reviewed-on: https://go-review.googlesource.com/125895
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/sys_linux_mips64x.s
src/runtime/sys_linux_mipsx.s
src/runtime/sys_linux_ppc64x.s