1
0
mirror of https://github.com/golang/go synced 2024-11-27 02:51:24 -07:00
go/src/internal
Cherry Zhang 1421516973 cmd/compile, internal/abi: add FuncPCABIxxx intrinsics
When ABI wrappers are used, there are cases where in Go code we
need the PC of the defined function instead of the ABI wrapper.
Currently we work around this by define such functions as
ABIInternal, even if they do not actually follow the internal ABI.

This CL introduces internal/abi.FuncPCABIxxx functions as compiler
intrinsics, which return the underlying defined function's entry
PC if the argument is a direct reference of a function of the
expected ABI, and reject it if it is of a different ABI.

As a proof of concept, change runtime.goexit back to ABI0 and use
internal/abi.FuncPCABI0 to retrieve its PC.

Updates #44065.

Change-Id: I02286f0f9d99e6a3090f9e8169dbafc6804a2da6
Reviewed-on: https://go-review.googlesource.com/c/go/+/304232
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
2021-04-23 21:05:39 +00:00
..
abi cmd/compile, internal/abi: add FuncPCABIxxx intrinsics 2021-04-23 21:05:39 +00:00
buildcfg internal/buildcfg: enable regabiargs by default 2021-04-20 15:45:02 +00:00
bytealg internal/bytealg: add power9 version of bytes index 2021-04-21 21:14:04 +00:00
cfg
cpu
execabs internal/execabs: replace ioutil.WriteFile with os.WriteFile 2021-04-12 21:57:23 +00:00
fmtsort
goexperiment internal/buildcfg: make regabi an alias for regabi sub-experiments 2021-04-16 22:45:02 +00:00
goroot
goversion
itoa
lazyregexp
lazytemplate
nettrace
obscuretestdata
oserror
poll internal/poll, net: fix comments regarding accept and sysSocket 2021-04-20 21:00:32 +00:00
profile
race
reflectlite
singleflight
syscall
sysinfo
testenv
testlog
trace runtime: move next_gc and last_next_gc into gcControllerState 2021-04-14 14:03:30 +00:00
unsafeheader
xcoff