chore(cpu): merge halted and state properties

This commit is contained in:
2021-08-15 23:26:01 -05:00
parent a77d0a0f62
commit 6215eccb2f
2 changed files with 24 additions and 16 deletions

View File

@@ -590,12 +590,12 @@ impl Instruction {
// HALT | Enter CPU low power consumption mode until interrupt occurs
use HaltKind::*;
let kind = match *cpu.ime() {
let kind = match cpu.ime() {
ImeState::Enabled => ImeEnabled,
_ if cpu.int_request() & cpu.int_enable() != 0 => SomePending,
_ => NonePending,
};
cpu.halt(kind);
cpu.halt_cpu(kind);
Cycle::new(4)
}
Instruction::ADC(source) => match source {