From nobody Tue May 21 15:01:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.218.51 as permitted sender) client-ip=209.85.218.51; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-f51.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.218.51 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1607459834; cv=none; d=zohomail.com; s=zohoarc; b=dqDXYlUkcaQgi7cxnly7EV4HHMsGV+2IRD4hvb5BBndXmnt5jtOmywRRzHAaAVgzSimuLUdCKet0pzdzrj44x4gcOJjanqJq5A/BVN1GsCGkm5zcRMTlJa1dCEhPZyC+VTaiVTjzGwDrxzfm7OzF/TVGePy6nRB0WeKFz4MTt9w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607459834; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=neFYhcQMdHuG2sfFjuVPNAoEvhuCNcKd6HTd7z8KqTU=; b=A+ckhoQKwg0/nQ4yfef9NGt4CbdWHkOX9fbp8yQWKwDHFiWRtD/+AMpBCoa29sJvKiq3NMLEnHuTfsX5wZRLAiLWuDYgM26AgzugvfVhss77094fzTTgxr/63Q4q4D5XuvSa6QvDYx2eQd+5nNgvmWKnTwN9E/hJe2oPHiKDn3E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.218.51 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) by mx.zohomail.com with SMTPS id 16074598341736.9211450908717325; Tue, 8 Dec 2020 12:37:14 -0800 (PST) Received: by mail-ej1-f51.google.com with SMTP id a16so26542770ejj.5 for ; Tue, 08 Dec 2020 12:37:13 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (101.red-88-21-206.staticip.rima-tde.net. [88.21.206.101]) by smtp.gmail.com with ESMTPSA id pk19sm16810515ejb.32.2020.12.08.12.37.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Dec 2020 12:37:11 -0800 (PST) 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=neFYhcQMdHuG2sfFjuVPNAoEvhuCNcKd6HTd7z8KqTU=; b=qv7l17mMhHNe/XReIKS0+pjGYq0hD2w0JeltHma0huUW5X6K9+9IL2yF7J6HsSPHNQ 8YIAtBQ9uXJ0FlQfRrA4QmkolOCp7rtwQQFO4YGkLW+C4NqDxE3yjGFYS+OH3s0ZUxrx U91DdRi/UzJ1RCpQ1f/lmvqzXyZT936l3EWY/Y8hm5EAl1sJX/9Uqw1Qo1Gyf4QSCxmY XTJQA23wTwJ3H0pw7bQ58zFyUAS8nc1Rte5i29dsbfHPik0XV3hNNDClM6xa+OIQdjVr nt+SJyXMcXc3gZ+ngHDxqfh2ayhf+J/n9AulhKF2/hd8pnEMyRWqBymme1FZXysL/Iku w2ig== 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=neFYhcQMdHuG2sfFjuVPNAoEvhuCNcKd6HTd7z8KqTU=; b=GSu+iIz3Px4uODNP3ym11GlhOncN6Af/dY8/Qz667QkfwyOTLk5Wnbl7tWhsFe3ggJ O0PRXaHCQgJXkvOjLCjm2UztSE2hjEqppau1eLNN9nJFuUoWeRT1SakkvGU4pUgJHM+b IL/XgEnoLZDr7OT+49ni+n4tmDvIQqD0CLOPIl2QHZLfSabJ453xarJpz+thWBjVyEXA +4hFCe+VEMAai5pxQmrDJXXspfssRvOGIENZPk+CHVr+F8id4LUCaKqKV0jA4kQX1KpV ymOStwjj/amn+fIOkadY5EhGEWLfPA9Dz4ZXXv5bJ9iPW2jU7jmKmXnQXpI94tI9xmKT q3rA== X-Gm-Message-State: AOAM533rgNqXNTCdYwROqqrcO2VaTQyfgUgdy3Kz0g7stVEMdFsZFIfR hMqArUowCwYuktM6KErGqL8= X-Google-Smtp-Source: ABdhPJyh48NdSItkeC+w0zzRvT9CO8jwaalakyYIAbH33A9K8dU4fY6O/aE3IKON5Sko6OUVcpXTcQ== X-Received: by 2002:a17:906:94d4:: with SMTP id d20mr24535027ejy.475.1607459832383; Tue, 08 Dec 2020 12:37:12 -0800 (PST) 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?= , Aurelien Jarno , Aleksandar Rikalo , Jiaxun Yang , Richard Henderson Subject: [PATCH 01/13] !fixup "target/mips/translate: Add declarations for generic code" Date: Tue, 8 Dec 2020 21:36:52 +0100 Message-Id: <20201208203704.243704-2-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201208203704.243704-1-f4bug@amsat.org> References: <20201208203704.243704-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) Missed in previous "Convert MSA to decodetree" series. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/mips/translate.h | 8 +++++++- target/mips/translate.c | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/target/mips/translate.h b/target/mips/translate.h index cba28f49753..da88387418c 100644 --- a/target/mips/translate.h +++ b/target/mips/translate.h @@ -55,11 +55,15 @@ typedef struct DisasContext { void generate_exception_end(DisasContext *ctx, int excp); void gen_reserved_instruction(DisasContext *ctx); void check_insn(DisasContext *ctx, uint64_t flags); -void gen_base_offset_addr(DisasContext *ctx, TCGv addr, int base, int offs= et); +#ifdef TARGET_MIPS64 +void check_mips_64(DisasContext *ctx); +#endif =20 +void gen_base_offset_addr(DisasContext *ctx, TCGv addr, int base, int offs= et); void gen_load_gpr(TCGv t, int reg); void gen_store_gpr(TCGv t, int reg); =20 +extern TCGv cpu_gpr[32], cpu_PC; extern TCGv bcond; =20 #define LOG_DISAS(...) = \ @@ -82,6 +86,8 @@ extern TCGv bcond; =20 /* MSA */ void msa_translate_init(void); + +/* decodetree generated */ bool decode_msa32(DisasContext *ctx, uint32_t insn); =20 #endif diff --git a/target/mips/translate.c b/target/mips/translate.c index 41c0b59a473..3c7307233c9 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -2187,7 +2187,7 @@ enum { }; =20 /* global register indices */ -static TCGv cpu_gpr[32], cpu_PC; +TCGv cpu_gpr[32], cpu_PC; static TCGv cpu_HI[MIPS_DSP_ACC], cpu_LO[MIPS_DSP_ACC]; static TCGv cpu_dspctrl, btarget; TCGv bcond; @@ -2728,7 +2728,7 @@ static inline void check_ps(DisasContext *ctx) * This code generates a "reserved instruction" exception if 64-bit * instructions are not enabled. */ -static inline void check_mips_64(DisasContext *ctx) +void check_mips_64(DisasContext *ctx) { if (unlikely(!(ctx->hflags & MIPS_HFLAG_64))) { generate_exception_end(ctx, EXCP_RI); --=20 2.26.2 From nobody Tue May 21 15:01:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.218.66 as permitted sender) client-ip=209.85.218.66; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-f66.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.218.66 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail(p=none dis=none) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1607459839; cv=none; d=zohomail.com; s=zohoarc; b=QP4Z0kLyav5SSgBvr0KeJnjgURBhDi4h5GBGgjeZW7vpGoKcZ7OcyS7m9wYI19TW4r/CKaQyn2yXWorYFM7lgoeLzqGRIiBAp1Qg4HeHZoVOKXR4F2vrA+PZ8p1UZFdHyJvVOfdI7zo08XlDC/P6qpk8GjLt2KOCWas7/EyPgFc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607459839; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=WW5ygfjHXiaQo8ZvKmUiJ8hTGBDDSiw6zv7qR9vmlSo=; b=g+4vIzreCtJZOyBWrCXSKi/yUl7MFJnBtvlFJw3LlMKFzEtL9+AufgEjnxxojLBDnrb46R/OTpbFICWfNSnSScarfA4r1SzyCmKL+SY/j8i0P36mZ7Pkik/H55ODNkg8cPuBd2JQIyxhX7/TL4bdx9S+knfpY2+pwbyX426/MwY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.218.66 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail-ej1-f66.google.com (mail-ej1-f66.google.com [209.85.218.66]) by mx.zohomail.com with SMTPS id 1607459839446257.921621473144; Tue, 8 Dec 2020 12:37:19 -0800 (PST) Received: by mail-ej1-f66.google.com with SMTP id jx16so26508894ejb.10 for ; Tue, 08 Dec 2020 12:37:18 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (101.red-88-21-206.staticip.rima-tde.net. [88.21.206.101]) by smtp.gmail.com with ESMTPSA id u15sm19240436edt.24.2020.12.08.12.37.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Dec 2020 12:37:16 -0800 (PST) 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=WW5ygfjHXiaQo8ZvKmUiJ8hTGBDDSiw6zv7qR9vmlSo=; b=pNkWTgSMldp5Qb8ezh4NixCSrsSrkspKmpwta3vP0nDSN093pg2sRCGIPHWWFPSIC6 nCYz2NK4be4Tx66FsWIWWGVrXUwj8jFWt0W1qroIU9jhBC5M+7bdrtprjUpMy0+WZpk+ tgd509bk05mdNzX5zIQuv7Zgjx3QvilrQAP9Xr/zD/tf8hlUaGPprTWmqTXpVRKA0RXR yM0+6oTMmzR+h7pkx4YAFfNMP1dOWVc8wAHLPZ/OnfVy7y9cogQvFZZSLKynEly27Qqq 5APPt0H9d4jk9LVVWfXH7NDXt1MPEi077E8VUM0BP17KmLJXzk6qb92NduNs2Q/P02DF L2Jg== 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=WW5ygfjHXiaQo8ZvKmUiJ8hTGBDDSiw6zv7qR9vmlSo=; b=pvPeaiTHr0o8Gmfs1T77srCFq71Hqq0YdjgvdGmGPdJhw87X3t2L+PSWQXPLwITcRm PtvjnxWrffNz1TxYmlnceYP6Sd0Q7Yr1jAf5G08MDcCsvXX7sACwOPQ/4wPrm0eo5Kbj mY+x/2uvkW0CvbC14JlSCNss6bgoPVJTzRXD1KNl1GpommvR+XM4/bXVmbrRG/cnQbrA /8nwd+zjT7XhLjHU6ZaOQoC4ftAH50gz2lii0ihiDdbKFVsYtOTydaQXujnK1kpGwAro icSI8NGtcZcegwqBkgGGr7Pm1lyB6MVtSpvDAtjhz9cqLbAdpT/pdlF15vMgMxAx3Jw/ kDIA== X-Gm-Message-State: AOAM530yQC4BNha8tY1m9QcMSZdEWVIDp9JXTuUrlRorvngzal6CaN80 JTbDk5wQi7M4OnoiajBwgNE= X-Google-Smtp-Source: ABdhPJyBxO9N4qJSOweMgPJXqE+mE59RqDCAsJHyJ1O+BEOe4HFlXIvyh175Io12acH7Z+M0RmiK5g== X-Received: by 2002:a17:906:9441:: with SMTP id z1mr25743773ejx.288.1607459837570; Tue, 08 Dec 2020 12:37:17 -0800 (PST) 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?= , Aurelien Jarno , Aleksandar Rikalo , Jiaxun Yang , Richard Henderson Subject: [PATCH 02/13] target/mips: Extract LSA/DLSA translation generators Date: Tue, 8 Dec 2020 21:36:53 +0100 Message-Id: <20201208203704.243704-3-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201208203704.243704-1-f4bug@amsat.org> References: <20201208203704.243704-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) Extract gen_lsa() from translate.c and explode it as gen_LSA() and gen_DLSA(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/mips/translate.h | 8 +++++ target/mips/translate.c | 35 +++---------------- target/mips/translate_addr_const.c | 54 ++++++++++++++++++++++++++++++ target/mips/meson.build | 1 + 4 files changed, 67 insertions(+), 31 deletions(-) create mode 100644 target/mips/translate_addr_const.c diff --git a/target/mips/translate.h b/target/mips/translate.h index da88387418c..4eb218e2c9f 100644 --- a/target/mips/translate.h +++ b/target/mips/translate.h @@ -63,6 +63,14 @@ void gen_base_offset_addr(DisasContext *ctx, TCGv addr, = int base, int offset); void gen_load_gpr(TCGv t, int reg); void gen_store_gpr(TCGv t, int reg); =20 +/* + * Address Computation and Large Constant Instructions + */ +bool gen_LSA(DisasContext *ctx, int rd, int rt, int rs, int sa); +#if defined(TARGET_MIPS64) +bool gen_DLSA(DisasContext *ctx, int rd, int rt, int rs, int sa); +#endif + extern TCGv cpu_gpr[32], cpu_PC; extern TCGv bcond; =20 diff --git a/target/mips/translate.c b/target/mips/translate.c index 3c7307233c9..752a06afa21 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -6624,31 +6624,6 @@ static void gen_bshfl(DisasContext *ctx, uint32_t op= 2, int rt, int rd) tcg_temp_free(t0); } =20 -static void gen_lsa(DisasContext *ctx, int opc, int rd, int rs, int rt, - int imm2) -{ - TCGv t0; - TCGv t1; - if (rd =3D=3D 0) { - /* Treat as NOP. */ - return; - } - t0 =3D tcg_temp_new(); - t1 =3D tcg_temp_new(); - gen_load_gpr(t0, rs); - gen_load_gpr(t1, rt); - tcg_gen_shli_tl(t0, t0, imm2 + 1); - tcg_gen_add_tl(cpu_gpr[rd], t0, t1); - if (opc =3D=3D OPC_LSA) { - tcg_gen_ext32s_tl(cpu_gpr[rd], cpu_gpr[rd]); - } - - tcg_temp_free(t1); - tcg_temp_free(t0); - - return; -} - static void gen_align_bits(DisasContext *ctx, int wordsz, int rd, int rs, int rt, int bits) { @@ -16504,8 +16479,7 @@ static void decode_micromips32_opc(CPUMIPSState *en= v, DisasContext *ctx) return; case LSA: check_insn(ctx, ISA_MIPS32R6); - gen_lsa(ctx, OPC_LSA, rd, rs, rt, - extract32(ctx->opcode, 9, 2)); + gen_LSA(ctx, rd, rs, rt, extract32(ctx->opcode, 9, 2)); break; case ALIGN: check_insn(ctx, ISA_MIPS32R6); @@ -21468,8 +21442,7 @@ static int decode_nanomips_32_48_opc(CPUMIPSState *= env, DisasContext *ctx) * amount, meaning that the supported shift values are in * the range 0 to 3 (instead of 1 to 4 in MIPSR6). */ - gen_lsa(ctx, OPC_LSA, rd, rs, rt, - extract32(ctx->opcode, 9, 2) - 1); + gen_LSA(ctx, rd, rs, rt, extract32(ctx->opcode, 9, 2) - 1); break; case NM_EXTW: gen_ext(ctx, 32, rd, rs, rt, extract32(ctx->opcode, 6, 5)); @@ -24355,7 +24328,7 @@ static void decode_opc_special_r6(CPUMIPSState *env= , DisasContext *ctx) op1 =3D MASK_SPECIAL(ctx->opcode); switch (op1) { case OPC_LSA: - gen_lsa(ctx, op1, rd, rs, rt, extract32(ctx->opcode, 6, 2)); + gen_LSA(ctx, rd, rs, rt, extract32(ctx->opcode, 6, 2)); break; case OPC_MULT: case OPC_MULTU: @@ -24409,7 +24382,7 @@ static void decode_opc_special_r6(CPUMIPSState *env= , DisasContext *ctx) #if defined(TARGET_MIPS64) case OPC_DLSA: check_mips_64(ctx); - gen_lsa(ctx, op1, rd, rs, rt, extract32(ctx->opcode, 6, 2)); + gen_DLSA(ctx, rd, rs, rt, extract32(ctx->opcode, 6, 2)); break; case R6_OPC_DCLO: case R6_OPC_DCLZ: diff --git a/target/mips/translate_addr_const.c b/target/mips/translate_add= r_const.c new file mode 100644 index 00000000000..e6da5c66544 --- /dev/null +++ b/target/mips/translate_addr_const.c @@ -0,0 +1,54 @@ +/* + * Address Computation and Large Constant Instructions + */ +#include "qemu/osdep.h" +#include "tcg/tcg-op.h" +#include "translate.h" + +bool gen_LSA(DisasContext *ctx, int rd, int rt, int rs, int sa) +{ + TCGv t0; + TCGv t1; + + if (rd =3D=3D 0) { + /* Treat as NOP. */ + return true; + } + t0 =3D tcg_temp_new(); + t1 =3D tcg_temp_new(); + gen_load_gpr(t0, rs); + gen_load_gpr(t1, rt); + tcg_gen_shli_tl(t0, t0, sa + 1); + tcg_gen_add_tl(cpu_gpr[rd], t0, t1); + tcg_gen_ext32s_tl(cpu_gpr[rd], cpu_gpr[rd]); + + tcg_temp_free(t1); + tcg_temp_free(t0); + + return true; +} + +#if defined(TARGET_MIPS64) +bool gen_DLSA(DisasContext *ctx, int rd, int rt, int rs, int sa) +{ + TCGv t0; + TCGv t1; + + check_mips_64(ctx); + + if (rd =3D=3D 0) { + /* Treat as NOP. */ + return true; + } + t0 =3D tcg_temp_new(); + t1 =3D tcg_temp_new(); + gen_load_gpr(t0, rs); + gen_load_gpr(t1, rt); + tcg_gen_shli_tl(t0, t0, sa + 1); + tcg_gen_add_tl(cpu_gpr[rd], t0, t1); + tcg_temp_free(t1); + tcg_temp_free(t0); + + return true; +} +#endif /* TARGET_MIPS64 */ diff --git a/target/mips/meson.build b/target/mips/meson.build index 7d0414bbe23..9e42c341a90 100644 --- a/target/mips/meson.build +++ b/target/mips/meson.build @@ -15,6 +15,7 @@ 'mod-msa_helper.c', =20 'translate.c', + 'translate_addr_const.c', 'mod-msa_translate.c', )) mips_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c')) --=20 2.26.2 From nobody Tue May 21 15:01:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.218.48 as permitted sender) client-ip=209.85.218.48; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-f48.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.218.48 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1607459844; cv=none; d=zohomail.com; s=zohoarc; b=WsEhM9OV61GSNsfSTRC7fmDX9+vj7EIdyShQtCV2o0q+Cf3R2VkcSZJZJ1zDYg6eE/kHPwqVqepU1aZkLV9HYk4+FrcFu12UJNN31b3yWl/nKDcS+2AGnj7qM6Bk9k7BxxNGVAx4ATV8j1Qptbokhw12nIzw13Ptwx6QyPUGUYI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607459844; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=egytU2KQefn/Es9E3Yg/Fw4QqJAhSkiglactlGUyVCU=; b=ns+J0IOgnkA5yt6TW3cDcJEB2Dw6a9dvqiBKYWOXAbTRAYTrzh6aSjxrIN8Nymee1hCtIIf+dSHsONAaRUJXJJljucskMD+p7utwBX/EdYdpfXhIdu4zCX/K6mpfURMVLq7I6NdXBJBWPeXCN778VTUn6GbFW+TuL4UbDdiVWr4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.218.48 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) by mx.zohomail.com with SMTPS id 1607459844668111.45138806843272; Tue, 8 Dec 2020 12:37:24 -0800 (PST) Received: by mail-ej1-f48.google.com with SMTP id jx16so26509185ejb.10 for ; Tue, 08 Dec 2020 12:37:24 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (101.red-88-21-206.staticip.rima-tde.net. [88.21.206.101]) by smtp.gmail.com with ESMTPSA id o11sm16729199ejh.55.2020.12.08.12.37.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Dec 2020 12:37:22 -0800 (PST) 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=egytU2KQefn/Es9E3Yg/Fw4QqJAhSkiglactlGUyVCU=; b=Em4kDzEydRSpWB0wkn/pAjsy2bc0IBWLImt3h9jogbBxzBmm8fIP/aEOM64pg45IrR MAAKDjjYfFc6dNEKimwUNTwuaqVAcygzH8lBqKMZMMSrLLGvVpyECNvRJydKFRbzNAF5 aEDRqcWlXRTW1PrukmpqS4PPLDH9U2KK35CwoiF1qUZ2GddIinjsGoRHlcUP2KSSuxGK 2SEjO72u0rsk56f3TnOMJo2RZUs3N3noGr0JdxjE09YBoyOfPsz6Cb44Orbnw294g4M+ +1xBfxI5BuO+gUE16fIvzUwAjc1flrqvneJ8vMhqdIRGL/iJEC1kUuwXwL1ZXTuRnr9D GTew== 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=egytU2KQefn/Es9E3Yg/Fw4QqJAhSkiglactlGUyVCU=; b=ToZ4iaYABcuEy3MkuAXrgn9kIsIxVimi8CtcLOzLAYg9VZ+q0ODVZoP/s4o9wn6dAZ FopJEZZw9cj/tIKo18I4KQJ01Je1svur8kKmT8Q56+iZ3AyQRqJHaPteU89qgD/Ebeo8 KGVwY6EM8R+mtQpIeo+tbtXPd+s2AoTf2V/3gPoIOKgGlLdce9X6nJsmNCSK5qDSByEV sspuQ6i87whppu942Riu7YLtnUq6y4q2bXbfWQYDPxZ3oFvyAfVsRfjD20d6nMgvtkWR lnFn5JAUpvCBZzXSGV/G+5p0raGcr4qMBfVD1XLgcYnvf9gOErazAraRcj4lQoMcOckD T0Pg== X-Gm-Message-State: AOAM53315lhLWMAFBdSoZloNQHHtRlj7loql8yfSc4cP8WUj4AXNpfSu mpp96FosE+miFWqXFFLPckt9LLERLOs= X-Google-Smtp-Source: ABdhPJw8goCIEoICDSfUVecsS7ZFt20DYxjX+sKYEKAAubi/XgQE8ru6zltSk8fFiIchfYRUL9S61g== X-Received: by 2002:a17:906:26c6:: with SMTP id u6mr24291050ejc.349.1607459842774; Tue, 08 Dec 2020 12:37:22 -0800 (PST) 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?= , Aurelien Jarno , Aleksandar Rikalo , Jiaxun Yang , Richard Henderson Subject: [PATCH 03/13] target/mips: Introduce decodetree helpers for MSA LSA/DLSA opcodes Date: Tue, 8 Dec 2020 21:36:54 +0100 Message-Id: <20201208203704.243704-4-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201208203704.243704-1-f4bug@amsat.org> References: <20201208203704.243704-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) Add the LSA opcode to the MSA32 decodetree config, add DLSA to a new config for the MSA64 ASE, and call decode_msa64() in the main decode_opc() loop. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/mips/translate.h | 3 +++ target/mips/mod-msa32.decode | 4 ++++ target/mips/mod-msa64.decode | 17 +++++++++++++++++ target/mips/mod-msa_translate.c | 15 +++++++++++++++ target/mips/translate.c | 5 +++++ target/mips/meson.build | 5 +++++ 6 files changed, 49 insertions(+) create mode 100644 target/mips/mod-msa64.decode diff --git a/target/mips/translate.h b/target/mips/translate.h index 4eb218e2c9f..00601232b97 100644 --- a/target/mips/translate.h +++ b/target/mips/translate.h @@ -97,5 +97,8 @@ void msa_translate_init(void); =20 /* decodetree generated */ bool decode_msa32(DisasContext *ctx, uint32_t insn); +#if defined(TARGET_MIPS64) +bool decode_msa64(DisasContext *ctx, uint32_t insn); +#endif =20 #endif diff --git a/target/mips/mod-msa32.decode b/target/mips/mod-msa32.decode index d69675132b8..0b2f0863251 100644 --- a/target/mips/mod-msa32.decode +++ b/target/mips/mod-msa32.decode @@ -10,11 +10,15 @@ # (Document Number: MD00866-2B-MSA32-AFP-01.12) # =20 +&lsa rd rt rs sa &msa_bz df wt s16 =20 +@lsa ...... rs:5 rt:5 rd:5 ... sa:2 ...... &lsa @bz ...... ... .. wt:5 s16:16 &msa_bz df=3D3 @bz_df ...... ... df:2 wt:5 s16:16 &msa_bz =20 +LSA 000000 ..... ..... ..... 000 .. 000101 @lsa + BZ_V 010001 01011 ..... ................ @bz BNZ_V 010001 01111 ..... ................ @bz =20 diff --git a/target/mips/mod-msa64.decode b/target/mips/mod-msa64.decode new file mode 100644 index 00000000000..8dcbbcd8538 --- /dev/null +++ b/target/mips/mod-msa64.decode @@ -0,0 +1,17 @@ +# 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) +# + +&lsa rd rt rs sa !extern + +@lsa ...... rs:5 rt:5 rd:5 ... sa:2 ...... &lsa + +DLSA 000000 ..... ..... ..... 000 .. 010101 @lsa diff --git a/target/mips/mod-msa_translate.c b/target/mips/mod-msa_translat= e.c index 7e7fc0644ff..7af0c2fd657 100644 --- a/target/mips/mod-msa_translate.c +++ b/target/mips/mod-msa_translate.c @@ -20,6 +20,9 @@ =20 /* Include the auto-generated decoder. */ #include "decode-mod-msa32.c.inc" +#if defined(TARGET_MIPS64) +#include "decode-mod-msa64.c.inc" +#endif /* TARGET_MIPS64 */ =20 #define OPC_MSA (0x1E << 26) =20 @@ -2268,3 +2271,15 @@ static bool trans_MSA(DisasContext *ctx, arg_MSA *a) =20 return true; } + +static bool trans_LSA(DisasContext *ctx, arg_LSA *a) +{ + return gen_LSA(ctx, a->rd, a->rt, a->rs, a->sa); +} + +#if defined(TARGET_MIPS64) +static bool trans_DLSA(DisasContext *ctx, arg_LSA *a) +{ + return gen_DLSA(ctx, a->rd, a->rt, a->rs, a->sa); +} +#endif /* TARGET_MIPS64 */ diff --git a/target/mips/translate.c b/target/mips/translate.c index 752a06afa21..b3c45d6211a 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -28311,6 +28311,11 @@ static void decode_opc(CPUMIPSState *env, DisasCon= text *ctx) /* Transition to the auto-generated decoder. */ =20 /* ISA Extensions */ +#if defined(TARGET_MIPS64) + if (ase_msa_available(env) && decode_msa64(ctx, ctx->opcode)) { + return; + } +#endif /* TARGET_MIPS64 */ if (ase_msa_available(env) && decode_msa32(ctx, ctx->opcode)) { return; } diff --git a/target/mips/meson.build b/target/mips/meson.build index 9e42c341a90..124b5f7d49d 100644 --- a/target/mips/meson.build +++ b/target/mips/meson.build @@ -1,6 +1,9 @@ gen =3D [ decodetree.process('mod-msa32.decode', extra_args: [ '--decode=3Ddecode_= msa32' ]), ] +gen64 =3D [ + decodetree.process('mod-msa64.decode', extra_args: [ '--decode=3Ddecode_= msa64' ]), +] =20 mips_ss =3D ss.source_set() mips_ss.add(gen) @@ -18,6 +21,8 @@ 'translate_addr_const.c', 'mod-msa_translate.c', )) +mips_ss.add(when: 'TARGET_MIPS64', if_true: gen64) + mips_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c')) =20 mips_softmmu_ss =3D ss.source_set() --=20 2.26.2 From nobody Tue May 21 15:01:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.208.65 as permitted sender) client-ip=209.85.208.65; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ed1-f65.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.208.65 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1607459849; cv=none; d=zohomail.com; s=zohoarc; b=gTT/ZNjTQ+QuOPRpaoNrbSwtS9Nsc0B04MS7TcSEA6Qy/g9dZ3mF7UAt7LnzdiHsYV61miPM2AMIKIiZ+yBc12Ixc0+spib0hScvkTNYk/DalbEWEwS81JKV3nrqugyaymGSVfUqGnyWodAduMdfeMk0Q/GIydOM9ulZRvMN7/8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607459849; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=e1ThRM4curwGL9SR1qu+6oPmIadZWTqw434ldcSwUhY=; b=BraDyfG4I3e8uLXgjKeLQK07qweZN7KxiZ0yobhMrweYxOSevc4NMTSVY7HwIt+xafIZY5j56LMfwdDhvp9T18KbpiesE7ajYwHWA0L36RXBY7ZhI2xVSxk6SsepWeH/fSPbWpKh2J6B27LG2axBXP2oc+opbp05stj6i22jZFw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.208.65 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-ed1-f65.google.com (mail-ed1-f65.google.com [209.85.208.65]) by mx.zohomail.com with SMTPS id 1607459849832445.1537295722686; Tue, 8 Dec 2020 12:37:29 -0800 (PST) Received: by mail-ed1-f65.google.com with SMTP id r5so18952352eda.12 for ; Tue, 08 Dec 2020 12:37:29 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (101.red-88-21-206.staticip.rima-tde.net. [88.21.206.101]) by smtp.gmail.com with ESMTPSA id x9sm5763368ejd.99.2020.12.08.12.37.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Dec 2020 12:37:27 -0800 (PST) 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=e1ThRM4curwGL9SR1qu+6oPmIadZWTqw434ldcSwUhY=; b=ZeKuQVoVrFDnIq3klsVf1xGQjVp4L+Wrlg14VoaSMgNckSh70NaHbVliN9pkNF5Eqz MszKDYg8bFNUExuZvzOTq1r3/zinTrDmgcYAZ+tnpR9/BE4A9dpDgS6mJ+tne/GZUlj3 zfcX2sdZeU+un4ycvMrrbHfX73cS1HoWaXcOha3kT3fRuUO4nTyoGDb35yoTzNZSeKsZ gwNusef7Oadk2tV0vzGgAQa53E/P9JXuMI5aCJt7wuTwxIHUMv/MpFpuKujrezc0Qkfz bjyU3bx+AgOQTK0aOiZgtdqWHo9uMPpeI00031F3xRC8GSbVf6qIdw34FX8/J8HD4lqK 3RhQ== 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=e1ThRM4curwGL9SR1qu+6oPmIadZWTqw434ldcSwUhY=; b=Wc/LQ6YUkrd23lu63TnqTU0tCdUJETtYCs7ecg1yrZkMqiOTUoM1ihGsJDm2Jfvffz MhMWB3OCTe/b8DBlNxKY+DJioX2aa3CBVUQ5VHs41VgpcclQ5RFIsgZlsMSHs4BZ3ca4 aiB9vxhwqgDK8Rf+VNekHfFhx9cSJDZq8dRe5YI5YA+1ltY8BWhNCM+V7fHUkMS0RQyK wu6k7DNUu4G7tlSHV4AvJ8AosYBcQjuYjdEfXEZMrCFnk/0IZUPts2Nst5c0/sJ8ajrV jo5jUVnYSgfa9WN2LnJaropVOlN+s4OH0vAZSo1yFwUERuwCNn87X/fSQf7KXbg6fzG+ xFMQ== X-Gm-Message-State: AOAM532BOtShRbmY35Z0cReMeTva6nh6TUkMLQ+Ukxi8YALZHX/3oPco damJ7WFPBoNG3R0a0e/jboQ= X-Google-Smtp-Source: ABdhPJyC5gNPf2y9DUmPTpDv8HMoD4+4INUtL0W9fCtf6t9Ru9St5OxobKwoZfSiDbcnRnR3XxjjUw== X-Received: by 2002:a05:6402:1d3b:: with SMTP id dh27mr19429921edb.238.1607459847982; Tue, 08 Dec 2020 12:37:27 -0800 (PST) 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?= , Aurelien Jarno , Aleksandar Rikalo , Jiaxun Yang , Richard Henderson Subject: [PATCH 04/13] target/mips: Introduce decodetree helpers for Release6 LSA/DLSA opcodes Date: Tue, 8 Dec 2020 21:36:55 +0100 Message-Id: <20201208203704.243704-5-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201208203704.243704-1-f4bug@amsat.org> References: <20201208203704.243704-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) LSA and LDSA opcodes are also available with MIPS release 6. Introduce the decodetree config files and call the decode() helpers in the main decode_opc() loop. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/mips/translate.h | 2 ++ target/mips/isa-mips32r6.decode | 17 ++++++++++++++ target/mips/isa-mips64r6.decode | 17 ++++++++++++++ target/mips/isa-mips_rel6_translate.c | 33 +++++++++++++++++++++++++++ target/mips/translate.c | 10 ++++++++ target/mips/meson.build | 3 +++ 6 files changed, 82 insertions(+) create mode 100644 target/mips/isa-mips32r6.decode create mode 100644 target/mips/isa-mips64r6.decode create mode 100644 target/mips/isa-mips_rel6_translate.c diff --git a/target/mips/translate.h b/target/mips/translate.h index 00601232b97..dcd8de602c1 100644 --- a/target/mips/translate.h +++ b/target/mips/translate.h @@ -96,8 +96,10 @@ extern TCGv bcond; void msa_translate_init(void); =20 /* decodetree generated */ +bool decode_mips32r6(DisasContext *ctx, uint32_t insn); bool decode_msa32(DisasContext *ctx, uint32_t insn); #if defined(TARGET_MIPS64) +bool decode_mips64r6(DisasContext *ctx, uint32_t insn); bool decode_msa64(DisasContext *ctx, uint32_t insn); #endif =20 diff --git a/target/mips/isa-mips32r6.decode b/target/mips/isa-mips32r6.dec= ode new file mode 100644 index 00000000000..027585ee042 --- /dev/null +++ b/target/mips/isa-mips32r6.decode @@ -0,0 +1,17 @@ +# MIPS32 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 MIPS32 Instruction Set Reference Manual, Revision 6.06 +# (Document Number: MD00086-2B-MIPS32BIS-AFP-06.06) +# + +&lsa rd rt rs sa + +@lsa ...... rs:5 rt:5 rd:5 ... sa:2 ...... &lsa + +LSA 000000 ..... ..... ..... 000 .. 000101 @lsa diff --git a/target/mips/isa-mips64r6.decode b/target/mips/isa-mips64r6.dec= ode new file mode 100644 index 00000000000..e812224341e --- /dev/null +++ b/target/mips/isa-mips64r6.decode @@ -0,0 +1,17 @@ +# 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) +# + +&lsa rd rt rs sa !extern + +@lsa ...... rs:5 rt:5 rd:5 ... sa:2 ...... &lsa + +DLSA 000000 ..... ..... ..... 000 .. 010101 @lsa diff --git a/target/mips/isa-mips_rel6_translate.c b/target/mips/isa-mips_r= el6_translate.c new file mode 100644 index 00000000000..c77f3ed57e0 --- /dev/null +++ b/target/mips/isa-mips_rel6_translate.c @@ -0,0 +1,33 @@ +/* + * MIPS emulation for QEMU - # Release 6 translation routines + * + * Copyright (c) 2004-2005 Jocelyn Mayer + * Copyright (c) 2006 Marius Groeger (FPU operations) + * Copyright (c) 2006 Thiemo Seufer (MIPS32R2 support) + * Copyright (c) 2020 Philippe Mathieu-Daud=C3=A9 + * + * This code is licensed under the GNU GPLv2 and later. + */ + +#include "qemu/osdep.h" +#include "tcg/tcg-op.h" +#include "exec/helper-gen.h" +#include "translate.h" + +/* Include the auto-generated decoder. */ +#include "decode-isa-mips32r6.c.inc" +#if defined(TARGET_MIPS64) +#include "decode-isa-mips64r6.c.inc" +#endif /* TARGET_MIPS64 */ + +static bool trans_LSA(DisasContext *ctx, arg_LSA *a) +{ + return gen_LSA(ctx, a->rd, a->rt, a->rs, a->sa); +} + +#if defined(TARGET_MIPS64) +static bool trans_DLSA(DisasContext *ctx, arg_LSA *a) +{ + return gen_DLSA(ctx, a->rd, a->rt, a->rs, a->sa); +} +#endif /* TARGET_MIPS64 */ diff --git a/target/mips/translate.c b/target/mips/translate.c index b3c45d6211a..9b333f97822 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -28320,6 +28320,16 @@ static void decode_opc(CPUMIPSState *env, DisasCon= text *ctx) return; } =20 + /* ISA */ +#if defined(TARGET_MIPS64) + if ((ctx->insn_flags & ISA_MIPS64R6) && decode_mips64r6(ctx, ctx->opco= de)) { + return; + } +#endif /* TARGET_MIPS64 */ + if ((ctx->insn_flags & ISA_MIPS32R6) && decode_mips32r6(ctx, ctx->opco= de)) { + return; + } + op =3D MASK_OP_MAJOR(ctx->opcode); rs =3D (ctx->opcode >> 21) & 0x1f; rt =3D (ctx->opcode >> 16) & 0x1f; diff --git a/target/mips/meson.build b/target/mips/meson.build index 124b5f7d49d..a459d0917ee 100644 --- a/target/mips/meson.build +++ b/target/mips/meson.build @@ -1,7 +1,9 @@ gen =3D [ + decodetree.process('isa-mips32r6.decode', extra_args: [ '--decode=3Ddeco= de_mips32r6' ]), decodetree.process('mod-msa32.decode', extra_args: [ '--decode=3Ddecode_= msa32' ]), ] gen64 =3D [ + decodetree.process('isa-mips64r6.decode', extra_args: [ '--decode=3Ddeco= de_mips64r6' ]), decodetree.process('mod-msa64.decode', extra_args: [ '--decode=3Ddecode_= msa64' ]), ] =20 @@ -13,6 +15,7 @@ 'fpu_helper.c', 'gdbstub.c', 'helper.c', + 'isa-mips_rel6_translate.c', 'lmmi_helper.c', 'op_helper.c', 'mod-msa_helper.c', --=20 2.26.2 From nobody Tue May 21 15:01:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.218.67 as permitted sender) client-ip=209.85.218.67; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-f67.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.218.67 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1607459854; cv=none; d=zohomail.com; s=zohoarc; b=CBaxhn+e2D7nWD5r8ajLODEclgv6udKjt1BwPctVSmDHUm+RFZCjrFVFo6ftjZIoKLklVF0bQoo++7yOhMrHO1+90E/zt6RxedcCMEaumyHMfHdHMnkaaDmA2mAdT1HOWRlcoQS+aa6Kar/AruuzMK2pYoTJ+9Y1eEdObK2rH9c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607459854; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=bGWb+orU5EBa5WEZB/m/zvIZ1UpmUYqQ14OUTga+crA=; b=Q6HcH7iVrUmIVvHjOXC+nVcmRXsYox0q6JKu14AqHjXnERznHFPF7yfw5Cl/UgF41qAMahaydRMWZbW5LMOqlL002uPUklcOj/Jf8nAsiVjIgy4JozsW+J72tFVt5VJI+QWLi/8bsFx+zN0gqxhhl1Okq0ZK9QJs/4F2oQzuJ5M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.218.67 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-ej1-f67.google.com (mail-ej1-f67.google.com [209.85.218.67]) by mx.zohomail.com with SMTPS id 1607459854791887.8569075629819; Tue, 8 Dec 2020 12:37:34 -0800 (PST) Received: by mail-ej1-f67.google.com with SMTP id a16so26544321ejj.5 for ; Tue, 08 Dec 2020 12:37:34 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (101.red-88-21-206.staticip.rima-tde.net. [88.21.206.101]) by smtp.gmail.com with ESMTPSA id ca4sm12286018edb.80.2020.12.08.12.37.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Dec 2020 12:37:32 -0800 (PST) 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=bGWb+orU5EBa5WEZB/m/zvIZ1UpmUYqQ14OUTga+crA=; b=Qu6VOzA09QIUgjgW9P4/iNjRYJVEeNG0bUFp7NQNMHiK/mgC+8lm+l5LpESjdlkRoy j1bZwLkledO56th/GZ4Mp2Uqfoaz9Al9p0lhoVC9gGNVJlh7CgTrKfjGc1bKZUsHF1cl 284t+hah105YFdg3/GaShnBel6z3Y+c4m0EAvs6Fnj/9pUOkEgkCbCl/n9+P/2+frtBB pGCfCWF8nrFNqypbqPH/bA1TalOmnmGUaXUFKymM9+sUO1M7cusfApVhd1GqBeqEt5O3 Z2SOwpfMXoms6JcIaMuAPl22IEurF5zUITx1QP2RNeuH/vFcCgX+NvG9kECVxm54yI2l 4EIA== 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=bGWb+orU5EBa5WEZB/m/zvIZ1UpmUYqQ14OUTga+crA=; b=JHhrjJq3BJ4bEYD29D7rU9bpkL0d6QezQSxAbf24ErNq+nVmSF6swF/SoaPnVpMoGU 5252uL54m4v6qITagnPZMN/LHlRbB63JYscRci2bEgQWMAlbuBltsG4dXeHwFxv1XkGW EiuQHpZirWAcQI1ASp1PAuYez/u3EjS4GiXhYYDR4xbnqdbjaEhca+/mAGayeQLgVohq q/IbQ/roYAj+rYY2WZwaXkEg8TMCLy1RMR1afDXRHrqJeW4jJwye14/j4ncLp81j44E0 VIpDuIEt20cDQvLIq8Y8KItWelA6M3ZXpk6IqDfV8mR5kZSvGdiA4Om0F3iMoOsojhM1 ebsw== X-Gm-Message-State: AOAM532q7PyM+IQCgyPXSpbwGLJFWk1j8dzHYOlcXeWBai98Bgj9gFNH 3DkW3CLlrIHfAWYEOK0LvNs= X-Google-Smtp-Source: ABdhPJx3FPsI4+gFmgIxR0dwF20Q5lDR33asDcN+tv4OnbYrTeVIu79UYGD/zEINItcEA+OeU3lNsw== X-Received: by 2002:a17:906:6713:: with SMTP id a19mr25686980ejp.468.1607459853021; Tue, 08 Dec 2020 12:37:33 -0800 (PST) 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?= , Aurelien Jarno , Aleksandar Rikalo , Jiaxun Yang , Richard Henderson Subject: [PATCH 05/13] target/mips: Remove now unreachable LSA/DLSA opcodes code Date: Tue, 8 Dec 2020 21:36:56 +0100 Message-Id: <20201208203704.243704-6-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201208203704.243704-1-f4bug@amsat.org> References: <20201208203704.243704-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) Since we switched to decodetree-generated processing, we can remove this now unreachable code. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/mips/translate.c | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/target/mips/translate.c b/target/mips/translate.c index 9b333f97822..8f0a0a3830c 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -286,9 +286,6 @@ enum { R6_OPC_DCLZ =3D 0x12 | OPC_SPECIAL, R6_OPC_DCLO =3D 0x13 | OPC_SPECIAL, R6_OPC_SDBBP =3D 0x0e | OPC_SPECIAL, - - OPC_LSA =3D 0x05 | OPC_SPECIAL, - OPC_DLSA =3D 0x15 | OPC_SPECIAL, }; =20 /* Multiplication variants of the vr54xx. */ @@ -24327,9 +24324,6 @@ static void decode_opc_special_r6(CPUMIPSState *env= , DisasContext *ctx) =20 op1 =3D MASK_SPECIAL(ctx->opcode); switch (op1) { - case OPC_LSA: - gen_LSA(ctx, rd, rs, rt, extract32(ctx->opcode, 6, 2)); - break; case OPC_MULT: case OPC_MULTU: case OPC_DIV: @@ -24380,10 +24374,6 @@ static void decode_opc_special_r6(CPUMIPSState *en= v, DisasContext *ctx) } break; #if defined(TARGET_MIPS64) - case OPC_DLSA: - check_mips_64(ctx); - gen_DLSA(ctx, rd, rs, rt, extract32(ctx->opcode, 6, 2)); - break; case R6_OPC_DCLO: case R6_OPC_DCLZ: if (rt =3D=3D 0 && sa =3D=3D 1) { @@ -24645,18 +24635,14 @@ static void decode_opc_special(CPUMIPSState *env,= DisasContext *ctx) check_insn(ctx, ISA_MIPS2); gen_trap(ctx, op1, rs, rt, -1); break; - case OPC_LSA: /* OPC_PMON */ - if ((ctx->insn_flags & ISA_MIPS32R6) || ase_msa_available(env)) { - decode_opc_special_r6(env, ctx); - } else { - /* Pmon entry point, also R4010 selsl */ + case OPC_PMON: + /* Pmon entry point, also R4010 selsl */ #ifdef MIPS_STRICT_STANDARD - MIPS_INVAL("PMON / selsl"); - generate_exception_end(ctx, EXCP_RI); + MIPS_INVAL("PMON / selsl"); + generate_exception_end(ctx, EXCP_RI); #else - gen_helper_0e0i(pmon, sa); + gen_helper_0e0i(pmon, sa); #endif - } break; case OPC_SYSCALL: generate_exception_end(ctx, EXCP_SYSCALL); @@ -24747,11 +24733,6 @@ static void decode_opc_special(CPUMIPSState *env, = DisasContext *ctx) break; } break; - case OPC_DLSA: - if ((ctx->insn_flags & ISA_MIPS32R6) || ase_msa_available(env)) { - decode_opc_special_r6(env, ctx); - } - break; #endif default: if (ctx->insn_flags & ISA_MIPS32R6) { --=20 2.26.2 From nobody Tue May 21 15:01:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.208.66 as permitted sender) client-ip=209.85.208.66; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ed1-f66.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.208.66 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1607459859; cv=none; d=zohomail.com; s=zohoarc; b=QGAPXE7khDa5QSzVYx9AiYzVPEcpNKJLkT1GgJSEZuHuAdvplUt09cvzTpD2w4uCNH8W3RbFfBq3RYd5xYw+bCpQer2ZGYbV6w6dgFhRo4pxGZK2vPqnOMw6/FdYtK+aK1kko8hBGc7mkqbETQi5O1KJIfMaMd47Ic/3pnc+bHg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607459859; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=U37hHuN0OpgX2w1oBuujDMHXNpPVE7yqxkafsImH4gs=; b=kHC9/3KYbSsRjrMAr/sS0SwjS2lCT5yYhyt/jWXoLMY4HJIynygG/UamNmwwxASvTyUU39gkeLPq5DmXSiatJOG0yaCGdRME42M9AULgfEC6qw9AEDnVTJmW7RAbRwOYh1wS9vn9PSY2a6Fqe8440eErlXEaNzhT0dvFMtcLB+w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.208.66 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-ed1-f66.google.com (mail-ed1-f66.google.com [209.85.208.66]) by mx.zohomail.com with SMTPS id 160745985997092.89425537252998; Tue, 8 Dec 2020 12:37:39 -0800 (PST) Received: by mail-ed1-f66.google.com with SMTP id b2so18992241edm.3 for ; Tue, 08 Dec 2020 12:37:39 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (101.red-88-21-206.staticip.rima-tde.net. [88.21.206.101]) by smtp.gmail.com with ESMTPSA id e14sm16214855ejh.62.2020.12.08.12.37.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Dec 2020 12:37:37 -0800 (PST) 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=U37hHuN0OpgX2w1oBuujDMHXNpPVE7yqxkafsImH4gs=; b=bj8lpzDv0pcFa4lwf8fzlPbDhwJKyLj0xnGCc7jaSURxAxkxSMGoJaZsaF1DSog2kP wP7i0U2GW5wYsCkpZO5GJuxmcKWv9k+Wff94WGTdmb3lIbEkYWaIn3SN26Zw44LCYwSl Aq6mGLf5wJ+jPoFzfM88tosSrnN01aAUPcccJGmU1D57pAdrGVo0WlDn16OP5v9uPD5/ N9CTADrrUp+Wvh82ZBzZdGGM+ekT+swU/lUA3Jnbsm6IitwGaboS/etx7AoGZza2zecV pxDB6vuFkNuh3Ucrkh0rM40zKLS/whxxxLHEk6MFAnS/PqWM/DGVhF9uOjvQlTUlkvap 94BA== 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=U37hHuN0OpgX2w1oBuujDMHXNpPVE7yqxkafsImH4gs=; b=GM6cM3/0CYzbbB4Vx4LCX8HtCCjnmMWD2JzyRG1Ar9/IF+JrvfEFanRajhEwXEdWLf 8umJLa7RJWXQaDx5ni8z12q9aFuJtHSixKCgmXwOhloHb0sA99aFX7IpjgnmEiPZfaKX jM5H+CaQr4VIWtAF/v5FbTEJAjcoK2eowYZfaNWfL1oma1JAIDb8mx/buFd9yet6UT1v EdzEbv9ICCIVn0hJ8XhSpksJzUErUiMYtMz+3g+u7GJEFhei6aTbu+Ow75t8mvAd+D3n E3TyK6yMd0OGg/dWyisu6iY6yEMmRNRM2qzuz6THeUc8hR0Kuzqo6kwFyWyMlNtL2QiQ +WjQ== X-Gm-Message-State: AOAM531u86JjGTSEP/+CNADRVAGDl5MGrBjB8eY5sT7p3uERzcFxp2ot jg6DjlkQQ0TJcekTiWrAPLs= X-Google-Smtp-Source: ABdhPJwwoNYw4ioAbqKJDPkJgG+YPom9F2fhkkkIAYnZdftHC1g3W46Z+N1oeH2OVmx1EvPzuXUMeA== X-Received: by 2002:aa7:dacf:: with SMTP id x15mr25886606eds.134.1607459858089; Tue, 08 Dec 2020 12:37:38 -0800 (PST) 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?= , Aurelien Jarno , Aleksandar Rikalo , Jiaxun Yang , Richard Henderson Subject: [PATCH 06/13] target/mips: Convert Rel6 Special2 opcode to decodetree Date: Tue, 8 Dec 2020 21:36:57 +0100 Message-Id: <20201208203704.243704-7-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201208203704.243704-1-f4bug@amsat.org> References: <20201208203704.243704-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) Special2 opcode have been removed from the Release 6. Add a single decodetree entry for all the opcode class, triggering Reserved Instruction if ever used. Remove unreachable check_insn_opc_removed() call. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/mips/isa-mips32r6.decode | 2 ++ target/mips/isa-mips_rel6_translate.c | 7 +++++++ target/mips/translate.c | 2 -- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/target/mips/isa-mips32r6.decode b/target/mips/isa-mips32r6.dec= ode index 027585ee042..259bac612ab 100644 --- a/target/mips/isa-mips32r6.decode +++ b/target/mips/isa-mips32r6.decode @@ -15,3 +15,5 @@ @lsa ...... rs:5 rt:5 rd:5 ... sa:2 ...... &lsa =20 LSA 000000 ..... ..... ..... 000 .. 000101 @lsa + +REMOVED 011100 ----- ----- ----- ----- ------ # SPECIAL2 diff --git a/target/mips/isa-mips_rel6_translate.c b/target/mips/isa-mips_r= el6_translate.c index c77f3ed57e0..9ac906b1f33 100644 --- a/target/mips/isa-mips_rel6_translate.c +++ b/target/mips/isa-mips_rel6_translate.c @@ -20,6 +20,13 @@ #include "decode-isa-mips64r6.c.inc" #endif /* TARGET_MIPS64 */ =20 +bool trans_REMOVED(DisasContext *ctx, arg_REMOVED *a) +{ + gen_reserved_instruction(ctx); + + return true; +} + static bool trans_LSA(DisasContext *ctx, arg_LSA *a) { return gen_LSA(ctx, a->rd, a->rt, a->rs, a->sa); diff --git a/target/mips/translate.c b/target/mips/translate.c index 8f0a0a3830c..788b5112a80 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -27145,8 +27145,6 @@ static void decode_opc_special2_legacy(CPUMIPSState= *env, DisasContext *ctx) int rs, rt, rd; uint32_t op1; =20 - check_insn_opc_removed(ctx, ISA_MIPS32R6); - rs =3D (ctx->opcode >> 21) & 0x1f; rt =3D (ctx->opcode >> 16) & 0x1f; rd =3D (ctx->opcode >> 11) & 0x1f; --=20 2.26.2 From nobody Tue May 21 15:01:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.208.68 as permitted sender) client-ip=209.85.208.68; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ed1-f68.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.208.68 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1607459865; cv=none; d=zohomail.com; s=zohoarc; b=H1+xkQljLC/gYqbVoZPyuAMqiP3PA9zSoSgsyGjG5r555JA4Vv+CNwQWb5IFNBoDgh3c6utvRkf3Bs2JxCiBUAM70UrxS4bzeqi1gQVMnyWDMhAUKC5+j8RFxK5OxlW6zFAF/X1kJVmMAd3vHfzOsur4EWFJqcWL3TpcedjDGKs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607459865; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5s+Pc76VS0giYYBfSeBqYRPzwDyC7ikS6JhKYOaNfSk=; b=JUTjgJFkmA0s2fRkGt14UzMGtQIij1IckkfZBtsaEUEnxpF1ZJ4fAAWDA7RfsPFdvNegH1kPprFauuJWqKdk4IVWaSYw8sOHQ5oSsGoEx8nGA8ELIFkqhMHWvTnSTkRyx709vdg0lOVeLqnj2J7Sk/6itqpSgrQ+hZpl2vLSvIo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.208.68 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-ed1-f68.google.com (mail-ed1-f68.google.com [209.85.208.68]) by mx.zohomail.com with SMTPS id 1607459865087493.94533756637054; Tue, 8 Dec 2020 12:37:45 -0800 (PST) Received: by mail-ed1-f68.google.com with SMTP id c7so18976876edv.6 for ; Tue, 08 Dec 2020 12:37:44 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (101.red-88-21-206.staticip.rima-tde.net. [88.21.206.101]) by smtp.gmail.com with ESMTPSA id x15sm17889483edj.91.2020.12.08.12.37.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Dec 2020 12:37:42 -0800 (PST) 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=5s+Pc76VS0giYYBfSeBqYRPzwDyC7ikS6JhKYOaNfSk=; b=gMSNM8+rP/wUen1Ewblxic202ImVW+lIq3zfHbQvRxm8HEKVxIgjht4/m9sWn/5p1M J6LhMeVw+f3yaf9Z0xOqeA1AVnvplBodNNMIK5d/Voa4JlFoyrAgySWE2YO5aKGpWMve 88kPhcOcT9WwocudpjqV9d4SUcWsp75naNdK2rHY9tcEFEgQdI8R4oUq3iw51SrZmTOD uCGd6e46uuR8P6Xut0muG3rpGaOcKxi1LMNyJ4g+CWH2n0uuOHjMcGTfRYdgBnJyA60d fY8dDH9lNtwx07y+SgGOTCnNaNzhx9ud+shI3MbR4S4EnFlMVGDFZ3nU50H8nwG92FG3 7e0w== 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=5s+Pc76VS0giYYBfSeBqYRPzwDyC7ikS6JhKYOaNfSk=; b=T6HUyQMxHlleKbMMLM1IkTRbbpod9xHZGLew8uPhAqweK2DoWENu7BScnICd40/A/V jEYCnDnWZMpvVkfBYAK+9ZqYgViaJxQo/PGCf3rFTGAOdrHkb2+JU8RulvSMLO15ArsK Arj0Yjd1css10xE4qPkrcTfjY8zCklIIa3LExDGgQpLfjuFEZq7LVidND8nFeNM6lAr5 lcpdqIlFoLYJTrAMeQKzwkluipQtl9C4OTEshlGUPDY5yZ5b0rruxtxlhbXjCCi0QmKX gIiODYVoEZG0Ew3IVPbN8GFNu7J1XvPcIxv12vO/lV0Oov8D8c8/sHcpv2SuCnpVj00j f+cA== X-Gm-Message-State: AOAM5311wVZId/Wvno2xtxz1KHmBugfcSVIZB/dP9ovxnpO9qyIZ0iT8 2CTn0co4GRFKc39Wn1KtEmg= X-Google-Smtp-Source: ABdhPJzbSylaj2ZjzVohbJDsLTirXN2tuFc4bOyEsBOPB0aij9iiPNZuBr8hCOdD8rXr6JF8NGa0Bw== X-Received: by 2002:a50:9310:: with SMTP id m16mr21869080eda.94.1607459863214; Tue, 08 Dec 2020 12:37:43 -0800 (PST) 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?= , Aurelien Jarno , Aleksandar Rikalo , Jiaxun Yang , Richard Henderson Subject: [PATCH 07/13] target/mips: Convert Rel6 COP1X opcode to decodetree Date: Tue, 8 Dec 2020 21:36:58 +0100 Message-Id: <20201208203704.243704-8-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201208203704.243704-1-f4bug@amsat.org> References: <20201208203704.243704-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) COP1x opcode has been removed from the Release 6. Add a single decodetree entry for it, triggering Reserved Instruction if ever used. Remove unreachable check_insn_opc_removed() call. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/mips/isa-mips32r6.decode | 2 ++ target/mips/translate.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/target/mips/isa-mips32r6.decode b/target/mips/isa-mips32r6.dec= ode index 259bac612ab..7b12a1bff25 100644 --- a/target/mips/isa-mips32r6.decode +++ b/target/mips/isa-mips32r6.decode @@ -16,4 +16,6 @@ =20 LSA 000000 ..... ..... ..... 000 .. 000101 @lsa =20 +REMOVED 010011 ----- ----- ----- ----- ------ # COP1X (COP3) + REMOVED 011100 ----- ----- ----- ----- ------ # SPECIAL2 diff --git a/target/mips/translate.c b/target/mips/translate.c index 788b5112a80..81ca1d45063 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -28874,7 +28874,6 @@ static void decode_opc(CPUMIPSState *env, DisasCont= ext *ctx) break; =20 case OPC_CP3: - check_insn_opc_removed(ctx, ISA_MIPS32R6); if (ctx->CP0_Config1 & (1 << CP0C1_FP)) { check_cp1_enabled(ctx); op1 =3D MASK_CP3(ctx->opcode); --=20 2.26.2 From nobody Tue May 21 15:01:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.208.68 as permitted sender) client-ip=209.85.208.68; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ed1-f68.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.208.68 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1607459870; cv=none; d=zohomail.com; s=zohoarc; b=cwAMnOpmhderoeizXds71jJnuvJ1rTy+I3fdw12JR6BmgWPutW76UNHW4sSZ8Vjlmg/tvZNFEILUHZ72MRCX0dKMVs50yaj6TxkOQSot89VAOTqyN6PljQFiYpERW+EbYnSsT49GiiyxotcGDcCw2bj9I4lt0je9aEkF4ctVEuw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607459870; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0z868/KbdDk2Xlh007u1U18hSib0SeCI76U0+Y0b5XM=; b=khSEEbE0PTFVeJgrblIjBqog/ySr/iRrd098rIzP9wRPtReEttlKySZ0mwWko4nmOP8fyYukyq7JSa44fZYLIwSpcVIudgSF+4yktJAkvaOMurRTWIJPp5ala9NUUTjvANIN0Zn0pcc9Keq19XjrmI2FwDtwhWvlwMZbxi09d/s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.208.68 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-ed1-f68.google.com (mail-ed1-f68.google.com [209.85.208.68]) by mx.zohomail.com with SMTPS id 1607459870144818.3894420340749; Tue, 8 Dec 2020 12:37:50 -0800 (PST) Received: by mail-ed1-f68.google.com with SMTP id c7so18977088edv.6 for ; Tue, 08 Dec 2020 12:37:49 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (101.red-88-21-206.staticip.rima-tde.net. [88.21.206.101]) by smtp.gmail.com with ESMTPSA id v2sm9475230ejq.109.2020.12.08.12.37.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Dec 2020 12:37:47 -0800 (PST) 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=0z868/KbdDk2Xlh007u1U18hSib0SeCI76U0+Y0b5XM=; b=Mij3zzPEiWTVyRfAz1dZRhxAJAUjpc94sNwFkJc2Qbp4XCJyd6SKeZhkzLaHCRDqod y6hmFcY0rbghCwvaqtLaYhtFJG/8gdwGd++ma3Erb3kX5QuvtjPcaZNenxmkA2Xxvxkb v/xHY2dNGb46LzE5j2SNK+KusYTJ6u98rg6j/mPrn1uFHTobxB5oM3QC+pBwW8Mh1zrR 15+52KM81Vzhraa4c/E8uvYc0QmT3g8CCuuKXT0VIShkCRf/zV7mdUUetH9p6soWNUi0 aMq5pk4+PCcj8owrtJc8imVKJvOZ3vJwnbTptHqial+4Z+HtHw2tGv5M0Hr2ZCcVhgtq bmhA== 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=0z868/KbdDk2Xlh007u1U18hSib0SeCI76U0+Y0b5XM=; b=dmKVOntnxwHVLDnY6c5yao4YCiJhBc/e+MFd+eeCK5iDJ5o6l3t/MYtPgLC2gVuWTR n4/2sldKJsTg5r6eccxNyLzuubDSFH+zMSb5KXd4LphYQlmDopEaR38j+m7guFMHOtGb cJGFmd8bruuBviDRhZYxhOnVGDm8b5p5+Trb/6KoHZvDXSvuCmOBagM8wbZmaxNg0Ofo FE+dQV1l1ygKxxgSlqrDWwLR8k2zZf1B67TBm1JLN2hIR7a9VdOWqhXGlBSwLNVnGjBK J7wsbIeWTsfkiMirq9PEWMfjRh9234EOLb2slsBWHhMK8sxsl0MEAZxh8J1hs9F/nVrQ nofw== X-Gm-Message-State: AOAM533SwSjlCv7iqCrV6BCoagplHhMzM1otpbuV4mfpu+S8UdPHC1dl ZTBoZtOMnlDJUZWR97tyxfI= X-Google-Smtp-Source: ABdhPJwp2liU+5QJaRAuh8gM4IaP2n3LoOxP8WFuAziirwd87L9HPNkg7g3lXZa1OjYnuBuEvpC8hw== X-Received: by 2002:a05:6402:1c8a:: with SMTP id cy10mr26202803edb.151.1607459868348; Tue, 08 Dec 2020 12:37:48 -0800 (PST) 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?= , Aurelien Jarno , Aleksandar Rikalo , Jiaxun Yang , Richard Henderson Subject: [PATCH 08/13] target/mips: Convert Rel6 CACHE/PREF opcodes to decodetree Date: Tue, 8 Dec 2020 21:36:59 +0100 Message-Id: <20201208203704.243704-9-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201208203704.243704-1-f4bug@amsat.org> References: <20201208203704.243704-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) CACHE/PREF opcodes have been removed from the Release 6. Add a single decodetree entry for the opcodes, triggering Reserved Instruction if ever used. Remove unreachable check_insn_opc_removed() calls. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/mips/isa-mips32r6.decode | 3 +++ target/mips/translate.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/target/mips/isa-mips32r6.decode b/target/mips/isa-mips32r6.dec= ode index 7b12a1bff25..e3b3934539a 100644 --- a/target/mips/isa-mips32r6.decode +++ b/target/mips/isa-mips32r6.decode @@ -19,3 +19,6 @@ LSA 000000 ..... ..... ..... 000 .. 00010= 1 @lsa REMOVED 010011 ----- ----- ----- ----- ------ # COP1X (COP3) =20 REMOVED 011100 ----- ----- ----- ----- ------ # SPECIAL2 + +REMOVED 101111 ----- ----- ---------------- # CACHE +REMOVED 110011 ----- ----- ---------------- # PREF diff --git a/target/mips/translate.c b/target/mips/translate.c index 81ca1d45063..ba1b2360c50 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -28667,7 +28667,6 @@ static void decode_opc(CPUMIPSState *env, DisasCont= ext *ctx) gen_st_cond(ctx, rt, rs, imm, MO_TESL, false); break; case OPC_CACHE: - check_insn_opc_removed(ctx, ISA_MIPS32R6); check_cp0_enabled(ctx); check_insn(ctx, ISA_MIPS3 | ISA_MIPS32); if (ctx->hflags & MIPS_HFLAG_ITC_CACHE) { @@ -28676,7 +28675,6 @@ static void decode_opc(CPUMIPSState *env, DisasCont= ext *ctx) /* Treat as NOP. */ break; case OPC_PREF: - check_insn_opc_removed(ctx, ISA_MIPS32R6); if (ctx->insn_flags & INSN_R5900) { /* Treat as NOP. */ } else { --=20 2.26.2 From nobody Tue May 21 15:01:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.208.68 as permitted sender) client-ip=209.85.208.68; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ed1-f68.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.208.68 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail(p=none dis=none) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1607459876; cv=none; d=zohomail.com; s=zohoarc; b=EEVoKTc4KuxSQ1w/Wc84ICVUosfdIOSeDNjfAHf8z0T3BCluMdo5r19EMtO7bVTCXeM6DUI7a6B9x0eiHK6yrtQgsNbzB/IuV2MQygqTx1V050iB+tmr1GMUIm4fMB9O9C8+EGYRQBe0KcSBbKh7Gp6eGFtpl9JZYcj6jv5eZMk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607459876; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SlFjvECHfYONeGG1DJEI60MK1sieFoR6zYz7WG0U29k=; b=WR7cQf4S6hAUyY4JOekv68A+K3vKPjoS6r3f4F48aSm/uw91ur2UBneMU6BigCVBDoW4qBVJ8+USSltU1QyMZoP8AkmfKXLui2ixH+AacEb5VBJOTQd90fVe5VTwqj9LFpY41QCt/naf6XXUZ3ve1AlttAWuBgWy1yXsWM4kOpQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.208.68 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail-ed1-f68.google.com (mail-ed1-f68.google.com [209.85.208.68]) by mx.zohomail.com with SMTPS id 1607459876307138.07289047752056; Tue, 8 Dec 2020 12:37:56 -0800 (PST) Received: by mail-ed1-f68.google.com with SMTP id b73so18953811edf.13 for ; Tue, 08 Dec 2020 12:37:54 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (101.red-88-21-206.staticip.rima-tde.net. [88.21.206.101]) by smtp.gmail.com with ESMTPSA id a20sm18394661edr.70.2020.12.08.12.37.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Dec 2020 12:37:52 -0800 (PST) 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=SlFjvECHfYONeGG1DJEI60MK1sieFoR6zYz7WG0U29k=; b=H4kIOBkxdEcBrao0pDtEFNW7Vtqj/Tf2pDzep2KuzyibDrmRC3Um8NRqNEAKKtkY4a lf1NA5braxxGX2j1Cgf3yqMATGZsA7fNw6b26Et7+QbmmQJh1Kt0QOexA3UPgupl6j0P wszcDI1g4QCuwba5p6krxHYWXSz1sIl3Ft9ZdXo7VI9xVQLzzLWZqm2xmaPQpZ+HMKOt LhaXOhNsnjWhGXcvgOJcGNjwUubY7X/CKbBTIClcJtuFlMXrZ1jLU4JpW6Pa0wLhOKBU eP2k/IZYpoA2rKpPzDueKTfKXRH7Ia96PC8rx7jW26JUyfgHEkP4+vH5C7zk+XzBQGkE /xmQ== 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=SlFjvECHfYONeGG1DJEI60MK1sieFoR6zYz7WG0U29k=; b=Y6w+lh8kSMMH2qEBwSRtlb1p557IyYC3i9eIB4QMnVTVId5rcL9BSLukhj9CMO2tsQ AAq6HolZnBjzyFDTAvkS4depXgdfzsZ8zlnH1SN4jS4sCarKSi413NX6mBAIlpW0Iued b+VWNl9p8EDTlhN7XPn21TT2HXsNbrePUY7e1nKFuW5kNXM2MiE+rv8bobqJ0UlVo7jB xqn/baDRSj3tFumrzDks7TEgmZBYgvyUarandu8Q0HdIclW7scO/9KKa1Nt13liqpfT0 r3t3uO6999lU3brMek8sS5+Okd5WfpgacJAFWQAmbZiNMGLbrq5D5AFtJuT59QNpmcs3 fXVw== X-Gm-Message-State: AOAM5338OFZiiQAsWwf4OELqJIUridF35YTBrkyEED6LfuaWxNPHXDnY g4kLbLJjSROwqyU8t6bxjc0= X-Google-Smtp-Source: ABdhPJwwx577N23c7DE8BfEco72P9/KXXJCwGdHNUEmQZVSJ3RN+ni63kxpmDLwE9/RWstmm7OkU6w== X-Received: by 2002:a05:6402:1a2f:: with SMTP id be15mr26330175edb.209.1607459873555; Tue, 08 Dec 2020 12:37:53 -0800 (PST) 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?= , Aurelien Jarno , Aleksandar Rikalo , Jiaxun Yang , Richard Henderson Subject: [PATCH 09/13] target/mips: Convert Rel6 LWL/LWR/SWL/SWR opcodes to decodetree Date: Tue, 8 Dec 2020 21:37:00 +0100 Message-Id: <20201208203704.243704-10-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201208203704.243704-1-f4bug@amsat.org> References: <20201208203704.243704-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) LWL/LWR/SWL/SWR opcodes have been removed from the Release 6. Add a single decodetree entry for the opcodes, triggering Reserved Instruction if ever used. Remove unreachable check_insn_opc_removed() calls. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/mips/isa-mips32r6.decode | 5 +++++ target/mips/translate.c | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/target/mips/isa-mips32r6.decode b/target/mips/isa-mips32r6.dec= ode index e3b3934539a..89a0085fafd 100644 --- a/target/mips/isa-mips32r6.decode +++ b/target/mips/isa-mips32r6.decode @@ -20,5 +20,10 @@ REMOVED 010011 ----- ----- ----- ----- -----= - # COP1X (COP3) =20 REMOVED 011100 ----- ----- ----- ----- ------ # SPECIAL2 =20 +REMOVED 100010 ----- ----- ---------------- # LWL +REMOVED 100110 ----- ----- ---------------- # LWR +REMOVED 101010 ----- ----- ---------------- # SWL +REMOVED 101110 ----- ----- ---------------- # SWR + REMOVED 101111 ----- ----- ---------------- # CACHE REMOVED 110011 ----- ----- ---------------- # PREF diff --git a/target/mips/translate.c b/target/mips/translate.c index ba1b2360c50..3d627d049bd 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -28636,11 +28636,10 @@ static void decode_opc(CPUMIPSState *env, DisasCo= ntext *ctx) if (ctx->insn_flags & INSN_R5900) { check_insn_opc_user_only(ctx, INSN_R5900); } + check_insn_opc_removed(ctx, ISA_MIPS32R6); /* Fallthrough */ case OPC_LWL: case OPC_LWR: - check_insn_opc_removed(ctx, ISA_MIPS32R6); - /* Fallthrough */ case OPC_LB: case OPC_LH: case OPC_LW: @@ -28651,8 +28650,6 @@ static void decode_opc(CPUMIPSState *env, DisasCont= ext *ctx) break; case OPC_SWL: case OPC_SWR: - check_insn_opc_removed(ctx, ISA_MIPS32R6); - /* fall through */ case OPC_SB: case OPC_SH: case OPC_SW: --=20 2.26.2 From nobody Tue May 21 15:01:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.218.66 as permitted sender) client-ip=209.85.218.66; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-f66.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.218.66 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1607459880; cv=none; d=zohomail.com; s=zohoarc; b=GhRnX3xTKLmxgQ27DXp3kuv0uWVgWpdTW0dFN6oV5e32nfVrRDRigF/co0UfArPywC51kZr1g9VszL077dI8wN3gC2s/rMKRrGNE985RIn6a6oitDe5e/qfmZIoe2r40p2Ops3xPY9ii8CzT+7ZI9TmpL34+Wfnm5tAAYd2D6JE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607459880; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pIE6QL/3ZrCWRHDkFodb06bhSEToQGsTaRc21NwMK7M=; b=M5ekWNr3vTkEObR6xeFodjI8PMnwWcwht3pvOoWpv1DjYHuHkkXRQkaLHbSSLDR8OoKtibiHpxozGxRkjfmzxRCRh545MN19Lmg7YE1YsJeaanFWglcQXWlLqYHaoFJbSRw21ySBP0SdcHeeidWIdwfRasMIlGvJXUnK9+JAEiI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.218.66 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-ej1-f66.google.com (mail-ej1-f66.google.com [209.85.218.66]) by mx.zohomail.com with SMTPS id 1607459880605444.43841536878506; Tue, 8 Dec 2020 12:38:00 -0800 (PST) Received: by mail-ej1-f66.google.com with SMTP id m19so26485270ejj.11 for ; Tue, 08 Dec 2020 12:38:00 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (101.red-88-21-206.staticip.rima-tde.net. [88.21.206.101]) by smtp.gmail.com with ESMTPSA id v16sm17979144eds.64.2020.12.08.12.37.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Dec 2020 12:37:58 -0800 (PST) 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=pIE6QL/3ZrCWRHDkFodb06bhSEToQGsTaRc21NwMK7M=; b=YKVzhYcZrzYLYVLQEu4+x3AoTpb6FtAWVcdCCseuaSoWMHW4FU8FGJsQzTzzRRCl12 3pLiVOOVqIuk17JcsZorwQ5A/xtrJcBFYlpRJ1v6ytMQ84fa+dj//2YSr3q8uSJIZCNP 1jEWILdyITh1eb88cKN1guJJi71g/GNbOUReUel8JdGYeRrvqW8jNbxZrIsxdVKQ7jFX qGRb6SBygBkyqzmaGK4beDY52rF28wOpNk0nd38vkYN6g0Lp08ZenIp0pqYJ90JakEC5 zWvBfgVnQ5UYy99CSeSGniQypBgEQq2Umu5IY5yGtbAGwTjyFcK55L549wyefIFnniUf YhEg== 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=pIE6QL/3ZrCWRHDkFodb06bhSEToQGsTaRc21NwMK7M=; b=jiekMwkC35hRtB99Nx8sa0AN/G2Lg/4fA6bkj2wFLesVq68b+AaMiqMixHAlsh+mwk mrO7SrARNFxR1B8dIZI84ipr5KHbKiTHmoctBru6HGopLOHOAP+0yffSVcAyOGe+xu+v yasBkLEsFq+sZuRncYzN03A//b0CO+GJrMkr89Ao+7GuN0D9DeewKLTuZK922MHNbXUo onVKyHoinOPAPVtDcT9PT8bt7KLOGJSjaBhFaVw8S96Rb2ldLJZne3pLgqjPwdvfApIY 0S9enRbw3OKfCLEHykHs9rNsoI0GiZ+6SpomqP5GXlvv5b5CQ0axywwGJKH6ipq+jAxA PQ6Q== X-Gm-Message-State: AOAM531TNKXBY2rTLb/TGJh47uMs7Gs5qP+skDBY2YJeWa56YbO2WtKh bVU8zmNVwFCleT+p0eZfqys= X-Google-Smtp-Source: ABdhPJyRDnog8ai539uCRXwjdkUqNGuXdi6aUrfgv+r+6mh+sbq8d7/JXip38lLzq+CEV3HIvHezVQ== X-Received: by 2002:a17:906:d9cf:: with SMTP id qk15mr25678405ejb.453.1607459878825; Tue, 08 Dec 2020 12:37:58 -0800 (PST) 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?= , Aurelien Jarno , Aleksandar Rikalo , Jiaxun Yang , Richard Henderson Subject: [PATCH 10/13] target/mips: Convert Rel6 LWLE/LWRE/SWLE/SWRE opcodes to decodetree Date: Tue, 8 Dec 2020 21:37:01 +0100 Message-Id: <20201208203704.243704-11-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201208203704.243704-1-f4bug@amsat.org> References: <20201208203704.243704-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) LWLE/LWRE/SWLE/SWRE (EVA) opcodes have been removed from the Release 6. Add a single decodetree entry for the opcodes, triggering Reserved Instruction if ever used. Remove unreachable check_insn_opc_removed() calls. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/mips/isa-mips32r6.decode | 5 +++++ target/mips/translate.c | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/target/mips/isa-mips32r6.decode b/target/mips/isa-mips32r6.dec= ode index 89a0085fafd..3ec50704cf2 100644 --- a/target/mips/isa-mips32r6.decode +++ b/target/mips/isa-mips32r6.decode @@ -20,6 +20,11 @@ REMOVED 010011 ----- ----- ----- ----- -----= - # COP1X (COP3) =20 REMOVED 011100 ----- ----- ----- ----- ------ # SPECIAL2 =20 +REMOVED 011111 ----- ----- ---------- 011001 # LWLE +REMOVED 011111 ----- ----- ---------- 011010 # LWRE +REMOVED 011111 ----- ----- ---------- 100001 # SWLE +REMOVED 011111 ----- ----- ---------- 100010 # SWRE + REMOVED 100010 ----- ----- ---------------- # LWL REMOVED 100110 ----- ----- ---------------- # LWR REMOVED 101010 ----- ----- ---------------- # SWL diff --git a/target/mips/translate.c b/target/mips/translate.c index 3d627d049bd..962522b0e02 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -28130,8 +28130,6 @@ static void decode_opc_special3(CPUMIPSState *env, = DisasContext *ctx) switch (op1) { case OPC_LWLE: case OPC_LWRE: - check_insn_opc_removed(ctx, ISA_MIPS32R6); - /* fall through */ case OPC_LBUE: case OPC_LHUE: case OPC_LBE: @@ -28143,8 +28141,6 @@ static void decode_opc_special3(CPUMIPSState *env, = DisasContext *ctx) return; case OPC_SWLE: case OPC_SWRE: - check_insn_opc_removed(ctx, ISA_MIPS32R6); - /* fall through */ case OPC_SBE: case OPC_SHE: case OPC_SWE: --=20 2.26.2 From nobody Tue May 21 15:01:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.218.65 as permitted sender) client-ip=209.85.218.65; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-f65.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.218.65 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1607459885; cv=none; d=zohomail.com; s=zohoarc; b=UwNTA8FDnZuACcfnotUsNfBNpfHRoSYWDBuyFzXh/6GFYpz99yT8qP9yArUUY4jLz6q5UK4DnlLdLq1tLSI/oE6xbSGApMR9haEBFV1vwXJhOLh/saZtI+LirRHUXh3taThjF1fk9xhKDtPmVdOVAjHXr51Samuf/3gkJ8v1AEw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607459885; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1k4PcQljQCh2DE9iUcnW2jkPRc+bb/o9XTSTkfgV9ik=; b=RwO8MvaTRcbA/Hlmtxgn60fbT567V4Vi5rlNmLSWHRDGo3Qnj+4VUJDMIU9WNEIDwJ1bjH1yzN/wpMfPU6lR9ceyqkqus4YE4buKUnc+Khj1N6Akn2hou72o9JfKFRSmgyWAcDhihrXbZmsA9frg62MuRSAnCBXG2bcqwXoDeIo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.218.65 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-ej1-f65.google.com (mail-ej1-f65.google.com [209.85.218.65]) by mx.zohomail.com with SMTPS id 1607459885836360.98875972340704; Tue, 8 Dec 2020 12:38:05 -0800 (PST) Received: by mail-ej1-f65.google.com with SMTP id a16so26546420ejj.5 for ; Tue, 08 Dec 2020 12:38:05 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (101.red-88-21-206.staticip.rima-tde.net. [88.21.206.101]) by smtp.gmail.com with ESMTPSA id u3sm16446589eje.33.2020.12.08.12.38.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Dec 2020 12:38:03 -0800 (PST) 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=1k4PcQljQCh2DE9iUcnW2jkPRc+bb/o9XTSTkfgV9ik=; b=rEe0j+mHascWJHV81ahNxSrjSaOo6r9HobqLDIZBML7I5TDdk4mgV2vfZ5hCaPlaBm TEb9rmXcOQBO/fk+L9ig9C45geG4DCCLhz50J3jYNo7WAgA6iofFBhuTOKbE5g9gxq9f svGgODT7RsJly7e5VGAgOwTf/aJHDVT6uZC+JczzeiBfGN8DCCN7ll2l9bfcRcaTwwRa k3VvqUyOEvgp10TmjSGYZcNpVxaOfbBfs02VIEvEjRqqp1Qjc/CwiJRq8kEPUrGvarOb o15o6LtEynlHnuFEiG6/GLanB0chD+c+yX7Obng7AI5ppAauB0/6kNTBXvAEEest21Ql sSZg== 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=1k4PcQljQCh2DE9iUcnW2jkPRc+bb/o9XTSTkfgV9ik=; b=WRxEswIiJhYjYCpXJYW2qSlkheYLLWvvrWdGnpHveEmKFuxAsC6Bl9c9Ta/b/QNMvj yX8KDBjshQwwd14gYnha6C45ruHQPdP4mQYjjJKO313psTwIHfNJzNKigalXn0y6gCrE qGADKn1+QFc1yRhSErVvnZrH4yXNuYDw/FzmUWGoINHFTI1cGazxoVsjOxDcQ6MDwuEB 2EVxEmPOvyun6Jlgq/pyyS9KdYXv4bsIUnih6spPbox5tVCttDfjA0fXWO64nAlCfyOt UJjPwijrvomMCoruW09+eSrt/FBU6miezYRlIx4XVDxaWLKpI1RFZCORvC6l3QycNNzS 3Lgg== X-Gm-Message-State: AOAM532ZUFwiBzjCH+06NAqctVjbeZYapTZei23yxDLxRs8OO9/bEVCL aku4CwMyrqFbVOGvwCgjHok= X-Google-Smtp-Source: ABdhPJzBcXz9ip5vjQq810uRM8Fo20Voc4grUCoOG7daHdBkjI2IUBCV5LLaIp2lZMzFqAKQmvpVVg== X-Received: by 2002:a17:906:b306:: with SMTP id n6mr24140705ejz.473.1607459883998; Tue, 08 Dec 2020 12:38:03 -0800 (PST) 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?= , Aurelien Jarno , Aleksandar Rikalo , Jiaxun Yang , Richard Henderson Subject: [PATCH 11/13] target/mips: Convert Rel6 LDL/LDR/SDL/SDR opcodes to decodetree Date: Tue, 8 Dec 2020 21:37:02 +0100 Message-Id: <20201208203704.243704-12-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201208203704.243704-1-f4bug@amsat.org> References: <20201208203704.243704-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) LDL/LDR/SDL/SDR opcodes have been removed from the Release 6. Add a single decodetree entry for the opcodes, triggering Reserved Instruction if ever used. Remove unreachable check_insn_opc_removed() calls. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/mips/isa-mips64r6.decode | 6 ++++++ target/mips/translate.c | 5 +---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/target/mips/isa-mips64r6.decode b/target/mips/isa-mips64r6.dec= ode index e812224341e..8c3fc5dae9c 100644 --- a/target/mips/isa-mips64r6.decode +++ b/target/mips/isa-mips64r6.decode @@ -10,8 +10,14 @@ # (Document Number: MD00087-2B-MIPS64BIS-AFP-6.06) # =20 +&REMOVED !extern &lsa rd rt rs sa !extern =20 @lsa ...... rs:5 rt:5 rd:5 ... sa:2 ...... &lsa =20 DLSA 000000 ..... ..... ..... 000 .. 010101 @lsa + +REMOVED 011010 ----- ----- ---------------- # LDL +REMOVED 011011 ----- ----- ---------------- # LDR +REMOVED 101100 ----- ----- ---------------- # SDL +REMOVED 101101 ----- ----- ---------------- # SDR diff --git a/target/mips/translate.c b/target/mips/translate.c index 962522b0e02..aeba8efeb17 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -28918,11 +28918,10 @@ static void decode_opc(CPUMIPSState *env, DisasCo= ntext *ctx) if (ctx->insn_flags & INSN_R5900) { check_insn_opc_user_only(ctx, INSN_R5900); } + check_insn_opc_removed(ctx, ISA_MIPS32R6); /* fall through */ case OPC_LDL: case OPC_LDR: - check_insn_opc_removed(ctx, ISA_MIPS32R6); - /* fall through */ case OPC_LWU: case OPC_LD: check_insn(ctx, ISA_MIPS3); @@ -28931,8 +28930,6 @@ static void decode_opc(CPUMIPSState *env, DisasCont= ext *ctx) break; case OPC_SDL: case OPC_SDR: - check_insn_opc_removed(ctx, ISA_MIPS32R6); - /* fall through */ case OPC_SD: check_insn(ctx, ISA_MIPS3); check_mips_64(ctx); --=20 2.26.2 From nobody Tue May 21 15:01:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.218.65 as permitted sender) client-ip=209.85.218.65; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-f65.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.218.65 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1607459890; cv=none; d=zohomail.com; s=zohoarc; b=WyK0CR8GAHLqG21ef3zuGTfur6ORp6b3avWwLSSYYV8vnhSOhwF3T9zE29p8PswDs3vb6v/sVhY1k71ikRM9cE21lOTJuV9il7fTBbiVcOjwDrwXjhLh1iHR7/RNfJXxFkZ5x0Y5F9SrEkKJnRjqJ+kRD9Izgib5T6EYEqeGdPM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607459890; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=RX7vZR6NmEoSxmyjaPaQ8kLGatYp3mbCez7jAhGtSPk=; b=VPdC+Khz2GKUApd3pMNjWlB6IeG1IHGBbugvAsK+3wpwCVV5QHKqTHeqRdjCOcg8jIoLY/Jjarx1zj0Tt6ZNvhzZGupzC5OKlxcS/PZ3EHWH/1PAiRzdhGjHTFuVCQKoYhknz5qTnzLNSTu4KtUm5LVKfHZHvm6Hmbde1KoP4kc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.218.65 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-ej1-f65.google.com (mail-ej1-f65.google.com [209.85.218.65]) by mx.zohomail.com with SMTPS id 1607459890890878.6128553376767; Tue, 8 Dec 2020 12:38:10 -0800 (PST) Received: by mail-ej1-f65.google.com with SMTP id g20so26585361ejb.1 for ; Tue, 08 Dec 2020 12:38:10 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (101.red-88-21-206.staticip.rima-tde.net. [88.21.206.101]) by smtp.gmail.com with ESMTPSA id m7sm17411451eji.118.2020.12.08.12.38.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Dec 2020 12:38:08 -0800 (PST) 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=RX7vZR6NmEoSxmyjaPaQ8kLGatYp3mbCez7jAhGtSPk=; b=KrhVvzw5GZmr0NvJdaGuhbYl5CwAwoFnxe3iFmxw1EDRZdR7neubAUypRhFvgCjHTT 0rJN8hFmk4OTBNmYDrf0Ll3OIOspPvWreAOZzOiSOf5D5y477QOvMv/ShjTylQb6/QkT xAprVbJ4yEy5N86cPboV3YA/AGfI2R2qluenL8PsyHbchWRSPfzwGAMILiywooNQYRBm vx5H2f2VE+r8zOd9QzoqvXTwimkO1U68HaMajSDJ0ywlCm0IqWmJ6mpFudZV993sQwGX o2QIOEPPKGZvX9/GaQY5QoBqkBsREdqw2Q1bfZ/8ar2hp3D03YBbbZ23ZjVoyJv8it9K UnGw== 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=RX7vZR6NmEoSxmyjaPaQ8kLGatYp3mbCez7jAhGtSPk=; b=akaaGb4KWSu8UIZ6kTaOdpKK7f+3lVycXAhMc3e8aXgkeOxfT2Ke+xv7fNynOkE4qG y3+Xb8h6J2D9bxndss7c2YL7mguM1G/XF2aS8iUFZOd+h5gyethSAxiBC/Gi9X7zismJ Oly+j0/sYem4TKOc9Qjgicndlagk562Pe17FQKJlzStXG1oebrfQ57AVC7bFhGy45wXp u/6bAOaWEd6ROgpi2DgLCuVZZeREXUzLLKr1np7KOc+02UiDZeD5U7dzp7SSUzO193JE 354IVXCa7A8z9vpVRtC16gjQCxMdPghT3ueFzUFVVp2XOxx6V5tJI0CdO8dLI6RCnK2X p+FQ== X-Gm-Message-State: AOAM5315I7MQLTmTQUUDtuP61GJSQZnbk3iuQt6xucPClQQNrkju3X9O SW9R0ps7A544XHAuDgKZrXA= X-Google-Smtp-Source: ABdhPJxtteNaPyGqVvf7sPNrv9mnhdrN9AEXbFGZB/FfhVzYcDaDx8vuK6/lw689zkgQVbkxvJgmag== X-Received: by 2002:a17:907:28d4:: with SMTP id en20mr25079744ejc.196.1607459889128; Tue, 08 Dec 2020 12:38:09 -0800 (PST) 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?= , Aurelien Jarno , Aleksandar Rikalo , Jiaxun Yang , Richard Henderson Subject: [PATCH 12/13] target/mips: Convert Rel6 LLD/SCD opcodes to decodetree Date: Tue, 8 Dec 2020 21:37:03 +0100 Message-Id: <20201208203704.243704-13-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201208203704.243704-1-f4bug@amsat.org> References: <20201208203704.243704-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) LLD/SCD opcodes have been removed from the Release 6. Add a single decodetree entry for the opcodes, triggering Reserved Instruction if ever used. Remove unreachable check_insn_opc_removed() calls. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/mips/isa-mips64r6.decode | 3 +++ target/mips/translate.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/target/mips/isa-mips64r6.decode b/target/mips/isa-mips64r6.dec= ode index 8c3fc5dae9c..609b8958d25 100644 --- a/target/mips/isa-mips64r6.decode +++ b/target/mips/isa-mips64r6.decode @@ -21,3 +21,6 @@ REMOVED 011010 ----- ----- ---------------- = # LDL REMOVED 011011 ----- ----- ---------------- # LDR REMOVED 101100 ----- ----- ---------------- # SDL REMOVED 101101 ----- ----- ---------------- # SDR + +REMOVED 110100 ----- ----- ---------------- # LLD +REMOVED 111100 ----- ----- ---------------- # SCD diff --git a/target/mips/translate.c b/target/mips/translate.c index aeba8efeb17..009301c9ceb 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -28918,7 +28918,6 @@ static void decode_opc(CPUMIPSState *env, DisasCont= ext *ctx) if (ctx->insn_flags & INSN_R5900) { check_insn_opc_user_only(ctx, INSN_R5900); } - check_insn_opc_removed(ctx, ISA_MIPS32R6); /* fall through */ case OPC_LDL: case OPC_LDR: @@ -28936,7 +28935,6 @@ static void decode_opc(CPUMIPSState *env, DisasCont= ext *ctx) gen_st(ctx, op, rt, rs, imm); break; case OPC_SCD: - check_insn_opc_removed(ctx, ISA_MIPS32R6); check_insn(ctx, ISA_MIPS3); if (ctx->insn_flags & INSN_R5900) { check_insn_opc_user_only(ctx, INSN_R5900); --=20 2.26.2 From nobody Tue May 21 15:01:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.208.67 as permitted sender) client-ip=209.85.208.67; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ed1-f67.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.208.67 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1607459896; cv=none; d=zohomail.com; s=zohoarc; b=T0r7R6F+aWMSQ5yLxwBYYtARSDL7+9TL1Etrc+U0ynmIqNJIQwNX+k/JKhwU/51fprOc6TqJKmWHTYfj/F5CBVS24SQxjpOrIWKwtkqSqcXzc2eK0A6tArZAZHIy8CI3Wqlb3xBESI6Qq7cnaLg820e9VrzgDSDUR54Dld0y8kE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607459896; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uGmxq2xzRtTYRUJyvWqJtHGIaXfE5t1ze+OMIppltBo=; b=P28tfo3VwE22DTK50wTiN8KhzVnECl2N0wAplKRiEyMFCh505b6xyG9A6gxMS5MGFYiROzLrW+gnaLcuZoMxB/6W/GSU/sDqZy/k/C3FzgJrRBb2Om1tR+OQAef94D6rzUEOUZZWItX8dA3lunKixhGaM8A2lbprcyINZNqXbco= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.208.67 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-ed1-f67.google.com (mail-ed1-f67.google.com [209.85.208.67]) by mx.zohomail.com with SMTPS id 16074598960949.008105727714224; Tue, 8 Dec 2020 12:38:16 -0800 (PST) Received: by mail-ed1-f67.google.com with SMTP id h16so7676117edt.7 for ; Tue, 08 Dec 2020 12:38:15 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (101.red-88-21-206.staticip.rima-tde.net. [88.21.206.101]) by smtp.gmail.com with ESMTPSA id x6sm344411edl.67.2020.12.08.12.38.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Dec 2020 12:38:13 -0800 (PST) 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=uGmxq2xzRtTYRUJyvWqJtHGIaXfE5t1ze+OMIppltBo=; b=QelRjUSJV+xeneYtpREupdVGxwtYfBA/LFwifkTUNVBHNFI0LsEbD06qHdgM+lWTsw +Qf4RbfFCF5DJcyLy3E6di5s9aEXqKtSIBCU6Piix6451ixUlm1Yo/hTS4e8U329xpTS 5jvhkKAPBdQTC/K6NCjb33AVdlzDSHWtjl6zmiS5kqExkxGkXY5JCPfSvPdwPFmkR2CD oUu5+nJQqSamggxDKhSlWQJBnwxQkcpRzS042MzqIuASWqfpoo1XQ8SEAaPeKSvM0uLK sPgo2SF9jsMy4z9xQnN0P0ixJ48gDiQi1jAquJ6Pu52tc/8uA5SpsYvpI8lhAlwy5OKv md/g== 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=uGmxq2xzRtTYRUJyvWqJtHGIaXfE5t1ze+OMIppltBo=; b=dxhTskCyWqO/EuPDIqww3zfgb2KtynXUPHb5D1aEua87lSXMZq49rh3xIfGuBzmQh6 qdJU4SEpDOJF1evwrqOTelXxbYwOVffpeddRFWG2W3R592On+i0OnjCpmjA3XV7f4r3X epFSo7MhYf3n9LvkTklmLtV8LOVVHeeoAp1oqAr30b4aBR00TV8L0yKw/jWjjsP7lk2q ndk/RZYzonzY/HT5XGlKK/4waM3AdUO58ezdqS/QsMnzHVI9OnejJaL2pFW+IQ8muTJu TxTwBiqEGnEnB0+g7Msqq/W33EMdq5k/unGerqHEHq8hgM7YPhR/0ol1syZKEPKHfsD4 ChGg== X-Gm-Message-State: AOAM531Xg7bcfgJEoq1KG2+gY0+zBlqaBvZbAiRbR9JJSaNo0iUJPHe0 4cTazxzMh4cX6Bkq9zHhWeY= X-Google-Smtp-Source: ABdhPJx70D7BRNckR2uVvsAKvVCnqMqmQrZDYnko37NiuV3II0GXFmpbf7YX3krNjgke3EOycN897Q== X-Received: by 2002:a50:e0c9:: with SMTP id j9mr26153237edl.380.1607459894258; Tue, 08 Dec 2020 12:38:14 -0800 (PST) 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?= , Aurelien Jarno , Aleksandar Rikalo , Jiaxun Yang , Richard Henderson Subject: [PATCH 13/13] target/mips: Convert Rel6 LL/SC opcodes to decodetree Date: Tue, 8 Dec 2020 21:37:04 +0100 Message-Id: <20201208203704.243704-14-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201208203704.243704-1-f4bug@amsat.org> References: <20201208203704.243704-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) LL/SC opcodes have been removed from the Release 6. Add a single decodetree entry for the opcodes, triggering Reserved Instruction if ever used. Remove unreachable check_insn_opc_removed() calls. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/mips/isa-mips32r6.decode | 2 ++ target/mips/translate.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/mips/isa-mips32r6.decode b/target/mips/isa-mips32r6.dec= ode index 3ec50704cf2..489c20aa4e9 100644 --- a/target/mips/isa-mips32r6.decode +++ b/target/mips/isa-mips32r6.decode @@ -31,4 +31,6 @@ REMOVED 101010 ----- ----- ---------------- = # SWL REMOVED 101110 ----- ----- ---------------- # SWR =20 REMOVED 101111 ----- ----- ---------------- # CACHE +REMOVED 110000 ----- ----- ---------------- # LL REMOVED 110011 ----- ----- ---------------- # PREF +REMOVED 111000 ----- ----- ---------------- # SC diff --git a/target/mips/translate.c b/target/mips/translate.c index 009301c9ceb..90a6dfcd2b3 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -28632,7 +28632,6 @@ static void decode_opc(CPUMIPSState *env, DisasCont= ext *ctx) if (ctx->insn_flags & INSN_R5900) { check_insn_opc_user_only(ctx, INSN_R5900); } - check_insn_opc_removed(ctx, ISA_MIPS32R6); /* Fallthrough */ case OPC_LWL: case OPC_LWR: @@ -28653,7 +28652,6 @@ static void decode_opc(CPUMIPSState *env, DisasCont= ext *ctx) break; case OPC_SC: check_insn(ctx, ISA_MIPS2); - check_insn_opc_removed(ctx, ISA_MIPS32R6); if (ctx->insn_flags & INSN_R5900) { check_insn_opc_user_only(ctx, INSN_R5900); } --=20 2.26.2