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. 4 5 #include "textflag.h" 6 7 // Called by C code generated by cmd/cgo. 8 // func crosscall2(fn func(a unsafe.Pointer, n int32, ctxt uintptr), a unsafe.Pointer, n int32, ctxt uintptr) 9 // Saves C callee-saved registers and calls fn with three arguments. 10 TEXT crosscall2(SB),NOSPLIT,$0 11 PUSHL BP 12 MOVL SP, BP 13 PUSHL BX 14 PUSHL SI 15 PUSHL DI 16 17 SUBL $12, SP 18 MOVL 20(BP), AX 19 MOVL AX, 8(SP) 20 MOVL 16(BP), AX 21 MOVL AX, 4(SP) 22 MOVL 12(BP), AX 23 MOVL AX, 0(SP) 24 MOVL 8(BP), AX 25 CALL AX 26 ADDL $12, SP 27 28 POPL DI 29 POPL SI 30 POPL BX 31 POPL BP 32 RET 33