From nobody Tue Feb 10 05:41:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.42 as permitted sender) client-ip=209.85.128.42; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f42.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.42 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1627861340; cv=none; d=zohomail.com; s=zohoarc; b=kOTj5s5qq7OItR8MdTTafo16HsPz6OTwewwkS5oI4rHBM3J1LlbqPvNk8mHI5L98AYDU4pexQazkuk3u6b1Su96pdpG6T+9L9fxdANQdXE21+JK0MSiNzzKaNAwykoXmCQWQfp1BVPrmCYW3tHT5K7f7XxzxSqjnadf3zD8ZR50= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1627861340; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=MEexVZpOmMQGQKbdMdmdE8d8zbgl8YhKPkuKPBINUxU=; b=e/maaIO1RhxAhxnry6E+/JHe7HBnwD2hB/kSLrDW14MwLY1Vg90S1ikknVhJRNP0EE6xVBWsVuLUZ6MX5gqUYH/oQHT6m3oO78LueDIwrnBRGCwprYTuDs5BIfpJcb1SqNOvTdbibG20gob37PXLfFbgTqN/yAIdS3LWV9YssSY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.42 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mx.zohomail.com with SMTPS id 1627861340145607.4864112214694; Sun, 1 Aug 2021 16:42:20 -0700 (PDT) Received: by mail-wm1-f42.google.com with SMTP id n28-20020a05600c3b9cb02902552e60df56so9910184wms.0 for ; Sun, 01 Aug 2021 16:42:19 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.. (163.red-83-52-55.dynamicip.rima-tde.net. [83.52.55.163]) by smtp.gmail.com with ESMTPSA id t8sm9755115wmj.5.2021.08.01.16.42.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Aug 2021 16:42:17 -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=MEexVZpOmMQGQKbdMdmdE8d8zbgl8YhKPkuKPBINUxU=; b=XKBjKUtJ9i1o6TdDS1uCHWl49NustW8bcFRQ1Pt1Pkmbv2e8TsAe9IbadtHSn78DbS V+RzLczrrmyJLwlwQGmCwS0mU21wUgTkawA+K5u8UUOFKBWGLp6V35HaPCt5pNrOr/up jM4lvsLPZxDf7CK0vus6cGOgdOLGSeBFGbg+cv2v3vwOmR4cc31agmdMfsjnMbU5beze a/+HNLuahczJ6QP6z9+X/rKOusDrit8c3u3EO/VI9uxpUCWD6GTaBi9ij/YlawGK+k8q gYGAFe1yik4f7QK7HlD9j+RowDAdhMwIOZLR3V+RPD5ZFcHej/djxy/Ed/XcPU0Keq3h riCA== 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=MEexVZpOmMQGQKbdMdmdE8d8zbgl8YhKPkuKPBINUxU=; b=C21gYPXlNuX/A54pB1mkDaKySWd/xS2Y3a+R7UaifUwq/0a4T/CZ+Ode1HANTEp8fi +nGqh5UEhagrA87qIkDc/foZmSvj+CgTLhPsA+ZPM4936diuzuOF2DgV/ekzkGXS0QYG KAVnNTdaK71ypLoqXtJjOdO6Z4Ygx2j9faUDOy4EYmATKox9/tvWHgrNmmfBYTk47wm/ GFpHURca3oVMlRE7UnW2wDfGLLBI/qfE3fpWmYVovCPE/A3ACM5vJcQUGW+lPdvQUJSk pIWrXrcGWFrXylCkZ7Zv1Q+DbBG66/Wq8BIlG2Qu+2YRgbMV8RwFLYgpx7rgDVQUmK2/ ZiCQ== X-Gm-Message-State: AOAM5321UG7MgfuyljWoNKF+UP4eojJW1OjVicqYk43LwKzqnS4j9PKa 0TYEq7TVtl2CWvkorG5cgL4= X-Google-Smtp-Source: ABdhPJwLAt2ETijowAWtJpYpX9m4hUeDpTFfJi8C4bh7yT00oJioRIjQ1xHFEUykPMP/eS/J1wtPrA== X-Received: by 2002:a1c:5449:: with SMTP id p9mr13920931wmi.101.1627861338260; Sun, 01 Aug 2021 16:42:18 -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: Aurelien Jarno , Aleksandar Rikalo , Jiaxun Yang , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH-for-6.2 3/4] target/mips: Merge 32-bit/64-bit release6 decodetree definitions Date: Mon, 2 Aug 2021 01:42:01 +0200 Message-Id: <20210801234202.3167676-4-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210801234202.3167676-1-f4bug@amsat.org> References: <20210801234202.3167676-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) X-ZM-MESSAGEID: 1627861340675100001 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 --- target/mips/tcg/mips64r6.decode | 27 ------------------- .../mips/tcg/{mips32r6.decode =3D> rel6.decode} | 13 +++++++++ target/mips/tcg/rel6_translate.c | 16 ++++------- target/mips/tcg/meson.build | 3 +-- 4 files changed, 19 insertions(+), 40 deletions(-) delete mode 100644 target/mips/tcg/mips64r6.decode rename target/mips/tcg/{mips32r6.decode =3D> rel6.decode} (69%) diff --git a/target/mips/tcg/mips64r6.decode b/target/mips/tcg/mips64r6.dec= ode deleted file mode 100644 index b58d8009ccd..00000000000 --- a/target/mips/tcg/mips64r6.decode +++ /dev/null @@ -1,27 +0,0 @@ -# MIPS64 Release 6 instruction set -# -# Copyright (C) 2020 Philippe Mathieu-Daud=C3=A9 -# -# SPDX-License-Identifier: LGPL-2.1-or-later -# -# Reference: -# MIPS Architecture for Programmers Volume II-A -# The MIPS64 Instruction Set Reference Manual, Revision 6.06 -# (Document Number: MD00087-2B-MIPS64BIS-AFP-6.06) -# - -&rtype rs rt rd sa !extern - -&REMOVED !extern - -@lsa ...... rs:5 rt:5 rd:5 ... sa:2 ...... &rtype - -DLSA 000000 ..... ..... ..... 000 .. 010101 @lsa - -REMOVED 011010 ----- ----- ---------------- # LDL -REMOVED 011011 ----- ----- ---------------- # LDR -REMOVED 101100 ----- ----- ---------------- # SDL -REMOVED 101101 ----- ----- ---------------- # SDR - -REMOVED 110100 ----- ----- ---------------- # LLD -REMOVED 111100 ----- ----- ---------------- # SCD diff --git a/target/mips/tcg/mips32r6.decode b/target/mips/tcg/rel6.decode similarity index 69% rename from target/mips/tcg/mips32r6.decode rename to target/mips/tcg/rel6.decode index 837c991edc5..ed069c51662 100644 --- a/target/mips/tcg/mips32r6.decode +++ b/target/mips/tcg/rel6.decode @@ -5,21 +5,29 @@ # SPDX-License-Identifier: LGPL-2.1-or-later # # Reference: +# # MIPS Architecture for Programmers Volume II-A # The MIPS32 Instruction Set Reference Manual, Revision 6.06 # (Document Number: MD00086-2B-MIPS32BIS-AFP-06.06) # +# MIPS Architecture for Programmers Volume II-A +# The MIPS64 Instruction Set Reference Manual, Revision 6.06 +# (Document Number: MD00087-2B-MIPS64BIS-AFP-6.06) =20 &rtype rs rt rd sa =20 @lsa ...... rs:5 rt:5 rd:5 ... sa:2 ...... &rtype =20 LSA 000000 ..... ..... ..... 000 .. 000101 @lsa +DLSA 000000 ..... ..... ..... 000 .. 010101 @lsa =20 REMOVED 010011 ----- ----- ----- ----- ------ # COP1X (COP3) =20 REMOVED 011100 ----- ----- ----- ----- ------ # SPECIAL2 =20 +REMOVED 011010 ----- ----- ---------------- # LDL +REMOVED 011011 ----- ----- ---------------- # LDR + REMOVED 011111 ----- ----- ---------- 011001 # LWLE REMOVED 011111 ----- ----- ---------- 011010 # LWRE REMOVED 011111 ----- ----- ---------- 100001 # SWLE @@ -28,9 +36,14 @@ REMOVED 011111 ----- ----- ---------- 10001= 0 # SWRE REMOVED 100010 ----- ----- ---------------- # LWL REMOVED 100110 ----- ----- ---------------- # LWR REMOVED 101010 ----- ----- ---------------- # SWL +REMOVED 101100 ----- ----- ---------------- # SDL +REMOVED 101101 ----- ----- ---------------- # SDR REMOVED 101110 ----- ----- ---------------- # SWR =20 REMOVED 101111 ----- ----- ---------------- # CACHE + REMOVED 110000 ----- ----- ---------------- # LL REMOVED 110011 ----- ----- ---------------- # PREF +REMOVED 110100 ----- ----- ---------------- # LLD REMOVED 111000 ----- ----- ---------------- # SC +REMOVED 111100 ----- ----- ---------------- # SCD diff --git a/target/mips/tcg/rel6_translate.c b/target/mips/tcg/rel6_transl= ate.c index 0354370927d..ae2e023a817 100644 --- a/target/mips/tcg/rel6_translate.c +++ b/target/mips/tcg/rel6_translate.c @@ -13,9 +13,8 @@ #include "exec/helper-gen.h" #include "translate.h" =20 -/* Include the auto-generated decoder. */ -#include "decode-mips32r6.c.inc" -#include "decode-mips64r6.c.inc" +/* Include the auto-generated decoders. */ +#include "decode-rel6.c.inc" =20 bool trans_REMOVED(DisasContext *ctx, arg_REMOVED *a) { @@ -31,13 +30,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_isa_rel6(DisasContext *ctx, uint32_t insn) -{ - if (TARGET_LONG_BITS =3D=3D 64 && decode_mips64r6(ctx, insn)) { - return true; - } - return decode_mips32r6(ctx, insn); -} diff --git a/target/mips/tcg/meson.build b/target/mips/tcg/meson.build index bf4001e5741..70fa3dd57df 100644 --- a/target/mips/tcg/meson.build +++ b/target/mips/tcg/meson.build @@ -1,6 +1,5 @@ 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('rel6.decode', extra_args: ['--decode=3Ddecode_isa_re= l6']), decodetree.process('msa.decode', extra_args: '--decode=3Ddecode_ase_msa'= ), decodetree.process('tx79.decode', extra_args: '--static-decode=3Ddecode_= tx79'), ] --=20 2.31.1