aboutsummaryrefslogtreecommitdiffstats
path: root/target-mips/helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-mips/helper.c')
-rw-r--r--target-mips/helper.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/target-mips/helper.c b/target-mips/helper.c
index c1a7792f7..1c8370470 100644
--- a/target-mips/helper.c
+++ b/target-mips/helper.c
@@ -369,7 +369,8 @@ void do_interrupt (CPUState *env)
}
enter_debug_mode:
env->hflags |= MIPS_HFLAG_DM;
- env->hflags |= MIPS_HFLAG_64;
+ if ((env->CP0_Config0 & (0x3 << CP0C0_AT)))
+ env->hflags |= MIPS_HFLAG_64;
env->hflags &= ~MIPS_HFLAG_UM;
/* EJTAG probe trap enable is not implemented... */
if (!(env->CP0_Status & (1 << CP0St_EXL)))
@@ -395,7 +396,8 @@ void do_interrupt (CPUState *env)
env->CP0_ErrorEPC = env->PC;
}
env->CP0_Status |= (1 << CP0St_ERL) | (1 << CP0St_BEV);
- env->hflags |= MIPS_HFLAG_64;
+ if ((env->CP0_Config0 & (0x3 << CP0C0_AT)))
+ env->hflags |= MIPS_HFLAG_64;
env->hflags &= ~MIPS_HFLAG_UM;
if (!(env->CP0_Status & (1 << CP0St_EXL)))
env->CP0_Cause &= ~(1 << CP0Ca_BD);
@@ -494,7 +496,8 @@ void do_interrupt (CPUState *env)
env->CP0_Cause &= ~(1 << CP0Ca_BD);
}
env->CP0_Status |= (1 << CP0St_EXL);
- env->hflags |= MIPS_HFLAG_64;
+ if ((env->CP0_Config0 & (0x3 << CP0C0_AT)))
+ env->hflags |= MIPS_HFLAG_64;
env->hflags &= ~MIPS_HFLAG_UM;
}
env->hflags &= ~MIPS_HFLAG_BMASK;