Functionsยง
- Converts our memory image (u32 -> [u8; 4]) into Vm memory image ((as, address) -> word)
- Create a new
Instruction
from a B-type instruction. - Create a new
Instruction
from an I-type instruction. Should only be used for ALU instructions becauseimm
is transpiled in a special way. - Create a new
Instruction
from an I-type instruction with a shamt. It seems that shamt can only occur in SLLI, SRLI, SRAI. - Create a new
Instruction
from a J-type instruction. - Create a new
Instruction
from a load operation - Create a new
Instruction
from an R-type instruction. - Create a new
Instruction
from an S-type instruction. - Create a new
Instruction
from a U-type instruction. - Create a new
Instruction
that exits with code 2. This is equivalent to program panic but with a special exit code for debugging.