github.com/razvanm/vanadium-go-1.3@v0.0.0-20160721203343-4a65068e5915/src/runtime/rt0_nacl_386.s (about)

     1  // Copyright 2013 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  // NaCl entry has:
     8  //	0(FP) - arg block == SP+8
     9  //	4(FP) - cleanup function pointer, always 0
    10  //	8(FP) - envc
    11  //	12(FP) - argc
    12  //	16(FP) - argv, then 0, then envv, then 0, then auxv
    13  TEXT _rt0_386_nacl(SB),NOSPLIT,$24
    14  	MOVL	arg+0(FP), AX
    15  	MOVL	AX, 0(SP)
    16  	CALL	runtime·nacl_sysinfo(SB)
    17  	MOVL	arg+0(FP), CX
    18  	MOVL	8(CX), AX
    19  	LEAL	12(CX), BX
    20  	MOVL	AX, 0(SP)
    21  	MOVL	BX, 4(SP)
    22  	CALL	main(SB)
    23  	INT	$3
    24  
    25  TEXT main(SB),NOSPLIT,$0
    26  	JMP	runtime·rt0_go(SB)