1
// Copyright 2009 The Go Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style
3
// license that can be found in the LICENSE file.
6
* void crosscall2(void (*fn)(void*, int32), void*, int32)
7
* Save registers and call fn with two arguments.
9
TEXT crosscall2(SB),7,$0
10
SUBQ $0x58, SP /* keeps stack pointer 32-byte aligned */
19
// Win64 save RBX, RBP, RDI, RSI, RSP, R12, R13, R14, and R15
23
MOVQ DX, 0(SP) /* arg */
24
MOVQ R8, 8(SP) /* argsize (includes padding) */
31
MOVQ SI, 0(SP) /* arg */
32
MOVQ DX, 8(SP) /* argsize (includes padding) */