From nobody Fri Nov 7 04:23:06 2025 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=listsout.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 listsout.gnu.org (listsout.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1545822609809933.7157841866484; Wed, 26 Dec 2018 03:10:09 -0800 (PST) Received: from localhost ([127.0.0.1]:45507 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gc74e-0001H0-Us for importer@patchew.org; Wed, 26 Dec 2018 06:10:04 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gc72S-0007v0-5i for qemu-devel@nongnu.org; Wed, 26 Dec 2018 06:07:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gc72Q-0001nW-Bj for qemu-devel@nongnu.org; Wed, 26 Dec 2018 06:07:48 -0500 Received: from mx2.rt-rk.com ([89.216.37.149]:54633 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 1gc72Q-0001n2-0k for qemu-devel@nongnu.org; Wed, 26 Dec 2018 06:07:46 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 1893F1A1DE1; Wed, 26 Dec 2018 12:07:00 +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 EDE0E1A1D3B; Wed, 26 Dec 2018 12:06:59 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Wed, 26 Dec 2018 12:06:19 +0100 Message-Id: <1545822388-10911-12-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1545822388-10911-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1545822388-10911-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] [PATCH v5 11/20] disas: nanoMIPS: Clean up handling of 48-bit 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, amarkovic@wavecomp.com, aurelien@aurel32.net 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: Aleksandar Markovic Clean up handling of 48-bit nanoMIPS instructions: - ADDIU[48] - ADDIU[GP48] - ADDIUPC[48] - LI[48] - LWPC[48] - SWPC[48] Signed-off-by: Aleksandar Markovic --- disas/nanomips.cpp | 70 ++++++++++++++++++++++++++++----------------------= ---- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/disas/nanomips.cpp b/disas/nanomips.cpp index e7f6975..72e2266 100644 --- a/disas/nanomips.cpp +++ b/disas/nanomips.cpp @@ -1812,13 +1812,14 @@ std::string NMD::ADDIU_32_(uint64 instruction) =20 =20 /* + * ADDIU[48] rt, imm - Add Immediate (Untrapped) (rs =3D rt) * - * - * 3 2 1 - * 10987654321098765432109876543210 - * 001000 0010000100111111 + * 4 3 2 1 + * 765432109876543210987654321098765432109876543210 + * 011000 00001 * rt ----- - * rs ----- + * s[15:0] ---------------- + * s[31:16] ---------------- */ std::string NMD::ADDIU_48_(uint64 instruction) { @@ -1833,13 +1834,14 @@ std::string NMD::ADDIU_48_(uint64 instruction) =20 =20 /* + * ADDIU[GP48] rt, imm - Add Immediate (Untrapped) (rs =3D 28) * - * - * 3 2 1 - * 10987654321098765432109876543210 - * 001000 0010000100111111 + * 4 3 2 1 + * 765432109876543210987654321098765432109876543210 + * 011000 00010 * rt ----- - * rs ----- + * s[15:0] ---------------- + * s[31:16] ---------------- */ std::string NMD::ADDIU_GP48_(uint64 instruction) { @@ -2005,14 +2007,14 @@ std::string NMD::ADDIUPC_32_(uint64 instruction) =20 =20 /* + * ADDIUPC[48] rt, imm - Add Immediate (Untrapped) to PC * - * - * 3 2 1 - * 10987654321098765432109876543210 - * 001000 x1110000101 + * 4 3 2 1 + * 765432109876543210987654321098765432109876543210 + * 011000 00011 * rt ----- - * rs ----- - * rd ----- + * s[15:0] ---------------- + * s[31:16] ---------------- */ std::string NMD::ADDIUPC_48_(uint64 instruction) { @@ -8712,14 +8714,14 @@ std::string NMD::LI_16_(uint64 instruction) =20 =20 /* + * LI[48] rt, s - Load Immediate * - * - * 3 2 1 - * 10987654321098765432109876543210 - * 001000 x1110000101 + * 4 3 2 1 + * 765432109876543210987654321098765432109876543210 + * 011000 00000 * rt ----- - * rs ----- - * rd ----- + * s[15:0] ---------------- + * s[31:16] ---------------- */ std::string NMD::LI_48_(uint64 instruction) { @@ -9280,14 +9282,14 @@ std::string NMD::LWM(uint64 instruction) =20 =20 /* + * LWPC[48] rt, address - Load Word PC relative * - * - * 3 2 1 - * 10987654321098765432109876543210 - * 001000 x1110000101 + * 4 3 2 1 + * 765432109876543210987654321098765432109876543210 + * 011000 01011 * rt ----- - * rs ----- - * rd ----- + * s[15:0] ---------------- + * s[31:16] ---------------- */ std::string NMD::LWPC_48_(uint64 instruction) { @@ -15496,14 +15498,14 @@ std::string NMD::SWM(uint64 instruction) =20 =20 /* - * ADDQH_R.W rd, rt, rs - Add Fractional Words And Shift Right to Halve Re= sults + * SWPC[48] rt, address - Load Word PC relative * - * 3 2 1 - * 10987654321098765432109876543210 - * 001000 00010001101 + * 4 3 2 1 + * 765432109876543210987654321098765432109876543210 + * 011000 01111 * rt ----- - * rs ----- - * rd ----- + * s[15:0] ---------------- + * s[31:16] ---------------- */ std::string NMD::SWPC_48_(uint64 instruction) { --=20 2.7.4