Documentation
¶
Overview ¶
Package platform defines the supported plattforms and hardware architectures.
Package platform defines the supported platforms and hardware architectures.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnsupportedOs = errors.New("unsupported os") ErrUnsupportedArch = errors.New("unsupported arch") )
View Source
var Archs = []Arch{ X86_64{}, }
List of supported architectures.
View Source
var Oses = []Os{ Macos{}, Linux{}, Freestanding{}, }
List of supported operating systems.
Functions ¶
This section is empty.
Types ¶
type Arch ¶
type Arch interface { String() string BitSize() int Pointer() token.Token // U32 or U64 Register(reg, typ token.Token) (name string) SizeOf(typ token.Token) uint64 // contains filtered or unexported methods }
Arch is implemented for supported architectures.
type Freestanding ¶
type Freestanding struct{}
func (Freestanding) AppendSyscall ¶
func (Freestanding) Entry ¶
func (Freestanding) Entry() string
func (Freestanding) String ¶
func (Freestanding) String() string
type Os ¶
type Os interface { String() string // Entry for the binary. Entry() string // Syscall calling convention for this arch. SyscallCC(arch Arch) []token.Token // AppendSyscall appends statements to `stmts` that generate a syscall with the given `values`. AppendSyscall(stmts []ast.Stmt, values []ast.Value, loc ast.Location) []ast.Stmt // contains filtered or unexported methods }
Os is implemented for supported operating systems.
type Platform ¶
func Default ¶
func Default() Platform
Default platform for the runnning operating system and architecture. Defaults to freestanding/x86_64.
Click to show internal directories.
Click to hide internal directories.