From: Josh Bleecher Snyder Date: Thu, 8 Sep 2016 16:49:31 +0000 (-0700) Subject: runtime: simplify getargp X-Git-Tag: go1.8beta1~1448 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=07bcc165475f3c34433ebf48b05f704fd40e5639;p=gostls13.git runtime: simplify getargp Change-Id: I9ed62e8a6d8b9204c18748efd7845adabf3460b9 Reviewed-on: https://go-review.googlesource.com/28775 Run-TryBot: Josh Bleecher Snyder Reviewed-by: Keith Randall Reviewed-by: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- diff --git a/src/runtime/panic.go b/src/runtime/panic.go index 60b277d52c..016e29013a 100644 --- a/src/runtime/panic.go +++ b/src/runtime/panic.go @@ -504,15 +504,9 @@ func gopanic(e interface{}) { // getargp returns the location where the caller // writes outgoing function call arguments. //go:nosplit +//go:noinline func getargp(x int) uintptr { // x is an argument mainly so that we can return its address. - // However, we need to make the function complex enough - // that it won't be inlined. We always pass x = 0, so this code - // does nothing other than keep the compiler from thinking - // the function is simple enough to inline. - if x > 0 { - return getcallersp(unsafe.Pointer(&x)) * 0 - } return uintptr(noescape(unsafe.Pointer(&x))) }