diff options
| author | Michael Hudson-Doyle <michael.hudson@canonical.com> | 2015-10-08 22:49:39 +1300 |
|---|---|---|
| committer | Michael Hudson-Doyle <michael.hudson@canonical.com> | 2015-10-18 23:36:39 +0000 |
| commit | 6deb3c0619240c5b2f5d28e1f038eee6ac942318 (patch) | |
| tree | cb43064233cae8d33c16bb1ac18b7e277df2c2da /src/runtime/rt0_linux_ppc64.s | |
| parent | b8f8969fbd91e8c6a1a6e523be91a99f92d0f809 (diff) | |
| download | go-6deb3c0619240c5b2f5d28e1f038eee6ac942318.tar.xz | |
runtime, runtime/cgo: conform to PIC register use rules in ppc64 asm
PIC code on ppc64le uses R2 as a TOC pointer and when calling a function
through a function pointer must ensure the function pointer is in R12. These
rules are easy enough to follow unconditionally in our assembly, so do that.
Change-Id: Icfc4e47ae5dfbe15f581cbdd785cdeed6e40bc32
Reviewed-on: https://go-review.googlesource.com/15526
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/rt0_linux_ppc64.s')
| -rw-r--r-- | src/runtime/rt0_linux_ppc64.s | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/rt0_linux_ppc64.s b/src/runtime/rt0_linux_ppc64.s index 33e973db96..f814515438 100644 --- a/src/runtime/rt0_linux_ppc64.s +++ b/src/runtime/rt0_linux_ppc64.s @@ -18,6 +18,6 @@ TEXT _main<>(SB),NOSPLIT,$-8 BR main(SB) TEXT main(SB),NOSPLIT,$-8 - MOVD $runtime·rt0_go(SB), R31 - MOVD R31, CTR + MOVD $runtime·rt0_go(SB), R12 + MOVD R12, CTR BR (CTR) |
