aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/runtime/asm_amd64.s2
-rw-r--r--src/runtime/asm_arm64.s2
-rw-r--r--src/runtime/export_test.go2
-rw-r--r--src/runtime/export_windows_test.go2
-rw-r--r--src/runtime/os_wasm.go5
-rw-r--r--src/runtime/stubs_386.go5
-rw-r--r--src/runtime/stubs_amd64.go4
-rw-r--r--src/runtime/stubs_arm.go5
-rw-r--r--src/runtime/stubs_arm64.go4
-rw-r--r--src/runtime/stubs_loong64.go5
-rw-r--r--src/runtime/stubs_mips64x.go5
-rw-r--r--src/runtime/stubs_mipsx.go5
-rw-r--r--src/runtime/stubs_ppc64x.go5
-rw-r--r--src/runtime/stubs_riscv64.go5
-rw-r--r--src/runtime/stubs_s390x.go5
-rw-r--r--src/runtime/trace.go2
16 files changed, 36 insertions, 27 deletions
diff --git a/src/runtime/asm_amd64.s b/src/runtime/asm_amd64.s
index 7fe8528d19..4ba2333f55 100644
--- a/src/runtime/asm_amd64.s
+++ b/src/runtime/asm_amd64.s
@@ -2088,6 +2088,6 @@ TEXT runtime·retpolineR13(SB),NOSPLIT|NOFRAME,$0; RETPOLINE(13)
TEXT runtime·retpolineR14(SB),NOSPLIT|NOFRAME,$0; RETPOLINE(14)
TEXT runtime·retpolineR15(SB),NOSPLIT|NOFRAME,$0; RETPOLINE(15)
-TEXT ·getcallerfp<ABIInternal>(SB),NOSPLIT|NOFRAME,$0
+TEXT ·getfp<ABIInternal>(SB),NOSPLIT|NOFRAME,$0
MOVQ BP, AX
RET
diff --git a/src/runtime/asm_arm64.s b/src/runtime/asm_arm64.s
index 5cce33d7fe..bd736ca8d2 100644
--- a/src/runtime/asm_arm64.s
+++ b/src/runtime/asm_arm64.s
@@ -1568,6 +1568,6 @@ TEXT runtime·panicSliceConvert<ABIInternal>(SB),NOSPLIT,$0-16
MOVD R3, R1
JMP runtime·goPanicSliceConvert<ABIInternal>(SB)
-TEXT ·getcallerfp<ABIInternal>(SB),NOSPLIT|NOFRAME,$0
+TEXT ·getfp<ABIInternal>(SB),NOSPLIT|NOFRAME,$0
MOVD R29, R0
RET
diff --git a/src/runtime/export_test.go b/src/runtime/export_test.go
index db91bc650d..5dc32ac5f7 100644
--- a/src/runtime/export_test.go
+++ b/src/runtime/export_test.go
@@ -1826,7 +1826,7 @@ func PersistentAlloc(n uintptr) unsafe.Pointer {
// FPCallers works like Callers and uses frame pointer unwinding to populate
// pcBuf with the return addresses of the physical frames on the stack.
func FPCallers(pcBuf []uintptr) int {
- return fpTracebackPCs(unsafe.Pointer(getcallerfp()), pcBuf)
+ return fpTracebackPCs(unsafe.Pointer(getfp()), pcBuf)
}
var (
diff --git a/src/runtime/export_windows_test.go b/src/runtime/export_windows_test.go
index 5b9f08fb79..8e7662da6e 100644
--- a/src/runtime/export_windows_test.go
+++ b/src/runtime/export_windows_test.go
@@ -33,6 +33,6 @@ func NewContextStub() ContextStub {
var ctx context
ctx.set_ip(getcallerpc())
ctx.set_sp(getcallersp())
- ctx.set_fp(getcallerfp())
+ ctx.set_fp(getfp())
return ContextStub{ctx}
}
diff --git a/src/runtime/os_wasm.go b/src/runtime/os_wasm.go
index 1a6f7d802f..bf78dfb5f9 100644
--- a/src/runtime/os_wasm.go
+++ b/src/runtime/os_wasm.go
@@ -137,8 +137,9 @@ func preemptM(mp *m) {
// No threads, so nothing to do.
}
-// getcallerfp returns the address of the frame pointer in the callers frame or 0 if not implemented.
-func getcallerfp() uintptr { return 0 }
+// 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 }
func setProcessCPUProfiler(hz int32) {}
func setThreadCPUProfiler(hz int32) {}
diff --git a/src/runtime/stubs_386.go b/src/runtime/stubs_386.go
index ef531367c9..a1dd023974 100644
--- a/src/runtime/stubs_386.go
+++ b/src/runtime/stubs_386.go
@@ -19,5 +19,6 @@ func emptyfunc()
//go:noescape
func asmcgocall_no_g(fn, arg unsafe.Pointer)
-// getcallerfp returns the address of the frame pointer in the callers frame or 0 if not implemented.
-func getcallerfp() uintptr { return 0 }
+// 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 }
diff --git a/src/runtime/stubs_amd64.go b/src/runtime/stubs_amd64.go
index 3e7cf4f383..a86a496457 100644
--- a/src/runtime/stubs_amd64.go
+++ b/src/runtime/stubs_amd64.go
@@ -48,6 +48,6 @@ func asmcgocall_no_g(fn, arg unsafe.Pointer)
func spillArgs()
func unspillArgs()
-// getcallerfp returns the address of the frame pointer in the callers frame or 0 if not implemented.
+// getfp returns the frame pointer register of its caller or 0 if not implemented.
// TODO: Make this a compiler intrinsic
-func getcallerfp() uintptr
+func getfp() uintptr
diff --git a/src/runtime/stubs_arm.go b/src/runtime/stubs_arm.go
index be40a2b06a..e19f1a87b2 100644
--- a/src/runtime/stubs_arm.go
+++ b/src/runtime/stubs_arm.go
@@ -24,5 +24,6 @@ func read_tls_fallback()
//go:noescape
func asmcgocall_no_g(fn, arg unsafe.Pointer)
-// getcallerfp returns the address of the frame pointer in the callers frame or 0 if not implemented.
-func getcallerfp() uintptr { return 0 }
+// 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 }
diff --git a/src/runtime/stubs_arm64.go b/src/runtime/stubs_arm64.go
index 723337ce52..df04e64291 100644
--- a/src/runtime/stubs_arm64.go
+++ b/src/runtime/stubs_arm64.go
@@ -22,6 +22,6 @@ func emptyfunc()
func spillArgs()
func unspillArgs()
-// getcallerfp returns the address of the frame pointer in the callers frame or 0 if not implemented.
+// getfp returns the frame pointer register of its caller or 0 if not implemented.
// TODO: Make this a compiler intrinsic
-func getcallerfp() uintptr
+func getfp() uintptr
diff --git a/src/runtime/stubs_loong64.go b/src/runtime/stubs_loong64.go
index 0575c3093d..556983cad1 100644
--- a/src/runtime/stubs_loong64.go
+++ b/src/runtime/stubs_loong64.go
@@ -10,5 +10,6 @@ package runtime
func load_g()
func save_g()
-// getcallerfp returns the address of the frame pointer in the callers frame or 0 if not implemented.
-func getcallerfp() uintptr { return 0 }
+// 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 }
diff --git a/src/runtime/stubs_mips64x.go b/src/runtime/stubs_mips64x.go
index dbc4424f6c..f0cf088620 100644
--- a/src/runtime/stubs_mips64x.go
+++ b/src/runtime/stubs_mips64x.go
@@ -15,5 +15,6 @@ func save_g()
//go:noescape
func asmcgocall_no_g(fn, arg unsafe.Pointer)
-// getcallerfp returns the address of the frame pointer in the callers frame or 0 if not implemented.
-func getcallerfp() uintptr { return 0 }
+// 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 }
diff --git a/src/runtime/stubs_mipsx.go b/src/runtime/stubs_mipsx.go
index abae8418a1..84ba147b85 100644
--- a/src/runtime/stubs_mipsx.go
+++ b/src/runtime/stubs_mipsx.go
@@ -10,5 +10,6 @@ package runtime
func load_g()
func save_g()
-// getcallerfp returns the address of the frame pointer in the callers frame or 0 if not implemented.
-func getcallerfp() uintptr { return 0 }
+// 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 }
diff --git a/src/runtime/stubs_ppc64x.go b/src/runtime/stubs_ppc64x.go
index 67035eb7e8..0b7771ef03 100644
--- a/src/runtime/stubs_ppc64x.go
+++ b/src/runtime/stubs_ppc64x.go
@@ -16,5 +16,6 @@ func reginit()
func spillArgs()
func unspillArgs()
-// getcallerfp returns the address of the frame pointer in the callers frame or 0 if not implemented.
-func getcallerfp() uintptr { return 0 }
+// 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 }
diff --git a/src/runtime/stubs_riscv64.go b/src/runtime/stubs_riscv64.go
index 0df1659c4a..b07d7f8746 100644
--- a/src/runtime/stubs_riscv64.go
+++ b/src/runtime/stubs_riscv64.go
@@ -15,5 +15,6 @@ func save_g()
func spillArgs()
func unspillArgs()
-// getcallerfp returns the address of the frame pointer in the callers frame or 0 if not implemented.
-func getcallerfp() uintptr { return 0 }
+// 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 }
diff --git a/src/runtime/stubs_s390x.go b/src/runtime/stubs_s390x.go
index 799f4e948f..a2b07ff8aa 100644
--- a/src/runtime/stubs_s390x.go
+++ b/src/runtime/stubs_s390x.go
@@ -8,5 +8,6 @@ package runtime
func load_g()
func save_g()
-// getcallerfp returns the address of the frame pointer in the callers frame or 0 if not implemented.
-func getcallerfp() uintptr { return 0 }
+// 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 }
diff --git a/src/runtime/trace.go b/src/runtime/trace.go
index 378cd7bb08..2f9e141b09 100644
--- a/src/runtime/trace.go
+++ b/src/runtime/trace.go
@@ -970,7 +970,7 @@ func traceStackID(mp *m, pcBuf []uintptr, skip int) uint64 {
// Fast path: Unwind using frame pointers.
pcBuf[0] = uintptr(skip)
if curgp == gp {
- nstk += fpTracebackPCs(unsafe.Pointer(getcallerfp()), pcBuf[1:])
+ nstk += fpTracebackPCs(unsafe.Pointer(getfp()), pcBuf[1:])
} else if curgp != nil {
// We're called on the g0 stack through mcall(fn) or systemstack(fn). To
// behave like gcallers above, we start unwinding from sched.bp, which