From: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
To: qemu-devel@nongnu.org
Cc: kbastian@mail.uni-paderborn.de
Subject: [PATCH 2/6] target/tricore: Add popcnt.w insn
Date: Sat, 10 Jun 2023 12:55:43 +0200 [thread overview]
Message-ID: <20230610105547.159148-3-kbastian@mail.uni-paderborn.de> (raw)
In-Reply-To: <20230610105547.159148-1-kbastian@mail.uni-paderborn.de>
Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
---
target/tricore/translate.c | 7 +++++++
target/tricore/tricore-opcodes.h | 1 +
2 files changed, 8 insertions(+)
diff --git a/target/tricore/translate.c b/target/tricore/translate.c
index cd33a1dcdd..26b284bcec 100644
--- a/target/tricore/translate.c
+++ b/target/tricore/translate.c
@@ -6197,6 +6197,13 @@ static void decode_rr_divide(DisasContext *ctx)
generate_trap(ctx, TRAPC_INSN_ERR, TIN2_IOPC);
}
break;
+ case OPC2_32_RR_POPCNT_W:
+ if (has_feature(ctx, TRICORE_FEATURE_162)) {
+ tcg_gen_ctpop_tl(cpu_gpr_d[r3], cpu_gpr_d[r1]);
+ } else {
+ generate_trap(ctx, TRAPC_INSN_ERR, TIN2_IOPC);
+ }
+ break;
case OPC2_32_RR_DIV:
if (has_feature(ctx, TRICORE_FEATURE_16)) {
GEN_HELPER_RR(divide, cpu_gpr_d[r3], cpu_gpr_d[r3+1], cpu_gpr_d[r1],
diff --git a/target/tricore/tricore-opcodes.h b/target/tricore/tricore-opcodes.h
index f7135f183d..59aa39a7a5 100644
--- a/target/tricore/tricore-opcodes.h
+++ b/target/tricore/tricore-opcodes.h
@@ -1133,6 +1133,7 @@ enum {
OPC2_32_RR_PARITY = 0x02,
OPC2_32_RR_UNPACK = 0x08,
OPC2_32_RR_CRC32 = 0x03,
+ OPC2_32_RR_POPCNT_W = 0x22, /* 1.6.2 only */
OPC2_32_RR_DIV = 0x20,
OPC2_32_RR_DIV_U = 0x21,
OPC2_32_RR_MUL_F = 0x04,
--
2.40.1
next prev parent reply other threads:[~2023-06-10 10:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-10 10:55 [PATCH 0/6] TriCore 1.6.2 Instructions Bastian Koppelmann
2023-06-10 10:55 ` [PATCH 1/6] target/tricore: Introduce ISA 1.6.2 feature Bastian Koppelmann
2023-06-10 14:57 ` Richard Henderson
2023-06-10 10:55 ` Bastian Koppelmann [this message]
2023-06-10 14:58 ` [PATCH 2/6] target/tricore: Add popcnt.w insn Richard Henderson
2023-06-10 10:55 ` [PATCH 3/6] target/tricore: Add LHA insn Bastian Koppelmann
2023-06-10 15:14 ` Richard Henderson
2023-06-10 10:55 ` [PATCH 4/6] target/tricore: Add crc32l.w insn Bastian Koppelmann
2023-06-10 15:18 ` Richard Henderson
2023-06-10 10:55 ` [PATCH 5/6] target/tricore: Add crc32.b insn Bastian Koppelmann
2023-06-10 15:19 ` Richard Henderson
2023-06-10 10:55 ` [PATCH 6/6] target/tricore: Add shuffle insn Bastian Koppelmann
2023-06-10 15:41 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230610105547.159148-3-kbastian@mail.uni-paderborn.de \
--to=kbastian@mail.uni-paderborn.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).