go/pkg/mod/github.com/mmcloughlin/[email protected]/operand/types.go

type Op

type Symbol

// NewStaticSymbol builds a static Symbol. Static symbols are only visible in the current source file.
func NewStaticSymbol(name string) Symbol {}

func (s Symbol) String() string {}

type Mem

// NewParamAddr is a convenience to build a Mem operand pointing to a function
// parameter, which is a named offset from the frame pointer pseudo register.
func NewParamAddr(name string, offset int) Mem {}

// NewStackAddr returns a memory reference relative to the stack pointer.
func NewStackAddr(offset int) Mem {}

// NewDataAddr returns a memory reference relative to the named data symbol.
func NewDataAddr(sym Symbol, offset int) Mem {}

// Offset returns a reference to m plus idx bytes.
func (m Mem) Offset(idx int) Mem {}

// Idx returns a new memory reference with (Index, Scale) set to (r, s).
func (m Mem) Idx(r reg.Register, s uint8) Mem {}

// Asm returns an assembly syntax representation of m.
func (m Mem) Asm() string {}

type Rel

// Asm returns an assembly syntax representation of r.
func (r Rel) Asm() string {}

type LabelRef

// Asm returns an assembly syntax representation of l.
func (l LabelRef) Asm() string {}

// Registers returns the list of all operands involved in the given operand.
func Registers(op Op) []reg.Register {}

// ApplyAllocation returns an operand with allocated registers replaced. Registers missing from the allocation are left alone.
func ApplyAllocation(op Op, a reg.Allocation) Op {}