summaryrefslogtreecommitdiff
path: root/target-mips/helper.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-05-28 20:36:48 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-05-28 20:36:48 +0000
commit6e473128b61901441fa2889dfa2079881895a9f9 (patch)
treef6be8334ee0b7031f5c5dcb45c4024b6d9c3a4b8 /target-mips/helper.c
parent85aa199ad7755880060d0481dc1c762c372a1799 (diff)
downloadqemu-6e473128b61901441fa2889dfa2079881895a9f9.tar.gz
qemu-6e473128b61901441fa2889dfa2079881895a9f9.tar.bz2
qemu-6e473128b61901441fa2889dfa2079881895a9f9.zip
Handle PX/UX status flags correctly, by Aurelien Jarno.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2892 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips/helper.c')
-rw-r--r--target-mips/helper.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/target-mips/helper.c b/target-mips/helper.c
index 2dfaffc23f..9da6212a59 100644
--- a/target-mips/helper.c
+++ b/target-mips/helper.c
@@ -370,6 +370,7 @@ void do_interrupt (CPUState *env)
}
enter_debug_mode:
env->hflags |= MIPS_HFLAG_DM;
+ 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,6 +396,7 @@ void do_interrupt (CPUState *env)
env->CP0_ErrorEPC = env->PC;
}
env->CP0_Status |= (1 << CP0St_ERL) | (1 << CP0St_BEV);
+ env->hflags |= MIPS_HFLAG_64;
env->hflags &= ~MIPS_HFLAG_UM;
if (!(env->CP0_Status & (1 << CP0St_EXL)))
env->CP0_Cause &= ~(1 << CP0Ca_BD);
@@ -493,6 +495,7 @@ void do_interrupt (CPUState *env)
env->CP0_Cause &= ~(1 << CP0Ca_BD);
}
env->CP0_Status |= (1 << CP0St_EXL);
+ env->hflags |= MIPS_HFLAG_64;
env->hflags &= ~MIPS_HFLAG_UM;
}
env->hflags &= ~MIPS_HFLAG_BMASK;