diff options
author | Cherry Zhang <lunaria21@gmail.com> | 2016-04-27 22:18:24 -0400 |
---|---|---|
committer | Minux Ma <minux@golang.org> | 2016-05-04 16:41:10 +0000 |
commit | b6687c8933e2e123cd336d6ee96aa43df40bfc24 (patch) | |
tree | 162f8e8544b853d50b10cc02281f0a2d7b9d9506 /src/runtime/tls_mips64x.s | |
parent | 6e9043234221678e53d3b46ea98fb2ed56c260b7 (diff) | |
download | go-b6687c8933e2e123cd336d6ee96aa43df40bfc24.tar.gz go-b6687c8933e2e123cd336d6ee96aa43df40bfc24.zip |
runtime: add linux/mips64x cgo support
Change-Id: Id40dd05b7b264f3b779fdf9ccc2421ba4bc70589
Reviewed-on: https://go-review.googlesource.com/19806
Reviewed-by: Minux Ma <minux@golang.org>
Diffstat (limited to 'src/runtime/tls_mips64x.s')
-rw-r--r-- | src/runtime/tls_mips64x.s | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/runtime/tls_mips64x.s b/src/runtime/tls_mips64x.s index 870eecb8dd..53bd6f2615 100644 --- a/src/runtime/tls_mips64x.s +++ b/src/runtime/tls_mips64x.s @@ -16,8 +16,15 @@ TEXT runtime·save_g(SB),NOSPLIT,$-8-0 MOVB runtime·iscgo(SB), R23 BEQ R23, nocgo + MOVV R3, R23 // save R3 + MOVV g, runtime·tls_g(SB) // TLS relocation clobbers R3 + MOVV R23, R3 // restore R3 + nocgo: RET TEXT runtime·load_g(SB),NOSPLIT,$-8-0 + MOVV runtime·tls_g(SB), g // TLS relocation clobbers R3 RET + +GLOBL runtime·tls_g(SB), TLSBSS, $8 |