From 51e11d9e6c8deea88ba2d24c8a04102c787cdd19 Mon Sep 17 00:00:00 2001 From: bellard Date: Sat, 2 Jul 2005 15:23:21 +0000 Subject: fixed eret insn (Ralf Baechle) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1474 c046a42c-6fe2-441c-8c8c-71466251a162 --- target-mips/op.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'target-mips') 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; } -- cgit v1.2.3