From cd0cf33dfcf873980aa169b0365e1c0ee48f0f33 Mon Sep 17 00:00:00 2001 From: _ <_@_> Date: Wed, 4 Oct 2023 18:15:57 -0500 Subject: [PATCH] :chart_with_upwards_trends: this seems to get it under 3 seconds sometimes --- lunar_wave_vm/src/loader.rs | 1 - lunar_wave_vm/src/state.rs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) 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 ()) {