From 28bd325e418a0ca1c70a024764aa74e25aacab12 Mon Sep 17 00:00:00 2001 From: Cherry Mui Date: Wed, 2 Jun 2021 19:52:39 -0400 Subject: [PATCH] [dev.typeparams] runtime: use ABIInternal callbackWrap in callbackasm1 on ARM64 On Windows/ARM64, callbackasm1 calls callbackWrap via cgocallback. cgocallback uses ABIInternal calling convention to call the function. Pass the ABIInternal entry point to cgocallback. Change-Id: I79d21b77525f6ac8dd50d34f4f304749419b2ad4 Reviewed-on: https://go-review.googlesource.com/c/go/+/324735 Trust: Cherry Mui Run-TryBot: Cherry Mui TryBot-Result: Go Bot Reviewed-by: Michael Knyszek --- src/runtime/sys_windows_arm64.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/sys_windows_arm64.s b/src/runtime/sys_windows_arm64.s index e859371508..44145c53fb 100644 --- a/src/runtime/sys_windows_arm64.s +++ b/src/runtime/sys_windows_arm64.s @@ -339,7 +339,7 @@ TEXT runtime·callbackasm1(SB),NOSPLIT,$208-0 MOVD R0, callbackArgs_result(R13) // result // Call cgocallback, which will call callbackWrap(frame). - MOVD $·callbackWrap(SB), R0 // PC of function to call + MOVD $·callbackWrap(SB), R0 // PC of function to call, cgocallback takes an ABIInternal entry-point MOVD R13, R1 // frame (&callbackArgs{...}) MOVD $0, R2 // context MOVD R0, (1*8)(RSP)