From nobody Mon Feb 9 19:37:15 2026 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 1546536436543234.5840864660022; Thu, 3 Jan 2019 09:27:16 -0800 (PST) Received: from localhost ([127.0.0.1]:56615 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gf6lw-0000XB-3r for importer@patchew.org; Thu, 03 Jan 2019 12:27:08 -0500 Received: from eggs.gnu.org ([208.118.235.92]:38293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gf6UA-0004Zx-L6 for qemu-devel@nongnu.org; Thu, 03 Jan 2019 12:08:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gf6U7-0007eD-Iz for qemu-devel@nongnu.org; Thu, 03 Jan 2019 12:08:46 -0500 Received: from mx2.rt-rk.com ([89.216.37.149]:46155 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 1gf6U7-0007Oi-4C for qemu-devel@nongnu.org; Thu, 03 Jan 2019 12:08:43 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 1081C1A214A; Thu, 3 Jan 2019 18:08:24 +0100 (CET) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id E49EE1A2154; Thu, 3 Jan 2019 18:08:23 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Thu, 3 Jan 2019 18:07:46 +0100 Message-Id: <1546535297-11040-14-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1546535297-11040-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1546535297-11040-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PULL v3 13/44] target/mips: Support R5900 three-operand MADD1 and MADDU1 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: peter.maydell@linaro.org, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Fredrik Noring The three-operand MADD and MADDU are specific to R5900 cores. Reviewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic Signed-off-by: Fredrik Noring --- target/mips/translate.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/target/mips/translate.c b/target/mips/translate.c index 0a49926..2636e8c 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -5045,7 +5045,7 @@ static void gen_muldiv(DisasContext *ctx, uint32_t op= c, * * and * - * MADD[U] rd, rs, rt + * MADD[U][1] rd, rs, rt * * such that * @@ -5107,6 +5107,9 @@ static void gen_mul_txx9(DisasContext *ctx, uint32_t = opc, tcg_temp_free_i32(t3); } break; + case MMI_OPC_MADD1: + acc =3D 1; + /* Fall through */ case MMI_OPC_MADD: { TCGv_i64 t2 =3D tcg_temp_new_i64(); @@ -5126,6 +5129,9 @@ static void gen_mul_txx9(DisasContext *ctx, uint32_t = opc, tcg_temp_free_i64(t2); } break; + case MMI_OPC_MADDU1: + acc =3D 1; + /* Fall through */ case MMI_OPC_MADDU: { TCGv_i64 t2 =3D tcg_temp_new_i64(); @@ -27370,6 +27376,8 @@ static void decode_mmi(CPUMIPSState *env, DisasCont= ext *ctx) case MMI_OPC_MULTU1: case MMI_OPC_MADD: case MMI_OPC_MADDU: + case MMI_OPC_MADD1: + case MMI_OPC_MADDU1: gen_mul_txx9(ctx, opc, rd, rs, rt); break; case MMI_OPC_DIV1: @@ -27385,8 +27393,6 @@ static void decode_mmi(CPUMIPSState *env, DisasCont= ext *ctx) gen_HILO1_tx79(ctx, opc, rd); break; case MMI_OPC_PLZCW: /* TODO: MMI_OPC_PLZCW */ - case MMI_OPC_MADD1: /* TODO: MMI_OPC_MADD1 */ - case MMI_OPC_MADDU1: /* TODO: MMI_OPC_MADDU1 */ case MMI_OPC_PMFHL: /* TODO: MMI_OPC_PMFHL */ case MMI_OPC_PMTHL: /* TODO: MMI_OPC_PMTHL */ case MMI_OPC_PSLLH: /* TODO: MMI_OPC_PSLLH */ --=20 2.7.4