Move utils to separate crate
This commit is contained in:
@@ -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)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user