diff --git a/lunar_wave_vm/src/loader.rs b/lunar_wave_vm/src/loader.rs index 8320ed5..894e37b 100644 --- a/lunar_wave_vm/src/loader.rs +++ b/lunar_wave_vm/src/loader.rs @@ -120,7 +120,6 @@ pub trait DecodeInstruction { } impl DecodeInstruction for u32 { - #[inline(always)] fn opcode (self) -> u8 { ((self >> 0) & 0x7f) as u8 } diff --git a/lunar_wave_vm/src/state.rs b/lunar_wave_vm/src/state.rs index 8789eb0..1d9dd0d 100644 --- a/lunar_wave_vm/src/state.rs +++ b/lunar_wave_vm/src/state.rs @@ -551,12 +551,12 @@ impl State { { use crate::loader::DecodeInstruction; - let i = self.fetch (); - let make_step_error = |msg| { panic! ("unimplemented {msg}") }; + let i = self.fetch (); + match i.opcode () { 0x22 => { if self.op_add (i.a (), i.b (), i.c ()) {