Commit 0a6de7500261839c9383b30207ba2ca5f7a402eb
1 parent
b4f0a316
Clear BD slot on next exception if appropriate.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2777 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
4 additions
and
0 deletions
target-mips/helper.c
@@ -302,6 +302,8 @@ void do_interrupt (CPUState *env) | @@ -302,6 +302,8 @@ void do_interrupt (CPUState *env) | ||
302 | env->hflags |= MIPS_HFLAG_DM; | 302 | env->hflags |= MIPS_HFLAG_DM; |
303 | env->hflags &= ~MIPS_HFLAG_UM; | 303 | env->hflags &= ~MIPS_HFLAG_UM; |
304 | /* EJTAG probe trap enable is not implemented... */ | 304 | /* EJTAG probe trap enable is not implemented... */ |
305 | + if (!(env->CP0_Status & (1 << CP0St_EXL))) | ||
306 | + env->CP0_Cause &= ~(1 << CP0Ca_BD); | ||
305 | env->PC = (int32_t)0xBFC00480; | 307 | env->PC = (int32_t)0xBFC00480; |
306 | break; | 308 | break; |
307 | case EXCP_RESET: | 309 | case EXCP_RESET: |
@@ -324,6 +326,8 @@ void do_interrupt (CPUState *env) | @@ -324,6 +326,8 @@ void do_interrupt (CPUState *env) | ||
324 | } | 326 | } |
325 | env->CP0_Status |= (1 << CP0St_ERL) | (1 << CP0St_BEV); | 327 | env->CP0_Status |= (1 << CP0St_ERL) | (1 << CP0St_BEV); |
326 | env->hflags &= ~MIPS_HFLAG_UM; | 328 | env->hflags &= ~MIPS_HFLAG_UM; |
329 | + if (!(env->CP0_Status & (1 << CP0St_EXL))) | ||
330 | + env->CP0_Cause &= ~(1 << CP0Ca_BD); | ||
327 | env->PC = (int32_t)0xBFC00000; | 331 | env->PC = (int32_t)0xBFC00000; |
328 | break; | 332 | break; |
329 | case EXCP_MCHECK: | 333 | case EXCP_MCHECK: |