diff options
| author | taitep <taitep@taitep.se> | 2025-12-21 12:07:12 +0100 |
|---|---|---|
| committer | taitep <taitep@taitep.se> | 2025-12-21 12:07:12 +0100 |
| commit | ac9506a1a785495a8f5f299ca90f948cce28ecc7 (patch) | |
| tree | a3517406fc74edca336249601cc89b65477f5d2e /src/core.rs | |
| parent | e2d521bbe73708da64662478155630d634e00932 (diff) | |
(BIG CHANGE) Switch instruction identification/execution to use a plain match tree, should improve performance by quite a bit
Diffstat (limited to 'src/core.rs')
| -rw-r--r-- | src/core.rs | 8 |
1 files changed, 3 insertions, 5 deletions
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) => { |
