diff options
author | Dave Cheney <dave@cheney.net> | 2014-09-30 10:03:10 +1000 |
---|---|---|
committer | Dave Cheney <dave@cheney.net> | 2014-09-30 10:03:10 +1000 |
commit | 0b36211cfb823f41e3a201dd18ddee7a68b4d4e3 (patch) | |
tree | 4c1eb9c227c933f406b9b50634a5d20190bb2d6c /src/runtime/tls_arm.s | |
parent | 5368e63b57f742495fcbbb82bb15772b761004bf (diff) | |
download | go-0b36211cfb823f41e3a201dd18ddee7a68b4d4e3.tar.gz go-0b36211cfb823f41e3a201dd18ddee7a68b4d4e3.zip |
liblink: generate MRC replacement in liblink, not tls_arm
Fixes #8690.
This CL moves the save of LR around BL runtime.read_tls_fallback to liblink as it is not needed when MRC is not replaced.
LGTM=rsc, minux
R=rsc, khr, minux
CC=golang-codereviews
https://golang.org/cl/147310043
Diffstat (limited to 'src/runtime/tls_arm.s')
-rw-r--r-- | src/runtime/tls_arm.s | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/runtime/tls_arm.s b/src/runtime/tls_arm.s index 039b013833..85c3940bf2 100644 --- a/src/runtime/tls_arm.s +++ b/src/runtime/tls_arm.s @@ -31,11 +31,8 @@ TEXT runtimeĀ·save_g(SB),NOSPLIT,$-4 #endif // If the host does not support MRC the linker will replace it with // a call to runtime.read_tls_fallback which jumps to __kuser_get_tls. - // Both functions are written to only disturb R0 so it should be safe to - // use R11 here to temporarily store LR. - MOVW LR, R11 + // The replacement function saves LR in R11 over the call to read_tls_fallback. MRC 15, 0, R0, C13, C0, 3 // fetch TLS base pointer - MOVW R11, LR // $runtime.tlsg(SB) is a special linker symbol. // It is the offset from the TLS base pointer to our // thread-local storage for g. @@ -57,10 +54,8 @@ TEXT runtimeĀ·load_g(SB),NOSPLIT,$0 // nothing to do as nacl/arm does not use TLS at all. RET #endif - // See comment in save_g. - MOVW LR, R11 - MRC 15, 0, R0, C13, C0, 3 // fetch TLS base pointer - MOVW R11, LR + // See save_g + MRC 15, 0, R0, C13, C0, 3 // fetch TLS base pointer // $runtime.tlsg(SB) is a special linker symbol. // It is the offset from the TLS base pointer to our // thread-local storage for g. |