]> Cypherpunks repositories - gostls13.git/commitdiff
Revert "runtime: rename getcallerfp to getfp"
authorMichael Pratt <mpratt@google.com>
Thu, 11 May 2023 17:01:44 +0000 (17:01 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 11 May 2023 17:15:06 +0000 (17:15 +0000)
This reverts CL 481617.

Reason for revert: breaks test build on Windows

Change-Id: Ifc1a323b0cc521e7a5a1f7de7b3da667f5fee375
Reviewed-on: https://go-review.googlesource.com/c/go/+/494377
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

15 files changed:
src/runtime/asm_amd64.s
src/runtime/asm_arm64.s
src/runtime/export_test.go
src/runtime/os_wasm.go
src/runtime/stubs_386.go
src/runtime/stubs_amd64.go
src/runtime/stubs_arm.go
src/runtime/stubs_arm64.go
src/runtime/stubs_loong64.go
src/runtime/stubs_mips64x.go
src/runtime/stubs_mipsx.go
src/runtime/stubs_ppc64x.go
src/runtime/stubs_riscv64.go
src/runtime/stubs_s390x.go
src/runtime/trace.go

index 403ef3fc56f708c9f559ce5fa3ad0aa8897aee1c..7fb1ae2cff49475637813f0655c8cddb213a0fb2 100644 (file)
@@ -2060,6 +2060,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 ·getfp<ABIInternal>(SB),NOSPLIT|NOFRAME,$0
+TEXT ·getcallerfp<ABIInternal>(SB),NOSPLIT|NOFRAME,$0
        MOVQ BP, AX
        RET
index 6c5105210b0dd8691d14c69bf5bd0a68ef76f4f7..6fe04a6445ec1fc809fa34f7b5da39d8930e71bd 100644 (file)
@@ -1544,6 +1544,6 @@ TEXT runtime·panicSliceConvert<ABIInternal>(SB),NOSPLIT,$0-16
        MOVD    R3, R1
        JMP     runtime·goPanicSliceConvert<ABIInternal>(SB)
 
-TEXT ·getfp<ABIInternal>(SB),NOSPLIT|NOFRAME,$0
+TEXT ·getcallerfp<ABIInternal>(SB),NOSPLIT|NOFRAME,$0
        MOVD R29, R0
        RET
index bd230c0476b4496a4856ca03913218c4f552dc93..07d14591a68515b444b7acfdca71c54508a882ee 100644 (file)
@@ -1820,5 +1820,5 @@ 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(skip int, pcBuf []uintptr) int {
-       return fpTracebackPCs(unsafe.Pointer(getfp()), skip, pcBuf)
+       return fpTracebackPCs(unsafe.Pointer(getcallerfp()), skip, pcBuf)
 }
index bf78dfb5f9f275042c6c9fccbd9c2e99cea00d21..1a6f7d802ff7f9b2a8bd3b30e44b278a0beef8e4 100644 (file)
@@ -137,9 +137,8 @@ func preemptM(mp *m) {
        // No threads, so nothing to do.
 }
 
-// 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 }
+// getcallerfp returns the address of the frame pointer in the callers frame or 0 if not implemented.
+func getcallerfp() uintptr { return 0 }
 
 func setProcessCPUProfiler(hz int32) {}
 func setThreadCPUProfiler(hz int32)  {}
index a1dd023974a0c6fc41159a759ead4b5ed8ab84c6..ef531367c9b8baa3fb4b71e5b9a723c25511c344 100644 (file)
@@ -19,6 +19,5 @@ 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 }
+// getcallerfp returns the address of the frame pointer in the callers frame or 0 if not implemented.
+func getcallerfp() uintptr { return 0 }
index a86a4964579e36e603969ac2ef7e4b56d166dc70..3e7cf4f38375e15999cc9b74c2821746d57a81cd 100644 (file)
@@ -48,6 +48,6 @@ func asmcgocall_no_g(fn, arg unsafe.Pointer)
 func spillArgs()
 func unspillArgs()
 
