2026-07-24 09:57:21 +02:00
|
|
|
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
|
|
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
|
|
2026-08-21 00:03:30 +02:00
|
|
|
//go:build !amd64 && !arm64 && !riscv64 && !loong64
|
2026-07-24 09:57:21 +02:00
|
|
|
|
|
|
|
|
package verify
|
|
|
|
|
|
|
|
|
|
import "fmt"
|
|
|
|
|
|
|
|
|
|
// ABIReport describes the result of an ABI-checking call.
|
|
|
|
|
type ABIReport struct {
|
|
|
|
|
BPClobbered bool
|
|
|
|
|
R14Clobbered bool
|
|
|
|
|
RedZoneHit bool
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// OK returns true when no violations were detected.
|
|
|
|
|
func (r ABIReport) OK() bool { return false }
|
|
|
|
|
|
|
|
|
|
// String returns a human-readable summary.
|
|
|
|
|
func (r ABIReport) String() string { return "verify: ABI checks require amd64" }
|
|
|
|
|
|
|
|
|
|
// CallChecked is unavailable on non-amd64 architectures.
|
|
|
|
|
func CallChecked(fnAddr uintptr, args []byte) ([]byte, ABIReport, error) {
|
|
|
|
|
return nil, ABIReport{}, fmt.Errorf("verify: ABI checks require amd64")
|
|
|
|
|
}
|