Header menu logo F# Header menu logo Averest

OpCodeBED Type

type for operation codes with methods for parsing, printing and encoding

Union cases

Union case Description

ADDN

Full Usage: ADDN

outL := nat2bv(bv2nat(inL) + bv2nat(inR), W)

ADDZ

Full Usage: ADDZ

outL := int2bv(bv2int(inL) + bv2int(inR), W)

AND

Full Usage: AND

outL := inL && inR

COPY

Full Usage: COPY

outL := inL

DIVN

Full Usage: DIVN

outL := nat2bv(bv2nat(inL) / bv2nat(inR), W);

DIVZ

Full Usage: DIVZ

outL := int2bv(bv2int(inL) / bv2int(inR), W);

DUP

Full Usage: DUP

outL := inL; outR := inL

EQQN

Full Usage: EQQN

outL := bv2nat(inL) == bv2nat(inR)

EQQZ

Full Usage: EQQZ

outL := bv2int(inL) == bv2int(inR)

JOIN

Full Usage: JOIN

outL := inL && inR

KILL

Full Usage: KILL

consume inL

LEQN

Full Usage: LEQN

outL := bv2nat(inL) <= bv2nat(inR)

LEQZ

Full Usage: LEQZ

outL := bv2int(inL) <= bv2int(inR)

LESN

Full Usage: LESN

outL := bv2nat(inL) < bv2nat(inR)

LESZ

Full Usage: LESZ

outL := bv2int(inL) < bv2int(inR)

LOAD

Full Usage: LOAD

store for LSU

MODN

Full Usage: MODN

outR := nat2bv(bv2nat(inL) % bv2nat(inR), W)

MODZ

Full Usage: MODZ

outR := int2bv(bv2int(inL) % bv2int(inR), W)

MULN

Full Usage: MULN

outL := nat2bv(bv2nat(inL) * bv2nat(inR), W)

MULZ

Full Usage: MULZ

outL := int2bv(bv2int(inL) * bv2int(inR), W)

NEQN

Full Usage: NEQN

outL := bv2nat(inL) != bv2nat(inR)

NEQZ

Full Usage: NEQZ

outL := bv2int(inL) != bv2int(inR)

NOT

Full Usage: NOT

outL := not(inL)

OR

Full Usage: OR

outL := inL || inR

STORE

Full Usage: STORE

load for LSU

SUBN

Full Usage: SUBN

outL := nat2bv(bv2nat(inL) - bv2nat(inR), W)

SUBZ

Full Usage: SUBZ

outL := int2bv(bv2int(inL) - bv2int(inR), W)

SWAP

Full Usage: SWAP

outL := inR; outR := inL

XOR

Full Usage: XOR

outL := inL xor inR

Instance members

Instance member Description

this.Encode

Full Usage: this.Encode

Returns: byte

Encoding of move code instructions using five bits b4..b0 with a prefix encoding such that

  • prefix b4,b3=00 denotes an unsigned arithmetic operation where b2,b1,b0 enumerate eight basic operations ADD,SUB,MUL,DIV,EQQ,NEQ,LES,LEQ
  • prefix b4,b3=01 denotes an signed arithmetic operation where b2,b1,b0 enumerate eight basic operations ADD,SUB,MUL,DIV,EQQ,NEQ,LES,LEQ
  • prefix b4,b3,b2=100 denotes a logic operation where b1,b0 enumerate four basic operations NOT,AND,OR,XOR
  • prefix b4,b3,b2=101 denotes a token move operation where b1,b0 enumerate COPY,DUP,SWAP,KILL
Note further that JOIN is implemented as AND to perform the required synchronization since the value of the tokens do not matter for JOIN.

Returns: byte

this.IsADDN

Full Usage: this.IsADDN

Returns: bool
Returns: bool

this.IsADDZ

Full Usage: this.IsADDZ

Returns: bool
Returns: bool

this.IsAND

Full Usage: this.IsAND

Returns: bool
Returns: bool

this.IsCOPY

Full Usage: this.IsCOPY

Returns: bool
Returns: bool

this.IsDIVN

Full Usage: this.IsDIVN

Returns: bool
Returns: bool

this.IsDIVZ

Full Usage: this.IsDIVZ

Returns: bool
Returns: bool

this.IsDUP

Full Usage: this.IsDUP

Returns: bool
Returns: bool

this.IsEQQN

Full Usage: this.IsEQQN

Returns: bool
Returns: bool

this.IsEQQZ

Full Usage: this.IsEQQZ

Returns: bool
Returns: bool

this.IsJOIN

Full Usage: this.IsJOIN

Returns: bool
Returns: bool

this.IsKILL

Full Usage: this.IsKILL

Returns: bool
Returns: bool

this.IsLEQN

Full Usage: this.IsLEQN

Returns: bool
Returns: bool

this.IsLEQZ

Full Usage: this.IsLEQZ

Returns: bool
Returns: bool

this.IsLESN

Full Usage: this.IsLESN

Returns: bool
Returns: bool

this.IsLESZ

Full Usage: this.IsLESZ

Returns: bool
Returns: bool

this.IsLOAD

Full Usage: this.IsLOAD

Returns: bool
Returns: bool

this.IsMODN

Full Usage: this.IsMODN

Returns: bool
Returns: bool

this.IsMODZ

Full Usage: this.IsMODZ

Returns: bool
Returns: bool

this.IsMULN

Full Usage: this.IsMULN

Returns: bool
Returns: bool

this.IsMULZ

Full Usage: this.IsMULZ

Returns: bool
Returns: bool

this.IsNEQN

Full Usage: this.IsNEQN

Returns: bool
Returns: bool

this.IsNEQZ

Full Usage: this.IsNEQZ

Returns: bool
Returns: bool

this.IsNOT

Full Usage: this.IsNOT

Returns: bool
Returns: bool

this.IsOR

Full Usage: this.IsOR

Returns: bool
Returns: bool

this.IsSTORE

Full Usage: this.IsSTORE

Returns: bool
Returns: bool

this.IsSUBN

Full Usage: this.IsSUBN

Returns: bool
Returns: bool

this.IsSUBZ

Full Usage: this.IsSUBZ

Returns: bool
Returns: bool

this.IsSWAP

Full Usage: this.IsSWAP

Returns: bool
Returns: bool

this.IsXOR

Full Usage: this.IsXOR

Returns: bool
Returns: bool

Static members

Static member Description

OpCodeBED.Decode(b)

Full Usage: OpCodeBED.Decode(b)

Parameters:
    b : byte

Returns: OpCodeBED
b : byte
Returns: OpCodeBED

OpCodeBED.OfString(opcStr)

Full Usage: OpCodeBED.OfString(opcStr)

Parameters:
    opcStr : string

Returns: OpCodeBED

parse an opcode from a string

opcStr : string
Returns: OpCodeBED

Type something to start searching.