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 1540136155779455.7555314581681; Sun, 21 Oct 2018 08:35:55 -0700 (PDT) Received: from localhost ([::1]:59264 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEFle-0000Vl-9t for importer@patchew.org; Sun, 21 Oct 2018 11:35:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45020) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEFjX-0007wL-Ls for qemu-devel@nongnu.org; Sun, 21 Oct 2018 11:33:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEFjU-0001St-Hr for qemu-devel@nongnu.org; Sun, 21 Oct 2018 11:33:39 -0400 Received: from pio-pvt-msa1.bahnhof.se ([79.136.2.40]:34903) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gEFjU-0001Pf-4v for qemu-devel@nongnu.org; Sun, 21 Oct 2018 11:33:36 -0400 Received: from localhost (localhost [127.0.0.1]) by pio-pvt-msa1.bahnhof.se (Postfix) with ESMTP id 0FB103F360; Sun, 21 Oct 2018 17:33:34 +0200 (CEST) Received: from pio-pvt-msa1.bahnhof.se ([127.0.0.1]) by localhost (pio-pvt-msa1.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25JMVNQqyBQs; Sun, 21 Oct 2018 17:33:33 +0200 (CEST) Received: from localhost (h-41-252.A163.priv.bahnhof.se [46.59.41.252]) (Authenticated sender: mb547485) by pio-pvt-msa1.bahnhof.se (Postfix) with ESMTPA id 0C76C3F32B; Sun, 21 Oct 2018 17:33:32 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at bahnhof.se Date: Sun, 21 Oct 2018 17:33:32 +0200 From: Fredrik Noring To: Aleksandar Markovic , "Maciej W. Rozycki" , 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.40 Subject: [Qemu-devel] [PATCH v8 05/38] target/mips: Define R5900 MMI{0, 1, 2, 3} subclasses and MMI 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 | 51 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/target/mips/translate.c b/target/mips/translate.c index e205c3eaef..ae988177a1 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -2129,6 +2129,57 @@ enum { TX79_SQ =3D 0x1F << 26, /* Same as OPC_SPECIAL3 */ }; =20 +/* + * TX79 Multimedia Instructions with opcode field =3D MMI: + * + * 31 26 5 0 + * +--------+-------------------------------+--------+ + * | MMI | |function| + * +--------+-------------------------------+--------+ + * + * function bits 2..0 + * bits | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 + * 5..3 | 000 | 001 | 010 | 011 | 100 | 101 | 110 | 111 + * -------+-------+-------+-------+-------+-------+-------+-------+-----= -- + * 0 000 | MADD | MADDU | * | * | PLZCW | * | * | * + * 1 001 | MMI0% | MMI2% | * | * | * | * | * | * + * 2 010 | MFHI1 | MTHI1 | MFLO1 | MTLO1 | * | * | * | * + * 3 011 | MULT1 | MULTU1| DIV1 | DIVU1 | * | * | * | * + * 4 100 | MADD1 | MADDU1| * | * | * | * | * | * + * 5 101 | MMI1% | MMI3% | * | * | * | * | * | * + * 6 110 | PMFHL | PMTHL | * | * | PSLLH | * | PSRLH | PSRAH + * 7 111 | * | * | * | * | PSLLW | * | PSRLW | PSRAW + */ + +#define MASK_TX79_MMI(op) (MASK_OP_MAJOR(op) | ((op) & 0x3F)) +enum { + TX79_MMI_MADD =3D 0x00 | TX79_CLASS_MMI, /* Same as OPC_MADD */ + TX79_MMI_MADDU =3D 0x01 | TX79_CLASS_MMI, /* Same as OPC_MADDU */ + TX79_MMI_PLZCW =3D 0x04 | TX79_CLASS_MMI, + TX79_MMI_CLASS_MMI0 =3D 0x08 | TX79_CLASS_MMI, + TX79_MMI_CLASS_MMI2 =3D 0x09 | TX79_CLASS_MMI, + TX79_MMI_MFHI1 =3D 0x10 | TX79_CLASS_MMI, /* Same minor as OPC_MF= HI */ + TX79_MMI_MTHI1 =3D 0x11 | TX79_CLASS_MMI, /* Same minor as OPC_MT= HI */ + TX79_MMI_MFLO1 =3D 0x12 | TX79_CLASS_MMI, /* Same minor as OPC_MF= LO */ + TX79_MMI_MTLO1 =3D 0x13 | TX79_CLASS_MMI, /* Same minor as OPC_MT= LO */ + TX79_MMI_MULT1 =3D 0x18 | TX79_CLASS_MMI, /* Same minor as OPC_MU= LT */ + TX79_MMI_MULTU1 =3D 0x19 | TX79_CLASS_MMI, /* Same minor as OPC_MU= LTU */ + TX79_MMI_DIV1 =3D 0x1A | TX79_CLASS_MMI, /* Same minor as OPC_DI= V */ + TX79_MMI_DIVU1 =3D 0x1B | TX79_CLASS_MMI, /* Same minor as OPC_DI= VU */ + TX79_MMI_MADD1 =3D 0x20 | TX79_CLASS_MMI, + TX79_MMI_MADDU1 =3D 0x21 | TX79_CLASS_MMI, + TX79_MMI_CLASS_MMI1 =3D 0x28 | TX79_CLASS_MMI, + TX79_MMI_CLASS_MMI3 =3D 0x29 | TX79_CLASS_MMI, + TX79_MMI_PMFHL =3D 0x30 | TX79_CLASS_MMI, + TX79_MMI_PMTHL =3D 0x31 | TX79_CLASS_MMI, + TX79_MMI_PSLLH =3D 0x34 | TX79_CLASS_MMI, + TX79_MMI_PSRLH =3D 0x36 | TX79_CLASS_MMI, + TX79_MMI_PSRAH =3D 0x37 | TX79_CLASS_MMI, + TX79_MMI_PSLLW =3D 0x3C | TX79_CLASS_MMI, + TX79_MMI_PSRLW =3D 0x3E | TX79_CLASS_MMI, + TX79_MMI_PSRAW =3D 0x3F | TX79_CLASS_MMI, +}; + /* 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