diff options
| author | Paul E. Murphy <murp@ibm.com> | 2022-08-19 09:20:02 -0500 |
|---|---|---|
| committer | Paul Murphy <murp@ibm.com> | 2022-08-23 18:59:24 +0000 |
| commit | 7d1cab12c77a5fed788829b0566db9dfd7866ac9 (patch) | |
| tree | 62605e4dc75e19bc629edd134133ad30b5b65040 /src/runtime/rt0_linux_ppc64.s | |
| parent | ef22285f31ab16ff6751418705b8a7df8e0d661f (diff) | |
| download | go-7d1cab12c77a5fed788829b0566db9dfd7866ac9.tar.xz | |
runtime: fix ppc64 startup on newer linux kernels
R0 needs to be cleared at startup as it may not always be cleared
by the kernel on newer kernels.
Fixes #54547
Change-Id: Id7055699aaa8d8b193b7e3e784f075ce29ac3f1d
Reviewed-on: https://go-review.googlesource.com/c/go/+/424927
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
Diffstat (limited to 'src/runtime/rt0_linux_ppc64.s')
| -rw-r--r-- | src/runtime/rt0_linux_ppc64.s | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/runtime/rt0_linux_ppc64.s b/src/runtime/rt0_linux_ppc64.s index 897d61052a..c9300a9caf 100644 --- a/src/runtime/rt0_linux_ppc64.s +++ b/src/runtime/rt0_linux_ppc64.s @@ -22,6 +22,7 @@ TEXT _main<>(SB),NOSPLIT,$-8 // There is no TLS base pointer. // // TODO(austin): Support ABI v1 dynamic linking entry point + XOR R0, R0 // Note, newer kernels may not always set R0 to 0. MOVD $runtime·rt0_go(SB), R12 MOVD R12, CTR MOVBZ runtime·iscgo(SB), R5 |
