github.com/primecitizens/pcz/std@v0.2.1/core/debug/asm_wasm.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 && wasm 9 10 #include "textflag.h" 11 12 TEXT ·Breakpoint(SB),NOSPLIT,$0-0 13 UNDEF 14 15 TEXT ·Abort(SB),NOSPLIT,$0-0 16 UNDEF 17 18 TEXT ·Return0(SB),NOSPLIT,$0-0 19 MOVD $0, RET0 20 RET 21 22 TEXT ·GetCallerPC(SB),NOSPLIT|NOFRAME,$0-8 23 Get SP 24 I64ExtendI32U 25 I64Const $8 26 I64Add 27 I32WrapI64 28 29 Get SP 30 I64Load $0 31 I64Store $0 32 33 Get SP 34 I32Const $8 35 I32Add 36 Set SP 37 38 I32Const $0 39 Return 40 41 TEXT ·GetCallerSP(SB),NOSPLIT|NOFRAME,$0-8 42 Get SP 43 I64ExtendI32U 44 I64Const $8 45 I64Add 46 I32WrapI64 47 48 Get SP 49 I64ExtendI32U 50 I64Const $8 51 I64Add 52 I64Store $0 53 54 Get SP 55 I32Const $8 56 I32Add 57 Set SP 58 59 I32Const $0 60 Return