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 | 302 | env->hflags |= MIPS_HFLAG_DM; |
303 | 303 | env->hflags &= ~MIPS_HFLAG_UM; |
304 | 304 | /* EJTAG probe trap enable is not implemented... */ |
305 | + if (!(env->CP0_Status & (1 << CP0St_EXL))) | |
306 | + env->CP0_Cause &= ~(1 << CP0Ca_BD); | |
305 | 307 | env->PC = (int32_t)0xBFC00480; |
306 | 308 | break; |
307 | 309 | case EXCP_RESET: |
... | ... | @@ -324,6 +326,8 @@ void do_interrupt (CPUState *env) |
324 | 326 | } |
325 | 327 | env->CP0_Status |= (1 << CP0St_ERL) | (1 << CP0St_BEV); |
326 | 328 | env->hflags &= ~MIPS_HFLAG_UM; |
329 | + if (!(env->CP0_Status & (1 << CP0St_EXL))) | |
330 | + env->CP0_Cause &= ~(1 << CP0Ca_BD); | |
327 | 331 | env->PC = (int32_t)0xBFC00000; |
328 | 332 | break; |
329 | 333 | case EXCP_MCHECK: | ... | ... |