abi

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PtrSize  = 8 // pointer size
	PtrAlign = 8 // pointer alignment
)

Variables

View Source
var (
	ABI = ArchCreateABI()
)

Functions

This section is empty.

Types

type AMD64ABI

type AMD64ABI struct {
	FnTab map[int]*FunctionLayout
}

func ArchCreateABI

func ArchCreateABI() *AMD64ABI

func (*AMD64ABI) LayoutFunc

func (self *AMD64ABI) LayoutFunc(id int, ft reflect.Type) *FunctionLayout

func (*AMD64ABI) RegisterFunction

func (self *AMD64ABI) RegisterFunction(id int, fn interface{}) (fp unsafe.Pointer)

func (*AMD64ABI) RegisterMethod

func (self *AMD64ABI) RegisterMethod(id int, mt rt.Method) int

func (*AMD64ABI) Reserved

func (self *AMD64ABI) Reserved() map[x86_64.Register64]int32

type AbstractABI

type AbstractABI interface {
	RegisterMethod(id int, mt rt.Method) int
	RegisterFunction(id int, fn interface{}) unsafe.Pointer
}

type FunctionLayout

type FunctionLayout struct {
	Id   int
	Sp   uintptr
	Args []Parameter
	Rets []Parameter
}

func (*FunctionLayout) StackMap

func (self *FunctionLayout) StackMap() *rt.StackMap

func (*FunctionLayout) String

func (self *FunctionLayout) String() string

type Parameter

type Parameter struct {
	Mem        uintptr
	Reg        x86_64.Register64
	Type       reflect.Type
	InRegister bool
}

func (Parameter) IsPointer

func (self Parameter) IsPointer() bool

func (Parameter) String

func (self Parameter) String() string

Jump to

Keyboard shortcuts

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