Small refactor in exception handling in core.rs
This commit is contained in:
12
src/core.rs
12
src/core.rs
@@ -50,19 +50,17 @@ impl Core {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if instr & 3 != 3 {
|
if instr & 3 != 3 {
|
||||||
|
// Compressed instruction - (currently) unsupported
|
||||||
self.throw_exception(ExceptionType::IllegalInstruction);
|
self.throw_exception(ExceptionType::IllegalInstruction);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
let instr = Instruction(instr);
|
let instr = Instruction(instr);
|
||||||
|
|
||||||
match find_and_exec(instr, self) {
|
if let Err(e) = find_and_exec(instr, self) {
|
||||||
Ok(()) => {}
|
self.throw_exception(e);
|
||||||
Err(e) => {
|
eprintln!("instr: {:08x}", instr.0);
|
||||||
self.throw_exception(e);
|
break;
|
||||||
eprintln!("instr: {:08x}", instr.0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user