mirror of
https://github.com/golang/go
synced 2024-11-22 21:20:03 -07:00
3afbca5c5f
The previous name was wrong due to the mistaken assumption that calling f->g->getcallerpc and f->g->getcallersp would respectively return the pc/sp at g. However, they are actually referring to their caller's caller, i.e. f. Rename getcallerfp to getfp in order to stay consistent with this naming convention. Also see discussion on CL 463835. For #16638 This is a redo of CL 481617 that became necessary because CL 461738 added another call site for getcallerfp(). Change-Id: If0b536e85a6c26061b65e7b5c2859fc31385d025 Reviewed-on: https://go-review.googlesource.com/c/go/+/494857 Reviewed-by: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Felix Geisendörfer <felix.geisendoerfer@datadoghq.com>
25 lines
708 B
Go
25 lines
708 B
Go
// Copyright 2018 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package runtime
|
|
|
|
import "unsafe"
|
|
|
|
func float64touint32(a float64) uint32
|
|
func uint32tofloat64(a uint32) float64
|
|
|
|
// stackcheck checks that SP is in range [g->stack.lo, g->stack.hi).
|
|
func stackcheck()
|
|
|
|
// Called from assembly only; declared for go vet.
|
|
func setldt(slot uintptr, base unsafe.Pointer, size uintptr)
|
|
func emptyfunc()
|
|
|
|
//go:noescape
|
|
func asmcgocall_no_g(fn, arg unsafe.Pointer)
|
|
|
|
// getfp returns the frame pointer register of its caller or 0 if not implemented.
|
|
// TODO: Make this a compiler intrinsic
|
|
func getfp() uintptr { return 0 }
|