Skip to content
This repository was archived by the owner on Feb 3, 2020. It is now read-only.

Commit a0c0b9a

Browse files
cpu-exec:only allow interrupt in concrete mode
Signed-off-by: chaojixx <wpz5080@psu.edu>
1 parent 1ffcdb6 commit a0c0b9a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/cpu-exec.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,9 +451,11 @@ static bool process_interrupt_request(CPUArchState *env) {
451451
if ((interrupt_request & CPU_INTERRUPT_HARD) &&
452452
((IS_M(env) && env->regs[15] < 0xfffffff0) || !(env->uncached_cpsr & CPSR_I))) {
453453
if ((armv7m_nvic_can_take_pending_exception(env->nvic))) {
454-
env->exception_index = EXCP_IRQ;
455-
do_interrupt(env);
456-
has_interrupt = true;
454+
if (likely(*g_sqi.mode.fast_concrete_invocation && **g_sqi.mode.running_concrete)) {
455+
env->exception_index = EXCP_IRQ;
456+
do_interrupt(env);
457+
has_interrupt = true;
458+
}
457459
} else {
458460
DPRINTF("cpu basepri = %d take_exc = %d\n", env->v7m.basepri, armv7m_nvic_can_take_pending_exception(env->nvic));
459461
}

0 commit comments

Comments
 (0)