Source file src/runtime/stubs_loong64.go
1 // Copyright 2022 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 loong64 6 7 package runtime 8 9 import "unsafe" 10 11 // Called from assembly only; declared for go vet. 12 // 13 // load_g is also called from runtime/cgo. 14 // 15 // load_g should be an internal detail, 16 // but widely used packages access it using linkname. 17 // Notable members of the hall of shame include: 18 // - github.com/ebitengine/purego 19 // 20 //go:linkname load_g 21 func load_g() 22 func save_g() 23 24 //go:noescape 25 func asmcgocall_no_g(fn, arg unsafe.Pointer) 26 27 // Used by reflectcall and the reflect package. 28 // 29 // Spills/loads arguments in registers to/from an internal/abi.RegArgs 30 // respectively. Does not follow the Go ABI. 31 // 32 //go:linknamestd spillArgs 33 func spillArgs() 34 35 //go:linknamestd unspillArgs 36 func unspillArgs() 37 38 // getfp returns the frame pointer register of its caller or 0 if not implemented. 39 // TODO: Make this a compiler intrinsic 40 // 41 //go:nosplit 42 func getfp() uintptr { return 0 } 43