aboutsummaryrefslogtreecommitdiff
path: root/target-mips/op.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-07-02 15:23:21 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-07-02 15:23:21 +0000
commit51e11d9e6c8deea88ba2d24c8a04102c787cdd19 (patch)
treee0de99437812f99d6b5dcc78be064434d2844eb0 /target-mips/op.c
parent90b37806ba1a09b77dc6245ac34dabbceba555df (diff)
fixed eret insn (Ralf Baechle)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1474 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips/op.c')
-rw-r--r--target-mips/op.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/target-mips/op.c b/target-mips/op.c
index 6d94be6311..df76e8e71e 100644
--- a/target-mips/op.c
+++ b/target-mips/op.c
@@ -597,10 +597,13 @@ void debug_eret (void);
void op_eret (void)
{
CALL_FROM_TB0(debug_eret);
- if (env->hflags & MIPS_HFLAG_ERL)
+ if (env->hflags & MIPS_HFLAG_ERL) {
env->PC = env->CP0_ErrorEPC;
- else
+ env->hflags &= ~MIPS_HFLAG_ERL;
+ } else {
env->PC = env->CP0_EPC;
+ env->hflags &= ~MIPS_HFLAG_EXL;
+ }
env->CP0_LLAddr = 1;
}