aboutsummaryrefslogtreecommitdiff
path: root/target/avr
diff options
context:
space:
mode:
authorIvanov Arkasha <ivanovrkasha@gmail.com>2021-03-12 19:47:54 +0300
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2021-03-15 00:39:52 +0100
commit56b90e60c4019b08012bd8bd1459efc00b055577 (patch)
treed3eb3e051a6cf1ec8851442785fe916fd011eb58 /target/avr
parent2e35dfb634daba466adbc382da64e5fd4ce9d2ed (diff)
target/avr: Fix interrupt execution
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 <ivanovrkasha@gmail.com> Message-Id: <20210312164754.18437-1-arkaisp2021@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Michael Rolnik <mrolnik@gmail.com>
Diffstat (limited to 'target/avr')
-rw-r--r--target/avr/helper.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/target/avr/helper.c b/target/avr/helper.c
index b4532de252..35e1019594 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;
}