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

Commit

Permalink
cpu-exec:only allow interrupt in concrete mode
Browse files Browse the repository at this point in the history
Signed-off-by: chaojixx <[email protected]>
  • Loading branch information
weizhou-chaojixx committed Jan 13, 2020
1 parent 1ffcdb6 commit a0c0b9a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/cpu-exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,11 @@ static bool process_interrupt_request(CPUArchState *env) {
if ((interrupt_request & CPU_INTERRUPT_HARD) &&
((IS_M(env) && env->regs[15] < 0xfffffff0) || !(env->uncached_cpsr & CPSR_I))) {
if ((armv7m_nvic_can_take_pending_exception(env->nvic))) {
env->exception_index = EXCP_IRQ;
do_interrupt(env);
has_interrupt = true;
if (likely(*g_sqi.mode.fast_concrete_invocation && **g_sqi.mode.running_concrete)) {
env->exception_index = EXCP_IRQ;
do_interrupt(env);
has_interrupt = true;
}
} else {
DPRINTF("cpu basepri = %d take_exc = %d\n", env->v7m.basepri, armv7m_nvic_can_take_pending_exception(env->nvic));
}
Expand Down

0 comments on commit a0c0b9a

Please sign in to comment.