Documentation ¶
Overview ¶
Package operand provides types for instruction operands.
Index ¶
- func Is1(op Op) bool
- func Is3(op Op) bool
- func IsAL(op Op) bool
- func IsAX(op Op) bool
- func IsCL(op Op) bool
- func IsEAX(op Op) bool
- func IsGP(op Op, n uint) bool
- func IsIMM16(op Op) bool
- func IsIMM2U(op Op) bool
- func IsIMM32(op Op) bool
- func IsIMM64(op Op) bool
- func IsIMM8(op Op) bool
- func IsK(op Op) bool
- func IsM(op Op) bool
- func IsM128(op Op) bool
- func IsM16(op Op) bool
- func IsM256(op Op) bool
- func IsM32(op Op) bool
- func IsM512(op Op) bool
- func IsM64(op Op) bool
- func IsM8(op Op) bool
- func IsMReg(op Op) bool
- func IsMSize(op Op, n uint) bool
- func IsMem(op Op) bool
- func IsPseudo(op Op) bool
- func IsR16(op Op) bool
- func IsR32(op Op) bool
- func IsR64(op Op) bool
- func IsR8(op Op) bool
- func IsRAX(op Op) bool
- func IsREL32(op Op) bool
- func IsREL8(op Op) bool
- func IsRegister(op Op) bool
- func IsRegisterKind(op Op, k reg.Kind) bool
- func IsRegisterKindSize(op Op, k reg.Kind, n uint) bool
- func IsRel(op Op) bool
- func IsVM32X(op Op) bool
- func IsVM32Y(op Op) bool
- func IsVM32Z(op Op) bool
- func IsVM64X(op Op) bool
- func IsVM64Y(op Op) bool
- func IsVM64Z(op Op) bool
- func IsVmx(op Op) bool
- func IsVmy(op Op) bool
- func IsVmz(op Op) bool
- func IsXMM(op Op) bool
- func IsXMM0(op Op) bool
- func IsYMM(op Op) bool
- func IsZMM(op Op) bool
- func Registers(op Op) []reg.Register
- type Constant
- type F32
- type F64
- type I16
- type I32
- type I64
- type I8
- type LabelRef
- type Mem
- type Op
- type Rel
- type String
- type Symbol
- type U16
- type U32
- type U64
- type U8
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsMSize ¶
IsMSize returns true if op is a memory operand using general-purpose address registers of the given size in bytes.
func IsREL32 ¶
IsREL32 returns true if op is an offset relative to instruction pointer, or a label reference.
func IsRegisterKind ¶
IsRegisterKind returns true if op is a register of the given kind.
func IsRegisterKindSize ¶
IsRegisterKindSize returns true if op is a register of the given kind and size in bytes.
Types ¶
type Mem ¶
Mem represents a memory reference.
func NewDataAddr ¶
NewDataAddr returns a memory reference relative to the named data symbol.
func NewParamAddr ¶
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 NewStackAddr ¶
NewStackAddr returns a memory reference relative to the stack pointer.
type Op ¶
type Op interface {
Asm() string
}
Op is an operand.
func ApplyAllocation ¶
func ApplyAllocation(op Op, a reg.Allocation) Op
ApplyAllocation returns an operand with allocated registers replaced. Registers missing from the allocation are left alone.
type String ¶
type String string
String is a string constant.
type Symbol ¶
Symbol represents a symbol name.
func NewStaticSymbol ¶
NewStaticSymbol builds a static Symbol. Static symbols are only visible in the current source file.