github.com/primecitizens/pcz/std@v0.2.1/core/stack/asm_wasm.s (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright 2023 The Prime Citizens 3 // 4 // Copyright 2018 The Go Authors. All rights reserved. 5 // Use of this source code is governed by a BSD-style 6 // license that can be found in the LICENSE file. 7 8 //go:build pcz && wasm 9 10 #include "textflag.h" 11 12 TEXT ·GetSP(SB),NOSPLIT,$0-8 13 Get SP 14 I64ExtendI32U 15 Set R0 16 MOVD R0, ret+0(FP) 17 RET 18 19 TEXT ·SetSP(SB),NOSPLIT,$8-8 20 NOP SP // tell vet SP changed - stop checking offsets 21 MOVD sp+0(FP), SP 22 RET 23 24 // Called during function prolog when more stack is needed. 25 // 26 // The traceback routines see morestack on a g0 as being 27 // the top of a stack (for example, morestack calling newstack 28 // calling the scheduler calling newm calling gc), so we must 29 // record an argument size. For that purpose, it has no arguments. 30 TEXT runtime·morestack(SB),NOSPLIT,$0-0 31 // TODO: implement 32 UNDEF // crash 33 34 // morestack but not preserving ctxt. 35 TEXT runtime·morestack_noctxt(SB),NOSPLIT,$0 36 MOVD $0, CTXT 37 JMP runtime·morestack(SB)