spu: Fix interrupt jump check - also change interrupt variable to atomic bool for ease of setting/checking

This commit is contained in:
Jake 2017-11-30 20:50:01 -06:00 committed by kd-11
parent 34e01ba3d8
commit d17093e65b
6 changed files with 15 additions and 14 deletions

View file

@ -50,9 +50,9 @@ void spu_interpreter::set_interrupt_status(SPUThread& spu, spu_opcode_t op)
spu.set_interrupt_status(false);
}
if ((spu.ch_event_stat & SPU_EVENT_INTR_TEST & spu.ch_event_mask) > SPU_EVENT_INTR_ENABLED)
if (spu.interrupts_enabled && (spu.ch_event_mask & spu.ch_event_stat & SPU_EVENT_INTR_IMPLEMENTED) > 0)
{
spu.ch_event_stat &= ~SPU_EVENT_INTR_ENABLED;
spu.interrupts_enabled = false;
spu.srr0 = std::exchange(spu.pc, -4) + 4;
}
}