Correct F flag behaviour when entrying an exception.

Former-commit-id: b0ef6352d9f0c027657c6e5eeb615a131e9523d2
This commit is contained in:
Michel Heily 2019-06-29 23:01:23 +03:00
parent 967ccca8dd
commit 98eee121fc

View file

@ -43,8 +43,9 @@ impl Core {
self.cpsr.set_state(CpuState::ARM);
self.cpsr.set_mode(new_mode);
self.cpsr.set_irq_disabled(true);
let disabled_fiq = e == Exception::Reset || e == Exception::Fiq;
self.cpsr.set_fiq_disabled(disabled_fiq);
if e == Exception::Reset || e == Exception::Fiq {
self.cpsr.set_fiq_disabled(true);
}
// Set PC to vector address
self.pc = vector;