From nobody Mon Feb 9 19:11:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1547406328262347.6474990793316; Sun, 13 Jan 2019 11:05:28 -0800 (PST) Received: from localhost ([127.0.0.1]:39317 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gil4Y-0004bN-UJ for importer@patchew.org; Sun, 13 Jan 2019 14:05:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gil3H-0003zG-FK for qemu-devel@nongnu.org; Sun, 13 Jan 2019 14:04:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gil3G-0004IT-7L for qemu-devel@nongnu.org; Sun, 13 Jan 2019 14:04:07 -0500 Received: from pio-pvt-msa3.bahnhof.se ([79.136.2.42]:38768) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gil3G-0004I0-0z for qemu-devel@nongnu.org; Sun, 13 Jan 2019 14:04:06 -0500 Received: from localhost (localhost [127.0.0.1]) by pio-pvt-msa3.bahnhof.se (Postfix) with ESMTP id 032BA3F31A; Sun, 13 Jan 2019 20:04:05 +0100 (CET) Received: from pio-pvt-msa3.bahnhof.se ([127.0.0.1]) by localhost (pio-pvt-msa3.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Vex27hDSfdb5; Sun, 13 Jan 2019 20:04:04 +0100 (CET) Received: from localhost (h-41-252.A163.priv.bahnhof.se [46.59.41.252]) (Authenticated sender: mb547485) by pio-pvt-msa3.bahnhof.se (Postfix) with ESMTPA id 808F53F4C5; Sun, 13 Jan 2019 20:03:59 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at bahnhof.se Date: Sun, 13 Jan 2019 20:03:59 +0100 From: Fredrik Noring To: Aleksandar Markovic , Aurelien Jarno , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 79.136.2.42 Subject: [Qemu-devel] [PATCH 3/9] target/mips: Support the R5900 PCPYLD multimedia instruction 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: =?utf-8?Q?J=C3=BCrgen?= Urban , qemu-devel@nongnu.org, "Maciej W. Rozycki" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Signed-off-by: Fredrik Noring Reviewed-by: Aleksandar Markovic --- target/mips/translate.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/target/mips/translate.c b/target/mips/translate.c index 9d5150ec8b..40faf9cb36 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -27293,11 +27293,34 @@ static void decode_mmi1(CPUMIPSState *env, DisasC= ontext *ctx) } } =20 +static void gen_mmi_pcpyld(DisasContext *ctx, int rd, int rs, int rt) +{ + if (rd !=3D 0) { + if (rs !=3D 0) { + tcg_gen_mov_i64(cpu_mmr[rd], cpu_gpr[rs]); + } else { + tcg_gen_movi_i64(cpu_mmr[rd], 0); + } + + if (rt !=3D 0) { + tcg_gen_mov_i64(cpu_gpr[rd], cpu_gpr[rt]); + } else { + tcg_gen_movi_i64(cpu_gpr[rd], 0); + } + } +} + static void decode_mmi2(CPUMIPSState *env, DisasContext *ctx) { uint32_t opc =3D MASK_MMI2(ctx->opcode); + int rs =3D extract32(ctx->opcode, 21, 5); + int rt =3D extract32(ctx->opcode, 16, 5); + int rd =3D extract32(ctx->opcode, 11, 5); =20 switch (opc) { + case MMI_OPC_2_PCPYLD: + gen_mmi_pcpyld(ctx, rd, rs, rt); + break; case MMI_OPC_2_PMADDW: /* TODO: MMI_OPC_2_PMADDW */ case MMI_OPC_2_PSLLVW: /* TODO: MMI_OPC_2_PSLLVW */ case MMI_OPC_2_PSRLVW: /* TODO: MMI_OPC_2_PSRLVW */ @@ -27307,7 +27330,6 @@ static void decode_mmi2(CPUMIPSState *env, DisasCon= text *ctx) case MMI_OPC_2_PINTH: /* TODO: MMI_OPC_2_PINTH */ case MMI_OPC_2_PMULTW: /* TODO: MMI_OPC_2_PMULTW */ case MMI_OPC_2_PDIVW: /* TODO: MMI_OPC_2_PDIVW */ - case MMI_OPC_2_PCPYLD: /* TODO: MMI_OPC_2_PCPYLD */ case MMI_OPC_2_PMADDH: /* TODO: MMI_OPC_2_PMADDH */ case MMI_OPC_2_PHMADH: /* TODO: MMI_OPC_2_PHMADH */ case MMI_OPC_2_PAND: /* TODO: MMI_OPC_2_PAND */ --=20 2.19.2