aboutsummaryrefslogtreecommitdiff
path: root/target-mips/helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-mips/helper.c')
-rw-r--r--target-mips/helper.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/target-mips/helper.c b/target-mips/helper.c
index 71a9723396..8d9435a232 100644
--- a/target-mips/helper.c
+++ b/target-mips/helper.c
@@ -302,6 +302,8 @@ void do_interrupt (CPUState *env)
env->hflags |= MIPS_HFLAG_DM;
env->hflags &= ~MIPS_HFLAG_UM;
/* EJTAG probe trap enable is not implemented... */
+ if (!(env->CP0_Status & (1 << CP0St_EXL)))
+ env->CP0_Cause &= ~(1 << CP0Ca_BD);
env->PC = (int32_t)0xBFC00480;
break;
case EXCP_RESET:
@@ -324,6 +326,8 @@ void do_interrupt (CPUState *env)
}
env->CP0_Status |= (1 << CP0St_ERL) | (1 << CP0St_BEV);
env->hflags &= ~MIPS_HFLAG_UM;
+ if (!(env->CP0_Status & (1 << CP0St_EXL)))
+ env->CP0_Cause &= ~(1 << CP0Ca_BD);
env->PC = (int32_t)0xBFC00000;
break;
case EXCP_MCHECK: