diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-08-26 17:37:23 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-08-26 17:37:23 +0000 |
commit | 3ddf0b5cde7c741258487710c40f7318fdcd0f18 (patch) | |
tree | e106e525e0477c3559ae68c90d28406e7c9890dc /target-mips/helper.c | |
parent | c92843b5dfc1e8f7baace9b7a4eac3e3231ac73e (diff) |
Disable 64-bit instructions on 32-bit CPU, by Aurelien Jarno.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3146 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips/helper.c')
-rw-r--r-- | target-mips/helper.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/target-mips/helper.c b/target-mips/helper.c index c1a7792f72..1c83704705 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; |