mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
target/avr: Disable interrupts when env->skip set
This bit is not saved across interrupts, so we must delay delivering the interrupt until the skip has been processed. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1118 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
cecaad5401
commit
36027c7097
2 changed files with 31 additions and 4 deletions
|
@ -31,6 +31,15 @@ bool avr_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
|
|||
AVRCPU *cpu = AVR_CPU(cs);
|
||||
CPUAVRState *env = &cpu->env;
|
||||
|
||||
/*
|
||||
* We cannot separate a skip from the next instruction,
|
||||
* as the skip would not be preserved across the interrupt.
|
||||
* Separating the two insn normally only happens at page boundaries.
|
||||
*/
|
||||
if (env->skip) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (interrupt_request & CPU_INTERRUPT_RESET) {
|
||||
if (cpu_interrupts_enabled(env)) {
|
||||
cs->exception_index = EXCP_RESET;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue