src/runtime/rt0_wasip1_wasm.s
raw| 1 | // Copyright 2023 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 "go_asm.h" |
| 6 | #include "textflag.h" |
| 7 | |
| 8 | TEXT _rt0_wasm_wasip1(SB),NOSPLIT,$0 |
| 9 | MOVD $runtime·wasmStack+(m0Stack__size-16)(SB), SP |
| 10 | |
| 11 | I32Const $0 // entry PC_B |
| 12 | Call runtime·rt0_go(SB) |
| 13 | Drop |
| 14 | Call wasm_pc_f_loop(SB) |
| 15 | |
| 16 | Return |
| 17 | |
| 18 | TEXT _rt0_wasm_wasip1_lib(SB),NOSPLIT,$0 |
| 19 | Call _rt0_wasm_wasip1(SB) |
| 20 | Return |