From: Keith Randall Date: Tue, 15 Mar 2022 20:03:39 +0000 (-0700) Subject: runtime: make racereadrange ABIinternal X-Git-Tag: go1.19beta1~347 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f566fe3910593de96b6ab17abc906934de78d27c;p=gostls13.git runtime: make racereadrange ABIinternal CL 266638 marked racewriterange (and some other race functions) as ABIinternal but missed racereadrange. arm64 and ppc64le (the other two register ABI platforms at the moment) already have racereadrange marked as such. The other two instrumented calls are to racefuncenter/racefuncexit. Do you think they would need this treatment as well? arm64 already does, but amd64 and ppc64le do not. Fixes #51459 Change-Id: I3f54e1298433b6d67bfe18120d9f86205ff66a73 Reviewed-on: https://go-review.googlesource.com/c/go/+/393154 Reviewed-by: Than McIntosh Run-TryBot: Keith Randall TryBot-Result: Gopher Robot Reviewed-by: Keith Randall --- diff --git a/src/runtime/race_amd64.s b/src/runtime/race_amd64.s index f055acf77d..c679a876b8 100644 --- a/src/runtime/race_amd64.s +++ b/src/runtime/race_amd64.s @@ -94,9 +94,11 @@ TEXT runtime·racewritepc(SB), NOSPLIT, $0-24 // func runtime·racereadrange(addr, size uintptr) // Called from instrumented code. -TEXT runtime·racereadrange(SB), NOSPLIT, $0-16 - MOVQ addr+0(FP), RARG1 - MOVQ size+8(FP), RARG2 +// Defined as ABIInternal so as to avoid introducing a wrapper, +// which would render runtime.getcallerpc ineffective. +TEXT runtime·racereadrange(SB), NOSPLIT, $0-16 + MOVQ AX, RARG1 + MOVQ BX, RARG2 MOVQ (SP), RARG3 // void __tsan_read_range(ThreadState *thr, void *addr, uintptr size, void *pc); MOVQ $__tsan_read_range(SB), AX