Move utils to separate crate

This commit is contained in:
2026-08-18 10:01:06 +02:00
parent c21c4af378
commit 08d1e9c797
13 changed files with 309 additions and 126 deletions
+9 -14
View File
@@ -1,14 +1,11 @@
use crate::{
core::{
cpu::{Cpu, CpuType::*},
instruction::Instruction,
mem::Memory,
registers::Registers,
},
utils::{
access::is_address_error,
error::{Error, Severity, Type::UnhandledInstruction},
},
use crate::core::{
cpu::{Cpu, CpuType::*},
mem::Memory,
registers::Registers,
};
use utils::{
error::{Error, Severity, Type::UnhandledInstruction},
instruction::Instruction,
};
pub struct Interpreter {
@@ -45,9 +42,7 @@ impl Cpu for Interpreter {
self.prev_delay_slot = self.delay_slot;
self.delay_slot = false;
if is_address_error(&self.regs, 0b11, self.regs.curr_pc) {
todo!("is_address_error ? then throw exception and return None");
}
todo!("is_address_error ? then throw exception and return None");
let instr = self.fetch(mem, self.regs.curr_pc as u64)?;