From 56b90e60c4019b08012bd8bd1459efc00b055577 Mon Sep 17 00:00:00 2001 From: Ivanov Arkasha Date: Fri, 12 Mar 2021 19:47:54 +0300 Subject: target/avr: Fix interrupt execution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only one interrupt is in progress at the moment. It is only necessary to set to reset interrupt_request after all interrupts have been executed. Signed-off-by: Ivanov Arkasha Message-Id: <20210312164754.18437-1-arkaisp2021@gmail.com> Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael Rolnik --- target/avr/helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'target/avr') diff --git a/target/avr/helper.c b/target/avr/helper.c index b4532de..35e1019 100644 --- a/target/avr/helper.c +++ b/target/avr/helper.c @@ -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; } -- cgit v1.1