Help us shape the future of Go! Take the 2026 Go Developer Survey

arch

package
v0.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Registry struct {
	Caller     FunctionCaller
	Classifier ArgumentClassifier
}

Registry contains registered implementations.

Functions

func Register

func Register(caller FunctionCaller, classifier ArgumentClassifier)

Register registers implementations for the current architecture.

Types

type ArgumentClassification

type ArgumentClassification struct {
	GPRCount int
	SSECount int
}

ArgumentClassification contains argument passing information.

type ArgumentClassifier

type ArgumentClassifier interface {
	ClassifyReturn(t *types.TypeDescriptor, abi types.CallingConvention) int
	ClassifyArgument(t *types.TypeDescriptor, abi types.CallingConvention) ArgumentClassification
}

ArgumentClassifier defines the contract for argument classification.

type FunctionCaller

type FunctionCaller interface {
	Execute(cif *types.CallInterface, fn unsafe.Pointer, rvalue unsafe.Pointer, avalue []unsafe.Pointer, errnoFn uintptr) (cerrno uintptr, err error)
}

FunctionCaller defines the contract for function execution. Execute always captures C errno inside the assembly trampoline immediately after the C function returns. On platforms without errno support (Windows), errnoFn is 0 and the returned cerrno is always 0.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL