]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.typeparams] runtime: use ABIInternal callbackWrap in callbackasm1 on ARM64
authorCherry Mui <cherryyz@google.com>
Wed, 2 Jun 2021 23:52:39 +0000 (19:52 -0400)
committerCherry Mui <cherryyz@google.com>
Thu, 3 Jun 2021 16:28:44 +0000 (16:28 +0000)
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 <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/runtime/sys_windows_arm64.s

index e8593715089d4b13b01931f2de6c6a10dfe8b947..44145c53fb7ee8e0822fef94b64af6b7fcd55253 100644 (file)
@@ -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<ABIInternal>(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)