aboutsummaryrefslogtreecommitdiff
path: root/target-mips/translate.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-14 12:56:46 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-14 12:56:46 +0000
commit16c00cb2c2017aaa04f2849903210761825145e7 (patch)
treecb24445c34422504ae0715a71526c507dd31dea5 /target-mips/translate.c
parentdcb5b19a4e32d300a3ddf14fa8cc9a0a055dd1db (diff)
Restart interrupts after an exception.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2664 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips/translate.c')
-rw-r--r--target-mips/translate.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/target-mips/translate.c b/target-mips/translate.c
index 75221c9c81..b0cc3e7174 100644
--- a/target-mips/translate.c
+++ b/target-mips/translate.c
@@ -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 if (ctx.bstate != BS_BRANCH && ctx.bstate != BS_EXCP) {
- save_cpu_state(ctxp, 0);
- gen_goto_tb(&ctx, 0, ctx.pc);
+ } 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();
}
- gen_op_reset_T0();
- /* Generate the return instruction */
- gen_op_exit_tb();
done_generating:
*gen_opc_ptr = INDEX_op_end;
if (search_pc) {