aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/rt0_linux_ppc64le.s
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2014-12-16 17:14:00 -0500
committerAustin Clements <austin@google.com>2015-01-07 20:36:19 +0000
commitf1c4444dfcca5967543d43190b6c80c9254b99ac (patch)
tree8ab1161d616799390899110a2c0dc7556c49c741 /src/runtime/rt0_linux_ppc64le.s
parentbbd2127909c6040cd8bb75108a5ecc82eddfb405 (diff)
downloadgo-f1c4444dfcca5967543d43190b6c80c9254b99ac.tar.gz
go-f1c4444dfcca5967543d43190b6c80c9254b99ac.zip
runtime: set up C TLS and save g to it on ppc64
Cgo will need this for calls from C to Go and for handling signals that may occur in C code. Change-Id: I50cc4caf17cd142bff501e7180a1e27721463ada Reviewed-on: https://go-review.googlesource.com/2008 Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/runtime/rt0_linux_ppc64le.s')
-rw-r--r--src/runtime/rt0_linux_ppc64le.s2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/runtime/rt0_linux_ppc64le.s b/src/runtime/rt0_linux_ppc64le.s
index a3b3cea0b5..dda29ab3a0 100644
--- a/src/runtime/rt0_linux_ppc64le.s
+++ b/src/runtime/rt0_linux_ppc64le.s
@@ -6,6 +6,8 @@ TEXT _rt0_ppc64le_linux(SB),NOSPLIT,$0
TEXT _main<>(SB),NOSPLIT,$-8
MOVD 0(R1), R3 // argc
ADD $8, R1, R4 // argv
+ MOVD $runtimeĀ·tls0(SB), R13 // TLS
+ ADD $0x7000, R13
BR main(SB)
TEXT main(SB),NOSPLIT,$-8