| // Copyright 2009 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| // Called by C code generated by cmd/cgo. |
| // func crosscall2(fn func(a unsafe.Pointer, n int32, ctxt uintptr), a unsafe.Pointer, n int32, ctxt uintptr) |
| // Saves C callee-saved registers and calls fn with three arguments. |
| TEXT crosscall2(SB),NOSPLIT,$0x50-0 /* keeps stack pointer 32-byte aligned */ |
| TEXT crosscall2(SB),NOSPLIT,$0x110-0 /* also need to save xmm6 - xmm15 */ |
| // Win64 save RBX, RBP, RDI, RSI, RSP, R12, R13, R14, R15 and XMM6 -- XMM15. |
| MOVQ DX, 0x0(SP) /* arg */ |
| MOVQ R8, 0x8(SP) /* argsize (includes padding) */ |
| MOVQ R9, 0x10(SP) /* ctxt */ |
| MOVQ SI, 0x0(SP) /* arg */ |
| MOVQ DX, 0x8(SP) /* argsize (includes padding) */ |
| MOVQ CX, 0x10(SP) /* ctxt */ |