target/avr: Fix interrupt execution
PATCH 1/1 target/avr: Fix interrupt execution
From: NDNF <[email protected]>
Only one interrupt is in progress at the moment.It is necessary to set to reset interrupt_request only after all interrupts have been executed
Signed-off-by Arkasha <[email protected]>
--- target/avr/helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
target/avr/helper.c +3 -1
@@ -49,7 +49,9 @@ bool avr_cpu_exec_interrupt(CPUState *cs, int interrupt_request) cc->tcg_ops->do_interrupt (cs); env->intsrc &= env->intsrc -1 ;/* clear the interrupt */ - cs->interrupt_request &= ~CPU_INTERRUPT_HARD ; +if (!env->intsrc) { + cs->interrupt_request &= ~CPU_INTERRUPT_HARD ; + } ret = true; }
Signature · 1 line
2.17.1