From d53c021cea9a0c89105eb32c83a6c8b16f866f4b Mon Sep 17 00:00:00 2001 From: Yongbok Kim Date: Mon, 27 Aug 2018 15:00:51 -0400 Subject: [PATCH] target/mips: Fix ERET/ERETNC behavior related to ADEL exception Fix ERET/ERETNC so that ADEL exception can be raised. Backports commit 26324ded91a5ad08a5de8f32b8ed5e5e243154cf from qemu --- qemu/target/mips/op_helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qemu/target/mips/op_helper.c b/qemu/target/mips/op_helper.c index 2286f0c8..5b7bbfc4 100644 --- a/qemu/target/mips/op_helper.c +++ b/qemu/target/mips/op_helper.c @@ -2421,10 +2421,12 @@ void helper_eretnc(CPUMIPSState *env) void helper_deret(CPUMIPSState *env) { debug_pre_eret(env); - set_pc(env, env->CP0_DEPC); env->hflags &= ~MIPS_HFLAG_DM; compute_hflags(env); + + set_pc(env, env->CP0_DEPC); + debug_post_eret(env); } #endif /* !CONFIG_USER_ONLY */