Documentation ¶
Index ¶
- Constants
- func Decode(opcode uint32) flamego.Instruction
- func Encode(instruction flamego.Instruction) uint32
- type Add
- func (i *Add) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Add) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Add) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Add) Retire(x flamego.Context) bool
- func (i *Add) Store(x flamego.Context, a, b uint64)
- func (i *Add) String() string
- type And
- func (i *And) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *And) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *And) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *And) Retire(x flamego.Context) bool
- func (i *And) Store(x flamego.Context, a, b uint64)
- func (i *And) String() string
- type Call
- func (i *Call) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Call) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Call) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Call) Retire(x flamego.Context) bool
- func (i *Call) Store(x flamego.Context, a, b uint64)
- func (i *Call) String() string
- type Clear
- func (i *Clear) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Clear) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Clear) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Clear) Retire(x flamego.Context) bool
- func (i *Clear) Store(x flamego.Context, a, b uint64)
- func (i *Clear) String() string
- type Divide
- func (i *Divide) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Divide) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Divide) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Divide) Retire(x flamego.Context) bool
- func (i *Divide) Store(x flamego.Context, a, b uint64)
- func (i *Divide) String() string
- type Flush
- func (i *Flush) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Flush) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Flush) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Flush) Retire(x flamego.Context) bool
- func (i *Flush) Store(x flamego.Context, a, b uint64)
- func (i *Flush) String() string
- type Halt
- func (i *Halt) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Halt) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Halt) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Halt) Retire(x flamego.Context) bool
- func (i *Halt) Store(x flamego.Context, a, b uint64)
- func (i *Halt) String() string
- type Interrupt
- func (i *Interrupt) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Interrupt) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Interrupt) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Interrupt) Retire(x flamego.Context) bool
- func (i *Interrupt) Store(x flamego.Context, a, b uint64)
- func (i *Interrupt) String() string
- type Jump
- func (i *Jump) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Jump) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Jump) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Jump) Retire(x flamego.Context) bool
- func (i *Jump) Store(x flamego.Context, a, b uint64)
- func (i *Jump) String() string
- type JumpConditionCode
- type JumpDirection
- type LeftShift
- func (i *LeftShift) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *LeftShift) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *LeftShift) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *LeftShift) Retire(x flamego.Context) bool
- func (i *LeftShift) Store(x flamego.Context, a, b uint64)
- func (i *LeftShift) String() string
- type Load
- func (i *Load) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Load) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Load) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Load) Retire(x flamego.Context) bool
- func (i *Load) Store(x flamego.Context, a, b uint64)
- func (i *Load) String() string
- type LoadC
- func (i *LoadC) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *LoadC) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *LoadC) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *LoadC) Retire(x flamego.Context) bool
- func (i *LoadC) Store(x flamego.Context, a, b uint64)
- func (i *LoadC) String() string
- type Lock
- func (i *Lock) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Lock) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Lock) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Lock) Retire(x flamego.Context) bool
- func (i *Lock) Store(x flamego.Context, a, b uint64)
- func (i *Lock) String() string
- type Modulo
- func (i *Modulo) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Modulo) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Modulo) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Modulo) Retire(x flamego.Context) bool
- func (i *Modulo) Store(x flamego.Context, a, b uint64)
- func (i *Modulo) String() string
- type Multiply
- func (i *Multiply) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Multiply) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Multiply) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Multiply) Retire(x flamego.Context) bool
- func (i *Multiply) Store(x flamego.Context, a, b uint64)
- func (i *Multiply) String() string
- type Noop
- func (i *Noop) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Noop) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Noop) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Noop) Retire(x flamego.Context) bool
- func (i *Noop) Store(x flamego.Context, a, b uint64)
- func (i *Noop) String() string
- type Not
- func (i *Not) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Not) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Not) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Not) Retire(x flamego.Context) bool
- func (i *Not) Store(x flamego.Context, a, b uint64)
- func (i *Not) String() string
- type Or
- func (i *Or) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Or) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Or) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Or) Retire(x flamego.Context) bool
- func (i *Or) Store(x flamego.Context, a, b uint64)
- func (i *Or) String() string
- type Pop
- func (i *Pop) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Pop) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Pop) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Pop) Retire(x flamego.Context) bool
- func (i *Pop) Store(x flamego.Context, a, b uint64)
- func (i *Pop) String() string
- type Push
- func (i *Push) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Push) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Push) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Push) Retire(x flamego.Context) bool
- func (i *Push) Store(x flamego.Context, a, b uint64)
- func (i *Push) String() string
- type Return
- func (i *Return) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Return) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Return) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Return) Retire(x flamego.Context) bool
- func (i *Return) Store(x flamego.Context, a, b uint64)
- func (i *Return) String() string
- type RightShift
- func (i *RightShift) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *RightShift) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *RightShift) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *RightShift) Retire(x flamego.Context) bool
- func (i *RightShift) Store(x flamego.Context, a, b uint64)
- func (i *RightShift) String() string
- type Signal
- func (i *Signal) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Signal) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Signal) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Signal) Retire(x flamego.Context) bool
- func (i *Signal) Store(x flamego.Context, a, b uint64)
- func (i *Signal) String() string
- type Sleep
- func (i *Sleep) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Sleep) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Sleep) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Sleep) Retire(x flamego.Context) bool
- func (i *Sleep) Store(x flamego.Context, a, b uint64)
- func (i *Sleep) String() string
- type Store
- func (i *Store) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Store) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Store) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Store) Retire(x flamego.Context) bool
- func (i *Store) Store(x flamego.Context, a, b uint64)
- func (i *Store) String() string
- type Subtract
- func (i *Subtract) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Subtract) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Subtract) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Subtract) Retire(x flamego.Context) bool
- func (i *Subtract) Store(x flamego.Context, a, b uint64)
- func (i *Subtract) String() string
- type Uninterrupt
- func (i *Uninterrupt) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Uninterrupt) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Uninterrupt) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Uninterrupt) Retire(x flamego.Context) bool
- func (i *Uninterrupt) Store(x flamego.Context, a, b uint64)
- func (i *Uninterrupt) String() string
- type Unlock
- func (i *Unlock) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Unlock) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Unlock) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Unlock) Retire(x flamego.Context) bool
- func (i *Unlock) Store(x flamego.Context, a, b uint64)
- func (i *Unlock) String() string
- type Xor
- func (i *Xor) Execute(x flamego.Context, a, b, c, d uint64) (uint64, uint64)
- func (i *Xor) Format(x flamego.Context, a, b uint64) (uint64, uint64)
- func (i *Xor) Load(x flamego.Context) (uint64, uint64, uint64, uint64)
- func (i *Xor) Retire(x flamego.Context) bool
- func (i *Xor) Store(x flamego.Context, a, b uint64)
- func (i *Xor) String() string
Constants ¶
View Source
const ( Width1Bit = 0x1 Width2Bit = 0x3 Width4Bit = 0xF Width5Bit = 0x1F Width8Bit = 0xFF Width10Bit = 0x3FF Width16Bit = 0xFFFF Width17Bit = 0x1FFFF Width22Bit = 0x3FFFFF Width26Bit = 0x3FFFFFF WidthRegister = Width5Bit )
Variables ¶
This section is empty.
Functions ¶
func Decode ¶
func Decode(opcode uint32) flamego.Instruction
func Encode ¶
func Encode(instruction flamego.Instruction) uint32
Types ¶
type Add ¶
type And ¶
type Clear ¶
type Clear struct { AddressRegister flamego.Register Offset uint32 // contains filtered or unexported fields }
type Divide ¶
type Divide struct { Source1Register flamego.Register Source2Register flamego.Register DestinationRegister flamego.Register }
type Flush ¶
type Flush struct { AddressRegister flamego.Register Offset uint32 // contains filtered or unexported fields }
type Interrupt ¶
type Interrupt struct {
Value flamego.InterruptValue
}
func NewInterrupt ¶
func NewInterrupt(value flamego.InterruptValue) *Interrupt
type Jump ¶
type Jump struct { ConditionCode JumpConditionCode Direction JumpDirection Offset uint32 ConditionRegister flamego.Register }
func NewJump ¶
func NewJump(cc JumpConditionCode, d JumpDirection, o uint32, r flamego.Register) *Jump
type JumpConditionCode ¶
type JumpConditionCode uint8
const ( JumpEZ JumpConditionCode = iota JumpNZ JumpLE JumpLZ )
func (JumpConditionCode) String ¶
func (i JumpConditionCode) String() string
type JumpDirection ¶
type JumpDirection bool
const ( JumpForward JumpDirection = false JumpBackward JumpDirection = true )
func (JumpDirection) String ¶
func (i JumpDirection) String() string
type LeftShift ¶
type LeftShift struct { Source1Register flamego.Register Source2Register flamego.Register DestinationRegister flamego.Register }
func NewLeftShift ¶
type Load ¶
type Load struct { AddressRegister flamego.Register Offset uint32 DestinationRegister flamego.Register // contains filtered or unexported fields }
type Modulo ¶
type Modulo struct { Source1Register flamego.Register Source2Register flamego.Register DestinationRegister flamego.Register }
type Multiply ¶
type Multiply struct { Source1Register flamego.Register Source2Register flamego.Register DestinationRegister flamego.Register }
func NewMultiply ¶
type Or ¶
type Push ¶
type Push struct { Mask uint16 // contains filtered or unexported fields }
type Return ¶
type Return struct {
// contains filtered or unexported fields
}
type RightShift ¶
type RightShift struct { Source1Register flamego.Register Source2Register flamego.Register DestinationRegister flamego.Register }
func NewRightShift ¶
func NewRightShift(s1, s2, d flamego.Register) *RightShift
func (*RightShift) String ¶
func (i *RightShift) String() string
type Sleep ¶
type Sleep struct {
// contains filtered or unexported fields
}
type Store ¶
type Store struct { AddressRegister flamego.Register Offset uint32 SourceRegister flamego.Register // contains filtered or unexported fields }
type Subtract ¶
type Subtract struct { Source1Register flamego.Register Source2Register flamego.Register DestinationRegister flamego.Register }
func NewSubtract ¶
type Uninterrupt ¶
type Uninterrupt struct { AddressRegister flamego.Register // contains filtered or unexported fields }
func NewUninterrupt ¶
func NewUninterrupt(r flamego.Register) *Uninterrupt
func (*Uninterrupt) String ¶
func (i *Uninterrupt) String() string
type Unlock ¶
type Unlock struct {
// contains filtered or unexported fields
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.