(BIG CHANGE) Switch instruction identification/execution to use a plain match tree, should improve performance by quite a bit
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user