All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>
To: qemu-devel@nongnu.org
Cc: "Jiaxun Yang" <jiaxun.yang@flygoat.com>,
	"Vince Del Vecchio" <Vince.DelVecchio@mediatek.com>,
	"Faraz Shahbazker" <faraz.shahbazker@mediatek.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Milica Lazarevic" <Milica.Lazarevic@Syrmia.com>,
	"James Hilliard" <james.hilliard1@gmail.com>,
	"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>,
	"Aleksandar Rikalo" <arikalo@gmail.com>
Subject: [PATCH 01/19] target/mips: Check for MIPS II when decoding BLEZL/BGTZL
Date: Fri, 13 Nov 2026 17:11:39 +0100	[thread overview]
Message-ID: <20261113161158.25811-2-philmd@oss.qualcomm.com> (raw)
In-Reply-To: <20261113161158.25811-1-philmd@oss.qualcomm.com>

Branch-likely instructions were introduced in MIPS II; on MIPS I
they signal Reserved Instruction. BEQL/BNEL and the REGIMM likely
forms already check ISA_MIPS2, but BLEZL and BGTZL (non-R6) did not.

Fixes: d9224450208e ("target-mips: Tighten ISA level checks")
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
---
 target/mips/tcg/translate.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c
index 10811db827c9..f521e0ec5bd0 100644
--- a/target/mips/tcg/translate.c
+++ b/target/mips/tcg/translate.c
@@ -14621,6 +14621,7 @@ static bool decode_opc_legacy(CPUMIPSState *env, DisasContext *ctx)
             gen_compute_compact_branch(ctx, op, rs, rt, imm << 2);
         } else {
             /* OPC_BLEZL */
+            check_insn(ctx, ISA_MIPS2);
             gen_compute_branch(ctx, op, 4, rs, rt, imm << 2, 4);
         }
         break;
@@ -14634,6 +14635,7 @@ static bool decode_opc_legacy(CPUMIPSState *env, DisasContext *ctx)
             gen_compute_compact_branch(ctx, op, rs, rt, imm << 2);
         } else {
             /* OPC_BGTZL */
+            check_insn(ctx, ISA_MIPS2);
             gen_compute_branch(ctx, op, 4, rs, rt, imm << 2, 4);
         }
         break;
-- 
2.55.0



  reply	other threads:[~2026-11-13 16:12 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 16:11 [PATCH 00/19] target/mips: Mixed bag of fixes Philippe Mathieu-Daudé
2026-11-13 16:11 ` Philippe Mathieu-Daudé [this message]
2026-11-17 18:54   ` [PATCH 01/19] target/mips: Check for MIPS II when decoding BLEZL/BGTZL Richard Henderson
2026-11-13 16:11 ` [PATCH 02/19] target/mips: Require rt == 0 " Philippe Mathieu-Daudé
2026-11-17 18:57   ` Richard Henderson
2026-11-13 16:11 ` [PATCH 03/19] target/mips: Require the MT module for MFTR/MTTR Philippe Mathieu-Daudé
2026-11-17 19:00   ` Richard Henderson
2026-11-17 22:35     ` Philippe Mathieu-Daudé
2026-11-18  0:01       ` Richard Henderson
2026-11-13 16:11 ` [PATCH 04/19] target/mips: Reject the PMON encoding on Release 6 Philippe Mathieu-Daudé
2026-11-17 19:04   ` Richard Henderson
2026-11-13 16:11 ` [PATCH 05/19] target/mips: Enforce alignment and 64-bit CPU for the DSP LX loads Philippe Mathieu-Daudé
2026-11-17 19:05   ` Richard Henderson
2026-11-13 16:11 ` [PATCH 06/19] target/mips: Fix reset into microMIPS mode when Config3.ISA is 3 Philippe Mathieu-Daudé
2026-11-17 19:06   ` Richard Henderson
2026-11-13 16:11 ` [PATCH 07/19] target/mips: Fix microMIPS BC2NEZC POOL32I minor opcode Philippe Mathieu-Daudé
2026-11-17 19:07   ` Richard Henderson
2026-11-13 16:11 ` [PATCH 08/19] target/mips: Fix microMIPS CACHE offset used for ITC tag access Philippe Mathieu-Daudé
2026-11-17 19:08   ` Richard Henderson
2026-11-13 16:11 ` [PATCH 09/19] target/mips: Add the NMS check to the nanoMIPS CACHE instruction Philippe Mathieu-Daudé
2026-11-17 19:12   ` Richard Henderson
2026-11-17 23:07     ` Philippe Mathieu-Daudé
2026-11-13 16:11 ` [PATCH 10/19] target/mips: Fix nanoMIPS BPOSGE32C branch offset sign extension Philippe Mathieu-Daudé
2026-11-17 19:15   ` Richard Henderson
2026-11-13 16:11 ` [PATCH 11/19] target/mips: Pass the right instruction size for nanoMIPS RESTORE.JRC Philippe Mathieu-Daudé
2026-11-17 19:15   ` Richard Henderson
2026-11-13 16:11 ` [PATCH 12/19] target/mips: Fix nanoMIPS BC1EQZC/BC1NEZC always raising RI Philippe Mathieu-Daudé
2026-11-17 19:16   ` Richard Henderson
2026-11-13 16:11 ` [PATCH 13/19] target/mips: Fix nanoMIPS BEQC16/BNEC16 corner cases Philippe Mathieu-Daudé
2026-11-17 19:18   ` Richard Henderson
2026-11-17 22:37     ` Philippe Mathieu-Daudé
2026-11-13 16:11 ` [PATCH 14/19] target/mips: Fix nanoMIPS BLTUC with rs == $zero Philippe Mathieu-Daudé
2026-11-17 19:20   ` Richard Henderson
2026-11-17 22:51     ` Philippe Mathieu-Daudé
2026-11-13 16:11 ` [PATCH 15/19] target/mips: Pass the nanoMIPS BREAK code to generate_exception_break() Philippe Mathieu-Daudé
2026-11-17 19:23   ` Richard Henderson
2026-11-13 16:11 ` [PATCH 16/19] target/mips: Decode 6-bit bit number of nanoMIPS BBEQZC/BBNEZC Philippe Mathieu-Daudé
2026-11-17 19:24   ` Richard Henderson
2026-11-13 16:11 ` [PATCH 17/19] target/mips: Don't set forbidden slot on never-taken nanoMIPS branches Philippe Mathieu-Daudé
2026-11-17 19:26   ` Richard Henderson
2026-11-17 22:59     ` Philippe Mathieu-Daudé
2026-11-13 16:11 ` [PATCH 18/19] target/mips: Do not sign-extend partial LWR results on Octeon Philippe Mathieu-Daudé
2026-11-17 19:29   ` Richard Henderson
2026-11-13 16:11 ` [PATCH 19/19] target/mips: Do not negate NaN results in NMADD.fmt and NMSUB.fmt Philippe Mathieu-Daudé
2026-11-17 19:37   ` Richard Henderson
2026-11-13 16:34 ` [PATCH 00/19] target/mips: Mixed bag of fixes Peter Maydell
2026-11-16  8:37   ` Philippe Mathieu-Daudé
2026-11-16  9:55     ` 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=20261113161158.25811-2-philmd@oss.qualcomm.com \
    --to=philmd@oss.qualcomm.com \
    --cc=Milica.Lazarevic@Syrmia.com \
    --cc=Vince.DelVecchio@mediatek.com \
    --cc=arikalo@gmail.com \
    --cc=aurelien@aurel32.net \
    --cc=faraz.shahbazker@mediatek.com \
    --cc=james.hilliard1@gmail.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.