summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/core.rs b/src/core.rs
index 7e477c1..d5b254d 100644
--- a/src/core.rs
+++ b/src/core.rs
@@ -50,19 +50,17 @@ impl Core {
}
if instr & 3 != 3 {
+ // Compressed instruction - (currently) unsupported
self.throw_exception(ExceptionType::IllegalInstruction);
break;
}
let instr = Instruction(instr);
- match find_and_exec(instr, self) {
- Ok(()) => {}
- Err(e) => {
- self.throw_exception(e);
- eprintln!("instr: {:08x}", instr.0);
- break;
- }
+ if let Err(e) = find_and_exec(instr, self) {
+ self.throw_exception(e);
+ eprintln!("instr: {:08x}", instr.0);
+ break;
}
}
}