• David Chase's avatar
    cmd/compile: add intrinsic for reading caller's pc · 6cac100e
    David Chase authored
    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: 's avatarAustin Clements <austin@google.com>
    6cac100e
rewrite386.go 398 KB