qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aleksandar Markovic <aleksandar.markovic@rt-rk.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org
Subject: [Qemu-devel] [PULL 10/19] target/mips: Fix MT ASE instructions' availability control
Date: Tue, 14 Aug 2018 20:16:52 +0200	[thread overview]
Message-ID: <1534270621-27332-11-git-send-email-aleksandar.markovic@rt-rk.com> (raw)
In-Reply-To: <1534270621-27332-1-git-send-email-aleksandar.markovic@rt-rk.com>

From: Aleksandar Rikalo <arikalo@wavecomp.com>

Use bits from configuration registers for availability control
of MT ASE instructions, rather than only ISA_MT bit in insn_flags.

Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Signed-off-by: Stefan Markovic <smarkovic@wavecomp.com>
---
 target/mips/translate.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/target/mips/translate.c b/target/mips/translate.c
index d827d3b..e62ea96 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -8393,7 +8393,7 @@ static void gen_cp0 (CPUMIPSState *env, DisasContext *ctx, uint32_t opc, int rt,
         opn = "mthc0";
         break;
     case OPC_MFTR:
-        check_insn(ctx, ASE_MT);
+        check_cp0_enabled(ctx);
         if (rd == 0) {
             /* Treat as NOP. */
             return;
@@ -8403,7 +8403,7 @@ static void gen_cp0 (CPUMIPSState *env, DisasContext *ctx, uint32_t opc, int rt,
         opn = "mftr";
         break;
     case OPC_MTTR:
-        check_insn(ctx, ASE_MT);
+        check_cp0_enabled(ctx);
         gen_mttr(env, ctx, rd, rt, (ctx->opcode >> 5) & 1,
                  ctx->opcode & 0x7, (ctx->opcode >> 4) & 1);
         opn = "mttr";
@@ -18619,7 +18619,7 @@ static void decode_opc_special3(CPUMIPSState *env, DisasContext *ctx)
         gen_rdhwr(ctx, rt, rd, extract32(ctx->opcode, 6, 3));
         break;
     case OPC_FORK:
-        check_insn(ctx, ASE_MT);
+        check_mt(ctx);
         {
             TCGv t0 = tcg_temp_new();
             TCGv t1 = tcg_temp_new();
@@ -18632,7 +18632,7 @@ static void decode_opc_special3(CPUMIPSState *env, DisasContext *ctx)
         }
         break;
     case OPC_YIELD:
-        check_insn(ctx, ASE_MT);
+        check_mt(ctx);
         {
             TCGv t0 = tcg_temp_new();
 
@@ -19929,22 +19929,22 @@ static void decode_opc(CPUMIPSState *env, DisasContext *ctx)
                 op2 = MASK_MFMC0(ctx->opcode);
                 switch (op2) {
                 case OPC_DMT:
-                    check_insn(ctx, ASE_MT);
+                    check_cp0_mt(ctx);
                     gen_helper_dmt(t0);
                     gen_store_gpr(t0, rt);
                     break;
                 case OPC_EMT:
-                    check_insn(ctx, ASE_MT);
+                    check_cp0_mt(ctx);
                     gen_helper_emt(t0);
                     gen_store_gpr(t0, rt);
                     break;
                 case OPC_DVPE:
-                    check_insn(ctx, ASE_MT);
+                    check_cp0_mt(ctx);
                     gen_helper_dvpe(t0, cpu_env);
                     gen_store_gpr(t0, rt);
                     break;
                 case OPC_EVPE:
-                    check_insn(ctx, ASE_MT);
+                    check_cp0_mt(ctx);
                     gen_helper_evpe(t0, cpu_env);
                     gen_store_gpr(t0, rt);
                     break;
-- 
2.7.4

  parent reply	other threads:[~2018-08-14 18:19 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-14 18:16 [Qemu-devel] [PULL 00/19] MIPS queue for QEMU upstream, August 14, 2018 Aleksandar Markovic
2018-08-14 18:16 ` [Qemu-devel] [PULL 01/19] MAINTAINERS: Update target/mips maintainer's email addresses Aleksandar Markovic
2018-08-14 18:16 ` [Qemu-devel] [PULL 02/19] target/mips: Avoid case statements formulated by ranges - part 1 Aleksandar Markovic
2018-08-14 18:16 ` [Qemu-devel] [PULL 03/19] target/mips: Avoid case statements formulated by ranges - part 2 Aleksandar Markovic
2018-08-14 18:16 ` [Qemu-devel] [PULL 04/19] target/mips: Mark switch fallthroughs with interpretable comments Aleksandar Markovic
2018-08-14 18:16 ` [Qemu-devel] [PULL 05/19] target/mips: Fix two instances of shadow variables Aleksandar Markovic
2018-08-14 18:16 ` [Qemu-devel] [PULL 06/19] target/mips: Update some CP0 registers bit definitions Aleksandar Markovic
2018-08-14 18:16 ` [Qemu-devel] [PULL 07/19] target/mips: Add CP0 BadInstrX register Aleksandar Markovic
2018-08-14 18:16 ` [Qemu-devel] [PULL 08/19] target/mips: Add support for availability control via bit XNP Aleksandar Markovic
2018-08-14 18:16 ` [Qemu-devel] [PULL 09/19] target/mips: Add support for availability control via bit MT Aleksandar Markovic
2018-08-14 18:16 ` Aleksandar Markovic [this message]
2018-08-14 18:16 ` [Qemu-devel] [PULL 11/19] target/mips: Implement CP0 Config1.WR bit functionality Aleksandar Markovic
2018-08-14 18:16 ` [Qemu-devel] [PULL 12/19] target/mips: Don't update BadVAddr register in Debug Mode Aleksandar Markovic
2018-08-14 18:16 ` [Qemu-devel] [PULL 13/19] target/mips: Check ELPA flag only in some cases of MFHC0 and MTHC0 Aleksandar Markovic
2018-08-14 18:16 ` [Qemu-devel] [PULL 14/19] target/mips: Add gen_op_addr_addi() Aleksandar Markovic
2018-08-14 18:16 ` [Qemu-devel] [PULL 15/19] elf: Remove duplicate preprocessor constant definition Aleksandar Markovic
2018-08-14 18:16 ` [Qemu-devel] [PULL 16/19] elf: Add ELF flags for MIPS machine variants Aleksandar Markovic
2018-08-14 18:16 ` [Qemu-devel] [PULL 17/19] linux-user: Update MIPS syscall numbers up to kernel 4.18 headers Aleksandar Markovic
2018-08-14 18:17 ` [Qemu-devel] [PULL 18/19] linux-user: Add preprocessor availability control to some syscalls Aleksandar Markovic
2018-08-14 18:17 ` [Qemu-devel] [PULL 19/19] qemu-doc: Amend MIPS-related items Aleksandar Markovic
2018-08-15 19:20 ` [Qemu-devel] [PULL 00/19] MIPS queue for QEMU upstream, August 14, 2018 Peter Maydell
2018-08-15 19:35   ` [Qemu-devel] ?==?utf-8?q? [PULL?==?utf-8?q? " Aleksandar Markovic
2018-08-15 19:50     ` [Qemu-devel] [PULL " Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1534270621-27332-11-git-send-email-aleksandar.markovic@rt-rk.com \
    --to=aleksandar.markovic@rt-rk.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).