Definition of the Instructions.
- LoadAddress : UInt64 → UInt64 → Instr
Load an address into a register
Syntax:
la x dst, mwhere
(dst m : UInt64).Note: Numbers of type UInt64 can be written as hexadecimal (e.g.
0xf123), which might serve as address. - LoadImmediate : UInt64 → UInt64 → Instr
- CopyRegister : UInt64 → UInt64 → Instr
- AddImmediate : UInt64 → UInt64 → UInt64 → Instr
- Increment : UInt64 → Instr
- AddRegister : UInt64 → UInt64 → UInt64 → Instr
- SubImmediate : UInt64 → UInt64 → UInt64 → Instr
- Decrement : UInt64 → Instr
- SubRegister : UInt64 → UInt64 → UInt64 → Instr
- XorImmediate : UInt64 → UInt64 → UInt64 → Instr
- XOR : UInt64 → UInt64 → UInt64 → Instr
- LoadWordImmediate : UInt64 → UInt64 → Instr
Load the content of the memory at the address which provided as an immedtiate value into a register
Syntax:
lw x dst, mem_addrwhere
(dst mem_addr : UInt64). - LoadWordReg : UInt64 → UInt64 → Instr
- StoreWord : UInt64 → UInt64 → Instr
- Jump : String → Instr
Jump to a given labelname.
Syntax:
j labelwhere
(label : ident).Note: Due to the elaboration, the actual syntax does not require a
Stringbut an identifier (ident). Therefore, there is no need to use quotation marks to represent a sequence of characters as a string type. This is also true for all the following conditional jump instuctions - JumpEq : UInt64 → UInt64 → String → Instr
- JumpNeq : UInt64 → UInt64 → String → Instr
- JumpGt : UInt64 → UInt64 → String → Instr
- JumpLe : UInt64 → UInt64 → String → Instr
- JumpEqZero : UInt64 → String → Instr
Jump to a given labelname when the content of the register provided is equal to zero.
Syntax:
beqz x reg, labelwhere
(reg : UInt64) (label : ident). - JumpNeqZero : UInt64 → String → Instr
Jump to a given labelname when the content of the first register provided is greater than the content of the other register provided.
Syntax:
bnez x reg, labelwhere
(reg : UInt64) (label : ident). - Panic : Instr
Default instruction, sets the terminated flag to true
Instances For
Equations
- instReprInstr = { reprPrec := instReprInstr.repr }
Equations
- One or more equations did not get rendered due to their size.
- instReprInstr.repr Instr.Panic prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Instr.Panic")).group prec✝
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- instBEqInstr = { beq := instBEqInstr.beq }
Equations
- instInhabitedInstr = { default := instInhabitedInstr.default }
ToString for delaboration
Equations
- One or more equations did not get rendered due to their size.
Equations
- instBEqInstr_1 = { beq := Instr.beq }