]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: add intrinsic for reading caller's pc
authorDavid Chase <drchase@google.com>
Mon, 24 Oct 2016 14:25:05 +0000 (10:25 -0400)
committerDavid Chase <drchase@google.com>
Fri, 22 Sep 2017 18:37:03 +0000 (18:37 +0000)
commit6cac100eefbe07ffd2c9bf64c9a782bf93d79081
tree67dab0b4c4ab04efe4078d29c0b44f1f9eef4b80
parent332719f7cee2abafb3963009d44ad7cc93474707
cmd/compile: add intrinsic for reading caller's pc

First step towards removing the mandatory argument for
getcallerpc, which solves certain problems for the runtime.
This might also slightly improve performance.

Intrinsic enabled on 386, amd64, amd64p32,
runtime asm implementation removed on those architectures.

Now-superfluous argument remains in getcallerpc signature
(for a future CL; non-386/amd64 asm funcs ignore it).

Added getcallerpc to the "not a real function" test
in dcl.go, that story is a little odd with respect to
unexported functions but that is not this CL.

Fixes #17327.

Change-Id: I5df1ad91f27ee9ac1f0dd88fa48f1329d6306c3e
Reviewed-on: https://go-review.googlesource.com/31851
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
16 files changed:
src/cmd/compile/internal/amd64/ssa.go
src/cmd/compile/internal/gc/dcl.go
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/ssa/gen/386.rules
src/cmd/compile/internal/ssa/gen/386Ops.go
src/cmd/compile/internal/ssa/gen/AMD64.rules
src/cmd/compile/internal/ssa/gen/AMD64Ops.go
src/cmd/compile/internal/ssa/gen/genericOps.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/ssa/rewrite386.go
src/cmd/compile/internal/ssa/rewriteAMD64.go
src/cmd/compile/internal/x86/ssa.go
src/runtime/asm_386.s
src/runtime/asm_amd64.s
src/runtime/asm_amd64p32.s
src/runtime/stubs.go