diff options
Diffstat (limited to 'target-cris/helper.c')
-rw-r--r-- | target-cris/helper.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/target-cris/helper.c b/target-cris/helper.c index a12ac10ee0..ff4f2fe1da 100644 --- a/target-cris/helper.c +++ b/target-cris/helper.c @@ -172,8 +172,6 @@ void do_interrupt(CPUState *env) env->dslot = 0; } - env->pc = ldl_code(env->pregs[PR_EBP] + ex_vec * 4); - if (env->pregs[PR_CCS] & U_FLAG) { /* Swap stack pointers. */ env->pregs[PR_USP] = env->regs[R_SP]; @@ -182,6 +180,10 @@ void do_interrupt(CPUState *env) /* Apply the CRIS CCS shift. Clears U if set. */ cris_shift_ccs(env); + + /* Now that we are in kernel mode, load the handlers address. */ + env->pc = ldl_code(env->pregs[PR_EBP] + ex_vec * 4); + D_LOG("%s isr=%x vec=%x ccs=%x pid=%d erp=%x\n", __func__, env->pc, ex_vec, env->pregs[PR_CCS], |