aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/race_amd64.s
diff options
context:
space:
mode:
authorDavid Chase <drchase@google.com>2015-10-09 16:48:30 -0400
committerDavid Chase <drchase@google.com>2015-10-18 13:30:54 +0000
commit57670ad8b29fb62dc87e970fde95e3263f6948ff (patch)
treea04f462c43b7fef761bf7834cb22276d7e40efa5 /src/runtime/race_amd64.s
parent177b697ba534431a266c9882af53fb776eb9b505 (diff)
downloadgo-57670ad8b29fb62dc87e970fde95e3263f6948ff.tar.gz
go-57670ad8b29fb62dc87e970fde95e3263f6948ff.zip
[dev.ssa] cmd/compile: fill remaining SSA gaps
Changed racewalk/race detector to use FP in a more sensible way. Relaxed checks for CONVNOP when race detecting. Modified tighten to ensure that GetClosurePtr cannot float out of entry block (turns out this cannot be relaxed, DX is sometimes stomped by other code accompanying race detection). Added case for addr(CONVNOP) Modified addr to take "bounded" flag to suppress nilchecks where it is set (usually, by race detector). Cannot leave unimplemented-complainer enabled because it turns out we are optimistically running SSA on every platform. Change-Id: Ife021654ee4065b3ffac62326d09b4b317b9f2e0 Reviewed-on: https://go-review.googlesource.com/15710 Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/runtime/race_amd64.s')
-rw-r--r--src/runtime/race_amd64.s16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/runtime/race_amd64.s b/src/runtime/race_amd64.s
index d9e674b61f..80c4d79a7d 100644
--- a/src/runtime/race_amd64.s
+++ b/src/runtime/race_amd64.s
@@ -159,14 +159,28 @@ call:
ret:
RET
+// func runtime·racefuncenterfp(fp uintptr)
+// Called from instrumented code.
+// Like racefuncenter but passes FP, not PC
+TEXT runtime·racefuncenterfp(SB), NOSPLIT, $0-8
+ MOVQ fp+0(FP), R11
+ MOVQ -8(R11), R11
+ JMP racefuncenter<>(SB)
+
// func runtime·racefuncenter(pc uintptr)
// Called from instrumented code.
TEXT runtime·racefuncenter(SB), NOSPLIT, $0-8
+ MOVQ callpc+0(FP), R11
+ JMP racefuncenter<>(SB)
+
+// Common code for racefuncenter/racefuncenterfp
+// R11 = caller's return address
+TEXT racefuncenter<>(SB), NOSPLIT, $0-0
MOVQ DX, R15 // save function entry context (for closures)
get_tls(R12)
MOVQ g(R12), R14
MOVQ g_racectx(R14), RARG0 // goroutine context
- MOVQ callpc+0(FP), RARG1
+ MOVQ R11, RARG1
// void __tsan_func_enter(ThreadState *thr, void *pc);
MOVQ $__tsan_func_enter(SB), AX
// racecall<> preserves R15