]> Cypherpunks repositories - gostls13.git/commit
syscall, runtime/internal/syscall: always return 0 in r2 on ppc64{,le} linux syscalls
authorPaul E. Murphy <murp@ibm.com>
Mon, 14 Feb 2022 23:15:05 +0000 (17:15 -0600)
committerPaul Murphy <murp@ibm.com>
Thu, 3 Mar 2022 17:28:58 +0000 (17:28 +0000)
commit78070ec3d44fdd8e60271abf31f056aeac919cc3
treea46c75eac18f0f6daf7604c3f313fd8a554b2bc2
parentef92828bb9ffd77d6f08e402225557256b11cfad
syscall, runtime/internal/syscall: always return 0 in r2 on ppc64{,le} linux syscalls

Both endians perform syscalls similarly. Only CR0S0 and R3 hold
the resultant status of a syscall. A random value may be stored into
the second return value (r2) result in some cases. Always set it to
zero.

Fixes #51192

Change-Id: Ida6a5692578d2cdadf3099af28478b3bc364f623
Reviewed-on: https://go-review.googlesource.com/c/go/+/385796
Run-TryBot: Paul Murphy <murp@ibm.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Trust: Paul Murphy <murp@ibm.com>
src/runtime/internal/syscall/asm_linux_ppc64x.s
src/syscall/asm_linux_ppc64x.s