github.com/primecitizens/pcz/std@v0.2.1/core/stack/asm_386.s (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright 2023 The Prime Citizens 3 // 4 // Copyright 2009 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 && 386 9 10 #include "textflag.h" 11 12 TEXT ·GetSP(SB),NOSPLIT,$0-4 13 MOVL SP, AX 14 ADDL $8, AX 15 MOVL AX, sp+0(FP) 16 RET 17 18 TEXT ·SetSP(SB),NOSPLIT,$4-4 19 NOP SP // tell vet SP changed - stop checking offsets 20 MOVL sp+0(FP), SP 21 RET 22 23 // Called during function prolog when more stack is needed. 24 // 25 // The traceback routines see morestack on a g0 as being 26 // the top of a stack (for example, morestack calling newstack 27 // calling the scheduler calling newm calling gc), so we must 28 // record an argument size. For that purpose, it has no arguments. 29 TEXT runtime·morestack(SB),NOSPLIT,$0-0 30 // TODO: implement 31 INT $3 // crash 32 loop: 33 JMP loop 34 35 TEXT runtime·morestack_noctxt(SB),NOSPLIT|NOFRAME,$0-0 36 MOVL $0, DX 37 JMP runtime·morestack(SB)