This commit is contained in:
Nilton Constantino
2026-01-28 19:16:41 +00:00
parent 9515bddce8
commit 127ec789bc
8 changed files with 86 additions and 14 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ pub fn disasm(rom: &[u8]) -> Result<Vec<Instr>, String> {
match opcode {
OpCode::PushConst | OpCode::PushI32 | OpCode::Jmp | OpCode::JmpIfFalse | OpCode::JmpIfTrue
| OpCode::GetGlobal | OpCode::SetGlobal | OpCode::GetLocal | OpCode::SetLocal
| OpCode::PopN | OpCode::Syscall => {
| OpCode::PopN | OpCode::Syscall | OpCode::LoadRef | OpCode::StoreRef => {
let v = read_u32_le(&mut cursor).map_err(|e| e.to_string())?;
operands.push(DisasmOperand::U32(v));
}
+1 -1
View File
@@ -54,7 +54,7 @@ pub enum OpCode {
/// Operand: value (i32)
PushI32 = 0x17,
/// Removes `n` values from the stack.
/// Operand: n (u16)
/// Operand: n (u32)
PopN = 0x18,
// --- 6.3 Arithmetic ---