qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH v2 6/6] target/mips: Guard check_insn with INSN_R590


From: Fredrik Noring
Subject: [Qemu-devel] [PATCH v2 6/6] target/mips: Guard check_insn with INSN_R5900 check
Date: Wed, 7 Nov 2018 20:19:45 +0100
User-agent: Mutt/1.10.1 (2018-07-13)

Signed-off-by: Fredrik Noring <address@hidden>
---
 target/mips/translate.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/target/mips/translate.c b/target/mips/translate.c
index c3ed4c21ce..007dfd2975 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -28329,8 +28329,11 @@ static void decode_opc(CPUMIPSState *env, DisasContext 
*ctx)
         break;
     case OPC_PREF:
         check_insn_opc_removed(ctx, ISA_MIPS32R6);
-        check_insn(ctx, ISA_MIPS4 | ISA_MIPS32 |
-                   INSN_R5900);
+        if (ctx->insn_flags & INSN_R5900) {
+            /* The R5900 implements PREF. */
+        } else {
+            check_insn(ctx, ISA_MIPS4 | ISA_MIPS32);
+        }
         /* Treat as NOP. */
         break;
 
-- 
2.18.1




reply via email to

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