From nobody Tue Feb 10 06:58:25 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.48 as permitted sender) client-ip=209.85.128.48; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f48.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.48 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1624613086; cv=none; d=zohomail.com; s=zohoarc; b=O04ZR941dwlYs4IspuoXkKd3w/mrI7x9tJgVpnX+8Rsfq4yoY/LO5YEVwWSzLN0R760QwDJl2925GU3L1/xTHJw9cNavls2wcPNicLuiV5LaiQ3RFJrXnBtOXMLbPml04IP60o6qF30Rffdah/lXVLcgkdL+hR0tnF09Vbo2cS8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1624613086; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=f5DPlzA8O4zttmU/S05Ji9+z4p90zXOhep4QV0U8i+Q=; b=BxGBF72NkCBoxvIzFxnFDm2CsViFLOsjuSgRSHquvHFTYRD03Kbdz3AHy1VXaYfeWBvdgYYeLipfNL5O3zaw1cf8r9adYrI6uZo1WtitF6+s8F1OiNEGxCX7t0YvUO3ZaT26733OGN29dv0I/asT1FWM7L/xh7ToBsgN/u5er84= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.48 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by mx.zohomail.com with SMTPS id 1624613086335962.1394362875644; Fri, 25 Jun 2021 02:24:46 -0700 (PDT) Received: by mail-wm1-f48.google.com with SMTP id o22so4861696wms.0 for ; Fri, 25 Jun 2021 02:24:45 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.. (93.red-83-35-24.dynamicip.rima-tde.net. [83.35.24.93]) by smtp.gmail.com with ESMTPSA id p13sm4081429wrx.30.2021.06.25.02.24.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Jun 2021 02:24:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=f5DPlzA8O4zttmU/S05Ji9+z4p90zXOhep4QV0U8i+Q=; b=Tk0z3vBNKbY1MUy7pIMEXRCKarGDPyJWHXMc6Reit1hMI4oyHCKyVu8410IVfREQKm 2WPq6gMMsBH8BKPn5Wqsnw92SqWOW5GYxVw3RVzZa7McL0QlKL6bqtgJw3eANDho1stR MQ9klNh26wRlkNPUd0QpnLVtfMGsAYvjEVVom2fs4QUeQJl0PEkjD3xUD3xjbCgziBrc 9jUy27A2eDieuFjbNG2TEkKhSTibawnSv7WUoZnAUbhXYjSfNj0EmL4n07rvrf+rik2x vf4AK224MBKJzsWO//Mn+Dx/k9geYi+lq/zRY6DyRzrhp07e4eStTQuMrnI9MD388lFw UC8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=f5DPlzA8O4zttmU/S05Ji9+z4p90zXOhep4QV0U8i+Q=; b=qkBg71L5l30CDG5N6ug9di2+dAwZlPnSy1YD4QhcjLqr7kHS3rY/Em9vI9v1Z4Sq+Y YksFdyJqeNmxkb9QEA53jE30VbLZCI1m80oiAdyoc9kkbEqbyH05mzYoaL0eybPq65ju deKtgwu5FocBRPlKxOUTZX25nqO0sE/wAmfHvBv30a/ceek4wmoXKeQzauZiFl0We22r Ap7JCjtwFVeYwh18nrI7CCmXiLlIlK28L6eUhEH3+4X/WWoa1l7iXjF1VzFK596qH15I ryRUJl8VM6svmBZu5vWtTr3ML21DqjAhRHucjt5+3j5ThmUVVAuLXoQ2uYZD+lzbYMTA 5mCA== X-Gm-Message-State: AOAM530riBpr0Kg6GyrD7aUlOu9YiFjpSv+hDcycQ4unasimwxc15dwf WTkzHBiCWNn02sDMuyRoZGqKRuHj9m2qAQ== X-Google-Smtp-Source: ABdhPJy4K3gWHKlDU0BzLDvtBe1wxiVdqepUw1QIaqk51e2jEQILPmw6WHU/KWTZipqGkTEEVr5DGw== X-Received: by 2002:a1c:9a8b:: with SMTP id c133mr9650720wme.65.1624613084630; Fri, 25 Jun 2021 02:24:44 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Rikalo , Jiaxun Yang , Aurelien Jarno , Richard Henderson Subject: [PULL 15/15] target/mips: Merge msa32/msa64 decodetree definitions Date: Fri, 25 Jun 2021 11:23:29 +0200 Message-Id: <20210625092329.1529100-16-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210625092329.1529100-1-f4bug@amsat.org> References: <20210625092329.1529100-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) We don't need to maintain 2 sets of decodetree definitions. Merge them into a single file. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20210617174636.2902654-3-f4bug@amsat.org> --- target/mips/tcg/{msa32.decode =3D> msa.decode} | 8 +++++--- target/mips/tcg/msa64.decode | 17 ----------------- target/mips/tcg/msa_translate.c | 14 ++++---------- target/mips/tcg/meson.build | 3 +-- 4 files changed, 10 insertions(+), 32 deletions(-) rename target/mips/tcg/{msa32.decode =3D> msa.decode} (74%) delete mode 100644 target/mips/tcg/msa64.decode diff --git a/target/mips/tcg/msa32.decode b/target/mips/tcg/msa.decode similarity index 74% rename from target/mips/tcg/msa32.decode rename to target/mips/tcg/msa.decode index ca200e373b1..bf132e36b9b 100644 --- a/target/mips/tcg/msa32.decode +++ b/target/mips/tcg/msa.decode @@ -6,9 +6,10 @@ # # Reference: # MIPS Architecture for Programmers Volume IV-j -# The MIPS32 SIMD Architecture Module, Revision 1.12 -# (Document Number: MD00866-2B-MSA32-AFP-01.12) -# +# - The MIPS32 SIMD Architecture Module, Revision 1.12 +# (Document Number: MD00866-2B-MSA32-AFP-01.12) +# - The MIPS64 SIMD Architecture Module, Revision 1.12 +# (Document Number: MD00868-1D-MSA64-AFP-01.12) =20 &rtype rs rt rd sa =20 @@ -19,6 +20,7 @@ @bz_df ...... ... df:2 wt:5 s16:16 &msa_bz =20 LSA 000000 ..... ..... ..... 000 .. 000101 @lsa +DLSA 000000 ..... ..... ..... 000 .. 010101 @lsa =20 BZ_V 010001 01011 ..... ................ @bz BNZ_V 010001 01111 ..... ................ @bz diff --git a/target/mips/tcg/msa64.decode b/target/mips/tcg/msa64.decode deleted file mode 100644 index d2442474d0b..00000000000 --- a/target/mips/tcg/msa64.decode +++ /dev/null @@ -1,17 +0,0 @@ -# MIPS SIMD Architecture Module instruction set -# -# Copyright (C) 2020 Philippe Mathieu-Daud=C3=A9 -# -# SPDX-License-Identifier: LGPL-2.1-or-later -# -# Reference: -# MIPS Architecture for Programmers Volume IV-j -# The MIPS64 SIMD Architecture Module, Revision 1.12 -# (Document Number: MD00868-1D-MSA64-AFP-01.12) -# - -&rtype rs rt rd sa !extern - -@lsa ...... rs:5 rt:5 rd:5 ... sa:2 ...... &rtype - -DLSA 000000 ..... ..... ..... 000 .. 010101 @lsa diff --git a/target/mips/tcg/msa_translate.c b/target/mips/tcg/msa_translat= e.c index 9df4497c886..eed2eca6c92 100644 --- a/target/mips/tcg/msa_translate.c +++ b/target/mips/tcg/msa_translate.c @@ -18,8 +18,7 @@ #include "internal.h" =20 /* Include the auto-generated decoder. */ -#include "decode-msa32.c.inc" -#include "decode-msa64.c.inc" +#include "decode-msa.c.inc" =20 #define OPC_MSA (0x1E << 26) =20 @@ -2269,13 +2268,8 @@ static bool trans_LSA(DisasContext *ctx, arg_rtype *= a) =20 static bool trans_DLSA(DisasContext *ctx, arg_rtype *a) { + if (TARGET_LONG_BITS !=3D 64) { + return false; + } return gen_dlsa(ctx, a->rd, a->rt, a->rs, a->sa); } - -bool decode_ase_msa(DisasContext *ctx, uint32_t insn) -{ - if (TARGET_LONG_BITS =3D=3D 64 && decode_msa64(ctx, insn)) { - return true; - } - return decode_msa32(ctx, insn); -} diff --git a/target/mips/tcg/meson.build b/target/mips/tcg/meson.build index 5d8acbaf0d3..bf4001e5741 100644 --- a/target/mips/tcg/meson.build +++ b/target/mips/tcg/meson.build @@ -1,8 +1,7 @@ gen =3D [ decodetree.process('mips32r6.decode', extra_args: '--static-decode=3Ddec= ode_mips32r6'), decodetree.process('mips64r6.decode', extra_args: '--static-decode=3Ddec= ode_mips64r6'), - decodetree.process('msa32.decode', extra_args: '--static-decode=3Ddecode= _msa32'), - decodetree.process('msa64.decode', extra_args: '--static-decode=3Ddecode= _msa64'), + decodetree.process('msa.decode', extra_args: '--decode=3Ddecode_ase_msa'= ), decodetree.process('tx79.decode', extra_args: '--static-decode=3Ddecode_= tx79'), ] =20 --=20 2.31.1