Source file src/runtime/gobuf_other.go
1 // Copyright 2026 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 //go:build !wasm32 6 7 package runtime 8 9 import ( 10 "internal/abi" 11 "internal/runtime/sys" 12 ) 13 14 // Function value code words are entry PCs on these architectures. 15 // 16 //go:nosplit 17 func funcValuePC(fn uintptr) uintptr { return fn } 18 19 //go:nosplit 20 func funcHandle(pc uintptr) uintptr { return pc } 21 22 //go:nosplit 23 func gobufSetPC(buf *gobuf, pc uintptr) { 24 buf.pc = pc 25 buf.lr = 0 26 } 27 28 // gobufSetGoexit leaves PC-1 within goexit for stack unwinding. 29 // 30 //go:nosplit 31 func gobufSetGoexit(buf *gobuf) { 32 gobufSetPC(buf, abi.FuncPCABI0(goexit)+sys.PCQuantum) 33 } 34