diff options
| author | Josh Bleecher Snyder <josharian@gmail.com> | 2016-09-08 09:49:31 -0700 |
|---|---|---|
| committer | Josh Bleecher Snyder <josharian@gmail.com> | 2016-09-08 17:10:22 +0000 |
| commit | 07bcc165475f3c34433ebf48b05f704fd40e5639 (patch) | |
| tree | 3256bc56baa6100f7420aa13d544f0a6339a17c1 /src | |
| parent | 70fd814f53ba57e6523363d865a6ba49063bfa15 (diff) | |
| download | go-07bcc165475f3c34433ebf48b05f704fd40e5639.tar.xz | |
runtime: simplify getargp
Change-Id: I9ed62e8a6d8b9204c18748efd7845adabf3460b9
Reviewed-on: https://go-review.googlesource.com/28775
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src')
| -rw-r--r-- | src/runtime/panic.go | 8 |
1 files changed, 1 insertions, 7 deletions
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))) } |
