aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/stubs.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2017-09-22 15:16:26 -0400
committerAustin Clements <austin@google.com>2017-09-22 22:17:15 +0000
commit229aaac19e041ac74ab043d6ef09c8406bb0a9e7 (patch)
treebfe5daa095c648c67152a4cfdc7365b55c203876 /src/runtime/stubs.go
parent8cb2952f2f9c80246572b951e2663e79962796c0 (diff)
downloadgo-229aaac19e041ac74ab043d6ef09c8406bb0a9e7.tar.gz
go-229aaac19e041ac74ab043d6ef09c8406bb0a9e7.zip
runtime: remove getcallerpc argument
Now that getcallerpc is a compiler intrinsic on x86 and non-x86 platforms don't need the argument, we can drop it. Sadly, this doesn't let us remove any dummy arguments since all of those cases also use getcallersp, which still takes the argument pointer, but this is at least an improvement. Change-Id: I9c34a41cf2c18cba57f59938390bf9491efb22d2 Reviewed-on: https://go-review.googlesource.com/65474 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/runtime/stubs.go')
-rw-r--r--src/runtime/stubs.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/stubs.go b/src/runtime/stubs.go
index 65f1695ec4..373ece4e0c 100644
--- a/src/runtime/stubs.go
+++ b/src/runtime/stubs.go
@@ -198,7 +198,7 @@ func publicationBarrier()
// getcallerpc returns the program counter (PC) of its caller's caller.
// getcallersp returns the stack pointer (SP) of its caller's caller.
-// For both, the argp must be a pointer to the caller's first function argument.
+// argp must be a pointer to the caller's first function argument.
// The implementation may or may not use argp, depending on
// the architecture. The implementation may be a compiler
// intrinsic; there is not necessarily code implementing this
@@ -207,7 +207,7 @@ func publicationBarrier()
// For example:
//
// func f(arg1, arg2, arg3 int) {
-// pc := getcallerpc(unsafe.Pointer(&arg1))
+// pc := getcallerpc()
// sp := getcallersp(unsafe.Pointer(&arg1))
// }
//
@@ -227,7 +227,7 @@ func publicationBarrier()
// immediately and can only be passed to nosplit functions.
//go:noescape
-func getcallerpc(argp unsafe.Pointer) uintptr
+func getcallerpc() uintptr
//go:nosplit
func getcallersp(argp unsafe.Pointer) uintptr {