mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-24 22:15:07 +00:00
armv7m: Clear FAULTMASK on return from non-NMI exceptions
FAULTMASK must be cleared on return from all exceptions other than NMI. Backports commit a20ee6005564590d33eabec11ed4dc7c432db36b from qemu
This commit is contained in:
parent
cc9458cf59
commit
7f044bf8cc
|
@ -5339,8 +5339,14 @@ static void do_v7m_exception_exit(CPUARMState *env)
|
||||||
uint32_t xpsr;
|
uint32_t xpsr;
|
||||||
|
|
||||||
type = env->regs[15];
|
type = env->regs[15];
|
||||||
//if (env->v7m.exception != 0)
|
if (env->v7m.exception != ARMV7M_EXCP_NMI) {
|
||||||
// armv7m_nvic_complete_irq(env->nvic, env->v7m.exception);
|
/* Auto-clear FAULTMASK on return from other than NMI */
|
||||||
|
env->daif &= ~PSTATE_F;
|
||||||
|
}
|
||||||
|
/* Unicorn: commented out
|
||||||
|
if (env->v7m.exception != 0) {
|
||||||
|
armv7m_nvic_complete_irq(env->nvic, env->v7m.exception);
|
||||||
|
}*/
|
||||||
|
|
||||||
/* Switch to the target stack. */
|
/* Switch to the target stack. */
|
||||||
switch_v7m_sp(env, (type & 4) != 0);
|
switch_v7m_sp(env, (type & 4) != 0);
|
||||||
|
|
Loading…
Reference in a new issue