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>
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
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
// 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)
}
// 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) {}
//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 }
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
//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 }
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
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 }
//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 }
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 }
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 }
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 }
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 }
// 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