From nobody Mon Apr 29 13:13:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1501508283129276.13837559974047; Mon, 31 Jul 2017 06:38:03 -0700 (PDT) Received: from localhost ([::1]:59621 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcAtV-0007TF-2b for importer@patchew.org; Mon, 31 Jul 2017 09:38:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48734) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcAsi-0007B1-4c for qemu-devel@nongnu.org; Mon, 31 Jul 2017 09:37:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcAse-0006Kn-WD for qemu-devel@nongnu.org; Mon, 31 Jul 2017 09:37:12 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:7206) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcAse-0006Ig-QV for qemu-devel@nongnu.org; Mon, 31 Jul 2017 09:37:08 -0400 Received: from HHMAIL01.hh.imgtec.org (unknown [10.100.10.19]) by Forcepoint Email with ESMTPS id 4A331562A4AEF; Mon, 31 Jul 2017 14:37:03 +0100 (IST) Received: from jhogan-linux.le.imgtec.org (192.168.154.110) by HHMAIL01.hh.imgtec.org (10.100.10.21) with Microsoft SMTP Server (TLS) id 14.3.294.0; Mon, 31 Jul 2017 14:37:06 +0100 From: James Hogan To: Date: Mon, 31 Jul 2017 14:36:45 +0100 Message-ID: <1b88a351b0c447a2a4045a7d6979f62b4af96604.1501508116.git-series.james.hogan@imgtec.com> X-Mailer: git-send-email 2.13.2 MIME-Version: 1.0 X-Originating-IP: [192.168.154.110] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 195.59.15.196 Subject: [Qemu-devel] [PATCH] target-mips: Don't stop on [d]mtc0 DESAVE/KScratch X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yongbok Kim , James Hogan , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Writing to the MIPS DESAVE register (and now the KScratch registers) will stop translation, supposedly due to risk of execution mode switches. However these registers are basically RW scratch registers with no side effects so there is no risk of them triggering execution mode changes. Drop the bstate =3D BS_STOP for these registers for both mtc0 and dmtc0. Fixes: 7a387fffce50 ("Add MIPS32R2 instructions, and generally straighten o= ut the instruction decoding. This is also the first percent towards MIPS64 = support.") Signed-off-by: James Hogan Cc: Aurelien Jarno Cc: Yongbok Kim --- Changes in v2: - Resend based on v2.10.0-rc0 --- target/mips/translate.c | 4 ---- 1 file changed, 0 insertions(+), 4 deletions(-) diff --git a/target/mips/translate.c b/target/mips/translate.c index 51626aead32c..0bca700fb380 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -6386,8 +6386,6 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int= reg, int sel) default: goto cp0_unimplemented; } - /* Stop translation as we may have switched the execution mode */ - ctx->bstate =3D BS_STOP; break; default: goto cp0_unimplemented; @@ -7714,8 +7712,6 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, in= t reg, int sel) default: goto cp0_unimplemented; } - /* Stop translation as we may have switched the execution mode */ - ctx->bstate =3D BS_STOP; break; default: goto cp0_unimplemented; --=20 git-series 0.8.10