From nobody Thu Nov 6 08:26:15 2025 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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1540209654724657.8228767066506; Mon, 22 Oct 2018 05:00:54 -0700 (PDT) Received: from localhost ([::1]:34419 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEYt0-0003yU-7G for importer@patchew.org; Mon, 22 Oct 2018 08:00:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEYr3-0002pD-4D for qemu-devel@nongnu.org; Mon, 22 Oct 2018 07:58:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEYqy-0006CX-Uw for qemu-devel@nongnu.org; Mon, 22 Oct 2018 07:58:40 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:43858 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gEYqy-0005SP-Lz for qemu-devel@nongnu.org; Mon, 22 Oct 2018 07:58:36 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id AA3441A2249; Mon, 22 Oct 2018 13:57:34 +0200 (CEST) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id 728061A20D4; Mon, 22 Oct 2018 13:57:34 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Mon, 22 Oct 2018 13:57:24 +0200 Message-Id: <1540209445-28831-2-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1540209445-28831-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1540209445-28831-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PATCH 1/2] target/mips: Fix the title of translate.c 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: smarkovic@wavecomp.com, pjovanovic@wavecomp.com, amarkovic@wavecomp.com, aurelien@aurel32.net 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 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Aleksandar Markovic Replace MIPS32 with MIPS, since the file covers all generations of MIPS architectures. Signed-off-by: Aleksandar Markovic Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Stefan Markovic --- target/mips/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/mips/translate.c b/target/mips/translate.c index 74ef160..1afb105 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -1,5 +1,5 @@ /* - * MIPS32 emulation for qemu: main translation routines. + * MIPS emulation for QEMU: main translation routines. * * Copyright (c) 2004-2005 Jocelyn Mayer * Copyright (c) 2006 Marius Groeger (FPU operations) --=20 2.7.4 From nobody Thu Nov 6 08:26:15 2025 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) 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=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1540209651020136.99983288736018; Mon, 22 Oct 2018 05:00:51 -0700 (PDT) Received: from localhost ([::1]:34418 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEYsw-0003wJ-SG for importer@patchew.org; Mon, 22 Oct 2018 08:00:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEYr3-0002pE-4B for qemu-devel@nongnu.org; Mon, 22 Oct 2018 07:58:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEYqz-0006Cx-Vy for qemu-devel@nongnu.org; Mon, 22 Oct 2018 07:58:40 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:43879 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gEYqz-0005Sy-KU for qemu-devel@nongnu.org; Mon, 22 Oct 2018 07:58:37 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id B11E11A226B; Mon, 22 Oct 2018 13:57:35 +0200 (CEST) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id 82F031A20D4; Mon, 22 Oct 2018 13:57:35 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Mon, 22 Oct 2018 13:57:25 +0200 Message-Id: <1540209445-28831-3-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1540209445-28831-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1540209445-28831-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PATCH 2/2] target/mips: Fix decoding of ALIGN and DALIGN instructions 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: smarkovic@wavecomp.com, pjovanovic@wavecomp.com, amarkovic@wavecomp.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_6 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Aleksandar Markovic Opcode for ALIGN and DALIGN must be in fact ranges of opcodes, to allow paremeter 'bp' to occupy two and three bits, respectively. Signed-off-by: Aleksandar Markovic Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Stefan Markovic --- target/mips/translate.c | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/target/mips/translate.c b/target/mips/translate.c index 1afb105..e5db92e 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -463,8 +463,10 @@ enum { OPC_WSBH =3D (0x02 << 6) | OPC_BSHFL, OPC_SEB =3D (0x10 << 6) | OPC_BSHFL, OPC_SEH =3D (0x18 << 6) | OPC_BSHFL, - OPC_ALIGN =3D (0x08 << 6) | OPC_BSHFL, /* 010.bp */ - OPC_ALIGN_END =3D (0x0B << 6) | OPC_BSHFL, /* 010.00 to 010.11 */ + OPC_ALIGN =3D (0x08 << 6) | OPC_BSHFL, /* 010.bp (010.00 to 010.11= ) */ + OPC_ALIGN_1 =3D (0x09 << 6) | OPC_BSHFL, + OPC_ALIGN_2 =3D (0x0A << 6) | OPC_BSHFL, + OPC_ALIGN_3 =3D (0x0B << 6) | OPC_BSHFL, OPC_BITSWAP =3D (0x00 << 6) | OPC_BSHFL /* 00000 */ }; =20 @@ -474,8 +476,14 @@ enum { enum { OPC_DSBH =3D (0x02 << 6) | OPC_DBSHFL, OPC_DSHD =3D (0x05 << 6) | OPC_DBSHFL, - OPC_DALIGN =3D (0x08 << 6) | OPC_DBSHFL, /* 01.bp */ - OPC_DALIGN_END =3D (0x0F << 6) | OPC_DBSHFL, /* 01.000 to 01.111 */ + OPC_DALIGN =3D (0x08 << 6) | OPC_DBSHFL, /* 01.bp (01.000 to 01.11= 1) */ + OPC_DALIGN_1 =3D (0x09 << 6) | OPC_DBSHFL, + OPC_DALIGN_2 =3D (0x0A << 6) | OPC_DBSHFL, + OPC_DALIGN_3 =3D (0x0B << 6) | OPC_DBSHFL, + OPC_DALIGN_4 =3D (0x0C << 6) | OPC_DBSHFL, + OPC_DALIGN_5 =3D (0x0D << 6) | OPC_DBSHFL, + OPC_DALIGN_6 =3D (0x0E << 6) | OPC_DBSHFL, + OPC_DALIGN_7 =3D (0x0F << 6) | OPC_DBSHFL, OPC_DBITSWAP =3D (0x00 << 6) | OPC_DBSHFL, /* 00000 */ }; =20 @@ -23957,7 +23965,9 @@ static void decode_opc_special3_r6(CPUMIPSState *en= v, DisasContext *ctx) op2 =3D MASK_BSHFL(ctx->opcode); switch (op2) { case OPC_ALIGN: - case OPC_ALIGN_END: + case OPC_ALIGN_1: + case OPC_ALIGN_2: + case OPC_ALIGN_3: gen_align(ctx, 32, rd, rs, rt, sa & 3); break; case OPC_BITSWAP: @@ -23983,7 +23993,13 @@ static void decode_opc_special3_r6(CPUMIPSState *e= nv, DisasContext *ctx) op2 =3D MASK_DBSHFL(ctx->opcode); switch (op2) { case OPC_DALIGN: - case OPC_DALIGN_END: + case OPC_DALIGN_1: + case OPC_DALIGN_2: + case OPC_DALIGN_3: + case OPC_DALIGN_4: + case OPC_DALIGN_5: + case OPC_DALIGN_6: + case OPC_DALIGN_7: gen_align(ctx, 64, rd, rs, rt, sa & 7); break; case OPC_DBITSWAP: @@ -24843,7 +24859,9 @@ static void decode_opc_special3(CPUMIPSState *env, = DisasContext *ctx) op2 =3D MASK_BSHFL(ctx->opcode); switch (op2) { case OPC_ALIGN: - case OPC_ALIGN_END: + case OPC_ALIGN_1: + case OPC_ALIGN_2: + case OPC_ALIGN_3: case OPC_BITSWAP: check_insn(ctx, ISA_MIPS32R6); decode_opc_special3_r6(env, ctx); @@ -24869,7 +24887,13 @@ static void decode_opc_special3(CPUMIPSState *env,= DisasContext *ctx) op2 =3D MASK_DBSHFL(ctx->opcode); switch (op2) { case OPC_DALIGN: - case OPC_DALIGN_END: + case OPC_DALIGN_1: + case OPC_DALIGN_2: + case OPC_DALIGN_3: + case OPC_DALIGN_4: + case OPC_DALIGN_5: + case OPC_DALIGN_6: + case OPC_DALIGN_7: case OPC_DBITSWAP: check_insn(ctx, ISA_MIPS32R6); decode_opc_special3_r6(env, ctx); --=20 2.7.4