aboutsummaryrefslogtreecommitdiff
path: root/target/avr/helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/avr/helper.c')
-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;
}