github.com/primecitizens/pcz/std@v0.2.1/core/debug/asm_amd64.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 && amd64 9 10 #include "textflag.h" 11 12 TEXT ·Breakpoint(SB),NOSPLIT,$0-0 13 BYTE $0xcc 14 RET 15 16 TEXT ·Abort(SB),NOSPLIT,$0-0 17 INT $3 18 loop: 19 JMP loop 20 21 TEXT ·Return0(SB),NOSPLIT,$0 22 MOVL $0, AX 23 RET 24 25 TEXT ·GetCallerPC<ABIInternal>(SB), NOSPLIT|NOFRAME,$8-8 26 MOVQ SP, AX // addr of first arg 27 MOVQ -8(AX), AX // get calling pc 28 RET 29 30 TEXT ·GetCallerSP<ABIInternal>(SB), NOSPLIT|NOFRAME, $0-0 31 LEAQ sp+8(FP), AX 32 RET 33 34 TEXT ·GetClosurePtr<ABIInternal>(SB), NOSPLIT|NOFRAME, $0-0 35 MOVQ DX, AX 36 RET