diff options
| author | Jeff Carr <[email protected]> | 2025-03-19 04:40:49 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-03-19 04:40:49 -0500 |
| commit | 17119d9298e132aa309f1cc95e439f29f61214b0 (patch) | |
| tree | 578abd95ba2cfe0cdcec3f6e51d609ccb9e2f36b /abi/funcpc_gccgo.go | |
day1v0.0.1
Diffstat (limited to 'abi/funcpc_gccgo.go')
| -rw-r--r-- | abi/funcpc_gccgo.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/abi/funcpc_gccgo.go b/abi/funcpc_gccgo.go new file mode 100644 index 0000000..ad5fa52 --- /dev/null +++ b/abi/funcpc_gccgo.go @@ -0,0 +1,21 @@ +// Copyright 2023 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// For bootstrapping with gccgo. + +//go:build gccgo + +package abi + +import "unsafe" + +func FuncPCABI0(f interface{}) uintptr { + words := (*[2]unsafe.Pointer)(unsafe.Pointer(&f)) + return *(*uintptr)(unsafe.Pointer(words[1])) +} + +func FuncPCABIInternal(f interface{}) uintptr { + words := (*[2]unsafe.Pointer)(unsafe.Pointer(&f)) + return *(*uintptr)(unsafe.Pointer(words[1])) +} |
