From nobody Tue Dec 16 08:19:21 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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1540136536565422.86275695598863; Sun, 21 Oct 2018 08:42:16 -0700 (PDT) Received: from localhost ([::1]:59298 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEFrr-0006Hw-CR for importer@patchew.org; Sun, 21 Oct 2018 11:42:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45180) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEFkP-00006d-Qe for qemu-devel@nongnu.org; Sun, 21 Oct 2018 11:34:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEFkL-0001m7-Lt for qemu-devel@nongnu.org; Sun, 21 Oct 2018 11:34:33 -0400 Received: from pio-pvt-msa2.bahnhof.se ([79.136.2.41]:47065) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gEFkK-0001lA-2j for qemu-devel@nongnu.org; Sun, 21 Oct 2018 11:34:29 -0400 Received: from localhost (localhost [127.0.0.1]) by pio-pvt-msa2.bahnhof.se (Postfix) with ESMTP id E69963F3B6; Sun, 21 Oct 2018 17:34:26 +0200 (CEST) Received: from pio-pvt-msa2.bahnhof.se ([127.0.0.1]) by localhost (pio-pvt-msa2.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8-EJqL-k9Dj9; Sun, 21 Oct 2018 17:34:22 +0200 (CEST) Received: from localhost (h-41-252.A163.priv.bahnhof.se [46.59.41.252]) (Authenticated sender: mb547485) by pio-pvt-msa2.bahnhof.se (Postfix) with ESMTPA id 4B9CE3F3AD; Sun, 21 Oct 2018 17:34:22 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at bahnhof.se Date: Sun, 21 Oct 2018 17:34:21 +0200 From: Fredrik Noring To: Aleksandar Markovic , "Maciej W. Rozycki" , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= Message-ID: <31418c845a38988ae49a9e21d5b29bf5c23b1f55.1540134918.git.noring@nocrew.org> 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.41 Subject: [Qemu-devel] [PATCH v8 08/38] target/mips: Define R5900 MMI2 opcode constants 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 , Richard Henderson , qemu-devel@nongnu.org, =?utf-8?Q?J=C3=BCrgen?= Urban , Petar Jovanovic , 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" Signed-off-by: Fredrik Noring --- target/mips/translate.c | 48 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/target/mips/translate.c b/target/mips/translate.c index e233b87324..bd51443ac1 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -2275,6 +2275,54 @@ enum { TX79_MMI1_QFSRV =3D (0x1B << 6) | TX79_MMI_CLASS_MMI1, }; =20 +/* + * TX79 Multimedia Instructions with opcode field =3D MMI and bits 5..0 = =3D MMI2: + * + * 31 26 10 6 5 0 + * +--------+----------------------+--------+--------+ + * | MMI | |function| MMI2 | + * +--------+----------------------+--------+--------+ + * + * function bits 7..6 + * bits | 0 | 1 | 2 | 3 + * 10..8 | 00 | 01 | 10 | 11 + * -------+-------+-------+-------+------- + * 0 000 | PMADDW| * | PSLLVW| PSRLVW + * 1 001 | PMSUBW| * | * | * + * 2 010 | PMFHI | PMFLO | PINTH | * + * 3 011 | PMULTW| PDIVW | PCPYLD| * + * 4 100 | PMADDH| PHMADH| PAND | PXOR + * 5 101 | PMSUBH| PHMSBH| * | * + * 6 110 | * | * | PEXEH | PREVH + * 7 111 | PMULTH| PDIVBW| PEXEW | PROT3W + */ + +#define MASK_TX79_MMI2(op) (MASK_OP_MAJOR(op) | ((op) & 0x7FF)) +enum { + TX79_MMI2_PMADDW =3D (0x00 << 6) | TX79_MMI_CLASS_MMI2, + TX79_MMI2_PSLLVW =3D (0x02 << 6) | TX79_MMI_CLASS_MMI2, + TX79_MMI2_PSRLVW =3D (0x03 << 6) | TX79_MMI_CLASS_MMI2, + TX79_MMI2_PMSUBW =3D (0x04 << 6) | TX79_MMI_CLASS_MMI2, + TX79_MMI2_PMFHI =3D (0x08 << 6) | TX79_MMI_CLASS_MMI2, + TX79_MMI2_PMFLO =3D (0x09 << 6) | TX79_MMI_CLASS_MMI2, + TX79_MMI2_PINTH =3D (0x0A << 6) | TX79_MMI_CLASS_MMI2, + TX79_MMI2_PMULTW =3D (0x0C << 6) | TX79_MMI_CLASS_MMI2, + TX79_MMI2_PDIVW =3D (0x0D << 6) | TX79_MMI_CLASS_MMI2, + TX79_MMI2_PCPYLD =3D (0x0E << 6) | TX79_MMI_CLASS_MMI2, + TX79_MMI2_PMADDH =3D (0x10 << 6) | TX79_MMI_CLASS_MMI2, + TX79_MMI2_PHMADH =3D (0x11 << 6) | TX79_MMI_CLASS_MMI2, + TX79_MMI2_PAND =3D (0x12 << 6) | TX79_MMI_CLASS_MMI2, + TX79_MMI2_PXOR =3D (0x13 << 6) | TX79_MMI_CLASS_MMI2, + TX79_MMI2_PMSUBH =3D (0x14 << 6) | TX79_MMI_CLASS_MMI2, + TX79_MMI2_PHMSBH =3D (0x15 << 6) | TX79_MMI_CLASS_MMI2, + TX79_MMI2_PEXEH =3D (0x1A << 6) | TX79_MMI_CLASS_MMI2, + TX79_MMI2_PREVH =3D (0x1B << 6) | TX79_MMI_CLASS_MMI2, + TX79_MMI2_PMULTH =3D (0x1C << 6) | TX79_MMI_CLASS_MMI2, + TX79_MMI2_PDIVBW =3D (0x1D << 6) | TX79_MMI_CLASS_MMI2, + TX79_MMI2_PEXEW =3D (0x1E << 6) | TX79_MMI_CLASS_MMI2, + TX79_MMI2_PROT3W =3D (0x1F << 6) | TX79_MMI_CLASS_MMI2, +}; + /* global register indices */ static TCGv cpu_gpr[32], cpu_PC; static TCGv cpu_HI[MIPS_DSP_ACC], cpu_LO[MIPS_DSP_ACC]; --=20 2.18.1