aboutsummaryrefslogtreecommitdiff
path: root/src/internal/runtime/sys
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal/runtime/sys')
-rw-r--r--src/internal/runtime/sys/intrinsics.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/internal/runtime/sys/intrinsics.go b/src/internal/runtime/sys/intrinsics.go
index 9607f805c8..8a431d0b36 100644
--- a/src/internal/runtime/sys/intrinsics.go
+++ b/src/internal/runtime/sys/intrinsics.go
@@ -208,26 +208,28 @@ func Prefetch(addr uintptr) {}
func PrefetchStreamed(addr uintptr) {}
// GetCallerPC returns the program counter (PC) of its caller's caller.
-// getcallersp returns the stack pointer (SP) of its caller's caller.
+// GetCallerSP returns the stack pointer (SP) of its caller's caller.
// Both are implemented as intrinsics on every platform.
//
// For example:
//
// func f(arg1, arg2, arg3 int) {
// pc := GetCallerPC()
-// sp := getcallersp()
+// sp := GetCallerSP()
// }
//
// These two lines find the PC and SP immediately following
// the call to f (where f will return).
//
-// The call to GetCallerPC and getcallersp must be done in the
+// The call to GetCallerPC and GetCallerSP must be done in the
// frame being asked about.
//
-// The result of getcallersp is correct at the time of the return,
+// The result of GetCallerSP is correct at the time of the return,
// but it may be invalidated by any subsequent call to a function
// that might relocate the stack in order to grow or shrink it.
-// A general rule is that the result of getcallersp should be used
+// A general rule is that the result of GetCallerSP should be used
// immediately and can only be passed to nosplit functions.
func GetCallerPC() uintptr
+
+func GetCallerSP() uintptr