-// getfp returns the frame pointer register of its caller or 0 if not implemented.
+// getcallerfp returns the address of the frame pointer in the callers frame or 0 if not implemented.
 // TODO: Make this a compiler intrinsic
-func getfp() uintptr
+func getcallerfp() uintptr
index e19f1a87b2526a817e78661bd18e22a8e838df34..be40a2b06ad1f98d2085d360dba0b2f6833bad85 100644 (file)
@@ -24,6 +24,5 @@ func read_tls_fallback()
 //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 }
+// getcallerfp returns the address of the frame pointer in the callers frame or 0 if not implemented.
+func getcallerfp() uintptr { return 0 }
index df04e64291321588e38d2410fe2a4f67d2088390..723337ce52ae088ff84969b97928794486d89f23 100644 (file)
@@ -22,6 +22,6 @@ func emptyfunc()
 func spillArgs()
 func unspillArgs()
 
-// getfp returns the frame pointer register of its caller or 0 if not implemented.
+// getcallerfp returns the address of the frame pointer in the callers frame or 0 if not implemented.
 // TODO: Make this a compiler intrinsic
-func getfp() uintptr
+func getcallerfp() uintptr
index 556983cad1fbf6152a6f2ca064c72030ca0eb69f..0575c3093d1d985b8dd5cf14a816c57325416a0e 100644 (file)
@@ -10,6 +10,5 @@ package runtime
 func load_g()
 func save_g()
 
-// 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 }
+// getcallerfp returns the address of the frame pointer in the callers frame or 0 if not implemented.
+func getcallerfp() uintptr { return 0 }
index f0cf0886203d139e9809d4f61899832728437d2f..dbc4424f6c2d939cb04661b6559bd6382526676f 100644 (file)
@@ -15,6 +15,5 @@ func save_g()
 //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 }
+// getcallerfp returns the address of the frame pointer in the callers frame or 0 if not implemented.
+func getcallerfp() uintptr { return 0 }
index 84ba147b85c58cca662c68de5a2b9e3f1996699a..abae8418a1d9914f2e54f59fa2d1d2d3007d2627 100644 (file)
@@ -10,6 +10,5 @@ package runtime
 func load_g()
 func save_g()
 
-// 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 }
+// getcallerfp returns the address of the frame pointer in the callers frame or 0 if not implemented.
+func getcallerfp() uintptr { return 0 }
index 0b7771ef03006e00249aa89ae8c9bb3c2be2d660..67035eb7e8c8fb0b0bf593507e372241e47ef9f7 100644 (file)
@@ -16,6 +16,5 @@ func reginit()
 func spillArgs()
 func unspillArgs()
 
-// 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 }
+// getcallerfp returns the address of the frame pointer in the callers frame or 0 if not implemented.
+func getcallerfp() uintptr { return 0 }
index b07d7f8746cd0c872fe5f93dc5e18da54646ee4b..0df1659c4a59688c9cbb68b2a9e3a2623e050580 100644 (file)
@@ -15,6 +15,5 @@ func save_g()
 func spillArgs()
 func unspillArgs()
 
-// 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 }
+// getcallerfp returns the address of the frame pointer in the callers frame or 0 if not implemented.
+func getcallerfp() uintptr { return 0 }
index a2b07ff8aa8e6bbc989201c254039f806a00082f..799f4e948fc0c92d9346d001a7868008f0455e70 100644 (file)
@@ -8,6 +8,5 @@ package runtime
 func load_g()
 func save_g()
 
-// 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 }
+// getcallerfp returns the address of the frame pointer in the callers frame or 0 if not implemented.
+func getcallerfp() uintptr { return 0 }
index 327059dd503566ebf0528af7d81be340a7ee9b3e..5eb68271d10e6c36c49d2cadf9bea3873c4fdcfa 100644 (file)
@@ -906,7 +906,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(getfp()), skip, pcBuf[1:])
+                       nstk += fpTracebackPCs(unsafe.Pointer(getcallerfp()), skip, 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