diff options
author | Cherry Mui <cherryyz@google.com> | 2021-05-20 18:55:47 -0400 |
---|---|---|
committer | Cherry Mui <cherryyz@google.com> | 2021-05-21 21:52:38 +0000 |
commit | fb42fb705df4832a76165f9a36f3a8d5d7ca8f49 (patch) | |
tree | a76a3165314395e42aa19f25eb720323f568e843 /src/runtime/race.go | |
parent | 21db1d193cc3d830e1a7d53a04271631ce1198cd (diff) | |
download | go-fb42fb705df4832a76165f9a36f3a8d5d7ca8f49.tar.gz go-fb42fb705df4832a76165f9a36f3a8d5d7ca8f49.zip |
[dev.typeparams] runtime: use internal/abi.FuncPCABI0 to take address of assembly functions
There are a few assembly functions in the runtime that are marked
as ABIInternal, solely because funcPC can get the right address.
The functions themselves do not actually follow ABIInternal (or
irrelevant). Now we have internal/abi.FuncPCABI0, use that, and
un-mark the functions.
Also un-mark assembly functions that are only called in assembly.
For them, it only matters if the caller and callee are consistent.
Change-Id: I240e126ac13cb362f61ff8482057ee9f53c24097
Reviewed-on: https://go-review.googlesource.com/c/go/+/321950
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Diffstat (limited to 'src/runtime/race.go')
-rw-r--r-- | src/runtime/race.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/runtime/race.go b/src/runtime/race.go index cc8c5db1bd..f1c3c3098d 100644 --- a/src/runtime/race.go +++ b/src/runtime/race.go @@ -8,6 +8,7 @@ package runtime import ( + "internal/abi" "unsafe" ) @@ -361,7 +362,7 @@ func raceinit() (gctx, pctx uintptr) { throw("raceinit: race build must use cgo") } - racecall(&__tsan_init, uintptr(unsafe.Pointer(&gctx)), uintptr(unsafe.Pointer(&pctx)), funcPC(racecallbackthunk), 0) + racecall(&__tsan_init, uintptr(unsafe.Pointer(&gctx)), uintptr(unsafe.Pointer(&pctx)), abi.FuncPCABI0(racecallbackthunk), 0) // Round data segment to page boundaries, because it's used in mmap(). start := ^uintptr(0) |