diff options
author | Ivanov Arkasha <ivanovrkasha@gmail.com> | 2021-03-12 19:47:54 +0300 |
---|---|---|
committer | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2021-03-15 00:39:52 +0100 |
commit | 56b90e60c4019b08012bd8bd1459efc00b055577 (patch) | |
tree | d3eb3e051a6cf1ec8851442785fe916fd011eb58 /target | |
parent | 2e35dfb634daba466adbc382da64e5fd4ce9d2ed (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')
-rw-r--r-- | target/avr/helper.c | 4 |
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; } |