From 229aaac19e041ac74ab043d6ef09c8406bb0a9e7 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Fri, 22 Sep 2017 15:16:26 -0400 Subject: 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 TryBot-Result: Gobot Gobot Reviewed-by: David Chase --- src/runtime/panic.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/runtime/panic.go') diff --git a/src/runtime/panic.go b/src/runtime/panic.go index 2cda10565b..90a1c0bdd1 100644 --- a/src/runtime/panic.go +++ b/src/runtime/panic.go @@ -83,7 +83,7 @@ func deferproc(siz int32, fn *funcval) { // arguments of fn follow fn // Until the copy completes, we can only call nosplit routines. sp := getcallersp(unsafe.Pointer(&siz)) argp := uintptr(unsafe.Pointer(&fn)) + unsafe.Sizeof(fn) - callerpc := getcallerpc(unsafe.Pointer(&siz)) + callerpc := getcallerpc() d := newdefer(siz) if d._panic != nil { @@ -591,7 +591,7 @@ func startpanic() { //go:nosplit func dopanic(unused int) { - pc := getcallerpc(unsafe.Pointer(&unused)) + pc := getcallerpc() sp := getcallersp(unsafe.Pointer(&unused)) gp := getg() systemstack(func() { -- cgit v1.3-5-g9baa