From ac9506a1a785495a8f5f299ca90f948cce28ecc7 Mon Sep 17 00:00:00 2001 From: taitep Date: Sun, 21 Dec 2025 12:07:12 +0100 Subject: (BIG CHANGE) Switch instruction identification/execution to use a plain match tree, should improve performance by quite a bit --- src/core.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/core.rs') diff --git a/src/core.rs b/src/core.rs index 1628216..4c17070 100644 --- a/src/core.rs +++ b/src/core.rs @@ -7,7 +7,7 @@ use crate::{ consts::{Addr, RegId, RegValue}, decode::Instruction, - instructions::find_runner, + instructions::find_and_exec, mem::MemConfig, }; @@ -57,11 +57,9 @@ impl Core { let instr = Instruction(instr); - let runner = find_runner(instr); - - if let Some(runner) = runner { - let res = runner(self, instr); + let res = find_and_exec(instr, self); + if let Some(res) = res { match res { InstructionResult::Normal => {} InstructionResult::Exception(_e) => { -- cgit v1.2.3