github.com/primecitizens/pcz/std@v0.2.1/core/debug/asm_arm.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 && arm 9 10 #include "textflag.h" 11 12 TEXT ·Breakpoint(SB),NOSPLIT,$0-0 13 // gdb won't skip this breakpoint instruction automatically, 14 // so you must manually "set $pc+=4" to skip it and continue. 15 #ifdef GOOS_plan9 16 WORD $0xD1200070 // undefined instruction used as armv5 breakpoint in Plan 9 17 #else 18 WORD $0xe7f001f0 // undefined instruction that gdb understands is a software breakpoint 19 #endif 20 RET 21 22 TEXT ·Abort(SB),NOSPLIT|NOFRAME,$0-0 23 MOVW $0, R0 24 MOVW (R0), R1 25 26 TEXT ·Return0(SB),NOSPLIT,$0 27 MOVW $0, R0 28 RET 29 30 TEXT ·GetCallerPC(SB),NOSPLIT,$-4-4 31 MOVW 0(R13), R0 // LR saved by caller 32 MOVW R0, ret+0(FP) 33 RET