Restart interrupts after an exception.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2664 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
ths 2007-04-14 12:56:46 +00:00
parent dcb5b19a4e
commit 16c00cb2c2
2 changed files with 33 additions and 9 deletions

View file

@ -5234,15 +5234,26 @@ gen_intermediate_code_internal (CPUState *env, TranslationBlock *tb,
if (env->singlestep_enabled) {
save_cpu_state(ctxp, ctx.bstate == BS_NONE);
gen_op_debug();
goto done_generating;
} else {
switch (ctx.bstate) {
case BS_EXCP:
gen_op_interrupt_restart();
break;
case BS_STOP:
gen_op_interrupt_restart();
/* Fall through. */
case BS_NONE:
save_cpu_state(ctxp, 0);
gen_goto_tb(&ctx, 0, ctx.pc);
break;
case BS_BRANCH:
default:
break;
}
gen_op_reset_T0();
/* Generate the return instruction. */
gen_op_exit_tb();
}
else if (ctx.bstate != BS_BRANCH && ctx.bstate != BS_EXCP) {
save_cpu_state(ctxp, 0);
gen_goto_tb(&ctx, 0, ctx.pc);
}
gen_op_reset_T0();
/* Generate the return instruction */
gen_op_exit_tb();
done_generating:
*gen_opc_ptr = INDEX_op_end;
if (search_pc) {