mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 03:59:52 +00:00
target/avr: Only execute one interrupt at a time
We cannot deliver two interrupts simultaneously; the first interrupt handler must execute first. Reviewed-by: Michael Rolnik <mrolnik@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
9e1b2375da
commit
cecaad5401
@ -28,7 +28,6 @@
|
||||
|
||||
bool avr_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
|
||||
{
|
||||
bool ret = false;
|
||||
AVRCPU *cpu = AVR_CPU(cs);
|
||||
CPUAVRState *env = &cpu->env;
|
||||
|
||||
@ -38,8 +37,7 @@ bool avr_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
|
||||
avr_cpu_do_interrupt(cs);
|
||||
|
||||
cs->interrupt_request &= ~CPU_INTERRUPT_RESET;
|
||||
|
||||
ret = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (interrupt_request & CPU_INTERRUPT_HARD) {
|
||||
@ -52,11 +50,10 @@ bool avr_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
|
||||
if (!env->intsrc) {
|
||||
cs->interrupt_request &= ~CPU_INTERRUPT_HARD;
|
||||
}
|
||||
|
||||
ret = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
return false;
|
||||
}
|
||||
|
||||
void avr_cpu_do_interrupt(CPUState *cs)
|
||||
|
Loading…
Reference in New Issue
Block a user