...
Text file src/pkg/runtime/rt0_nacl_386.s
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,$8
14 MOVL argc+12(FP), AX
15 LEAL argv+16(FP), BX
16 MOVL AX, 0(SP)
17 MOVL BX, 4(SP)
18 JMP runtime·rt0_go(SB)
19
20 TEXT main(SB),NOSPLIT,$0
21 // Remove the return address from the stack.
22 // rt0_go doesn't expect it to be there.
23 ADDL $4, SP
24 JMP runtime·rt0_go(SB)
View as plain text