diff options
author | Elias Naur <elias.naur@gmail.com> | 2018-11-17 10:00:14 +0100 |
---|---|---|
committer | Elias Naur <elias.naur@gmail.com> | 2018-11-17 20:33:30 +0000 |
commit | a889aaf8bfcf803eaed411ebae672cc6c52252bc (patch) | |
tree | b67eb104a6187623347df93469cd20ca6e4ddbc6 /src/runtime/asm_arm64.s | |
parent | 1f388bc80628f38b033fb229b76997d8f5660c10 (diff) | |
download | go-a889aaf8bfcf803eaed411ebae672cc6c52252bc.tar.gz go-a889aaf8bfcf803eaed411ebae672cc6c52252bc.zip |
runtime: don't use thread local storage before it is set up on iOS
CL 138675 added a call to runtime.save_g which uses thread local
storage to store g. On iOS however, that storage was not initialized
yet. Move the call to below _cgo_init where it is set up.
Change-Id: I14538d3e7d56ff35a6fa02c47bca306d24c38010
Reviewed-on: https://go-review.googlesource.com/c/150157
Run-TryBot: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/runtime/asm_arm64.s')
-rw-r--r-- | src/runtime/asm_arm64.s | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/asm_arm64.s b/src/runtime/asm_arm64.s index 28d3077b9d..bbeb3df0c8 100644 --- a/src/runtime/asm_arm64.s +++ b/src/runtime/asm_arm64.s @@ -18,7 +18,6 @@ TEXT runtime·rt0_go(SB),NOSPLIT,$0 // create istack out of the given (operating system) stack. // _cgo_init may update stackguard. MOVD $runtime·g0(SB), g - BL runtime·save_g(SB) MOVD RSP, R7 MOVD $(-64*1024)(R7), R0 MOVD R0, g_stackguard0(g) @@ -45,6 +44,7 @@ TEXT runtime·rt0_go(SB),NOSPLIT,$0 ADD $16, RSP nocgo: + BL runtime·save_g(SB) // update stackguard after _cgo_init MOVD (g_stack+stack_lo)(g), R0 ADD $const__StackGuard, R0 |