diff options
author | Fangming.Fang <fangming.fang@arm.com> | 2018-06-20 09:09:03 +0000 |
---|---|---|
committer | Cherry Zhang <cherryyz@google.com> | 2018-11-13 16:57:22 +0000 |
commit | 978cfa8e46d71992395d67382e96036596520cb6 (patch) | |
tree | 34c202e3f97b942b6dbf71f86ddf3785361ea39f /src/runtime/asm_arm64.s | |
parent | e787b133284263e53154b8b2f8f6078e8f0c9850 (diff) | |
download | go-978cfa8e46d71992395d67382e96036596520cb6.tar.gz go-978cfa8e46d71992395d67382e96036596520cb6.zip |
cmd,runtime: enable race detector on arm64
Changes include:
1. enable compiler option -race for arm64
2. add runtime/race_arm64.s to manage the calls from Go to the compiler-rt runtime
3. change racewalk.go to call racefuncenterfp instead of racefuncenter on arm64 to
allow the caller pc to be obtained in the asm code before calling the tsan version
4. race_linux_arm64.syso comes from compiler-rt which just supports 48bit VA, compiler-rt
is fetched from master branch which latest commit is 3aa2b775d08f903f804246af10b
Fixes #25682
Change-Id: I04364c580b8157fd117deecae74a4656ba16e005
Reviewed-on: https://go-review.googlesource.com/c/138675
Run-TryBot: Cherry Zhang <cherryyz@google.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 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/runtime/asm_arm64.s b/src/runtime/asm_arm64.s index 2248cec132..28d3077b9d 100644 --- a/src/runtime/asm_arm64.s +++ b/src/runtime/asm_arm64.s @@ -18,7 +18,8 @@ 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 - MOVD RSP, R7 + BL runtime·save_g(SB) + MOVD RSP, R7 MOVD $(-64*1024)(R7), R0 MOVD R0, g_stackguard0(g) MOVD R0, g_stackguard1(g) |