qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 28/35] target/mips: Fix nanoMIPS set_pc


From: Yongbok Kim
Subject: [Qemu-devel] [PATCH 28/35] target/mips: Fix nanoMIPS set_pc
Date: Wed, 20 Jun 2018 13:06:13 +0100

From: James Hogan <address@hidden>

ERET and ERETNC shouldn't clear MIPS_HFLAG_M16 for nanoMIPS since there
is no ISA bit, so fix set_pc() to skip the hflags update.

Signed-off-by: James Hogan <address@hidden>
Signed-off-by: Yongbok Kim <address@hidden>
---
 target/mips/op_helper.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/target/mips/op_helper.c b/target/mips/op_helper.c
index 9946f77..6f5e5a3 100644
--- a/target/mips/op_helper.c
+++ b/target/mips/op_helper.c
@@ -2432,6 +2432,10 @@ static void debug_post_eret(CPUMIPSState *env)
 static void set_pc(CPUMIPSState *env, target_ulong error_pc)
 {
     env->active_tc.PC = error_pc & ~(target_ulong)1;
+    if (env->insn_flags & ISA_NANOMIPS32) {
+        /* Don't clear MIPS_HFLAG_M16 */
+        return;
+    }
     if (error_pc & 1) {
         env->hflags |= MIPS_HFLAG_M16;
     } else {
-- 
1.9.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]