From: Weiwei Li <liweiwei@iscas.ac.cn> To: richard.henderson@linaro.org, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, qemu-riscv@nongnu.org, qemu-devel@nongnu.org Cc: wangjunqiang@iscas.ac.cn, Weiwei Li <liweiwei@iscas.ac.cn>, lazyparser@gmail.com, luruibo2000@163.com, lustrew@foxmail.com Subject: [PATCH v11 03/14] target/riscv: rvk: add support for zbkc extension Date: Tue, 19 Apr 2022 09:48:36 +0800 [thread overview] Message-ID: <20220419014847.9722-4-liweiwei@iscas.ac.cn> (raw) In-Reply-To: <20220419014847.9722-1-liweiwei@iscas.ac.cn> - reuse partial instructions of zbc extension, update extension check for them Signed-off-by: Weiwei Li <liweiwei@iscas.ac.cn> Signed-off-by: Junqiang Wang <wangjunqiang@iscas.ac.cn> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> --- target/riscv/insn32.decode | 3 ++- target/riscv/insn_trans/trans_rvb.c.inc | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/target/riscv/insn32.decode b/target/riscv/insn32.decode index fdceaf621a..3a49acab37 100644 --- a/target/riscv/insn32.decode +++ b/target/riscv/insn32.decode @@ -770,9 +770,10 @@ clzw 0110000 00000 ..... 001 ..... 0011011 @r2 ctzw 0110000 00001 ..... 001 ..... 0011011 @r2 cpopw 0110000 00010 ..... 001 ..... 0011011 @r2 -# *** RV32 Zbc Standard Extension *** +# *** RV32 Zbc/Zbkc Standard Extension *** clmul 0000101 .......... 001 ..... 0110011 @r clmulh 0000101 .......... 011 ..... 0110011 @r +# *** RV32 extra Zbc Standard Extension *** clmulr 0000101 .......... 010 ..... 0110011 @r # *** RV32 Zbs Standard Extension *** diff --git a/target/riscv/insn_trans/trans_rvb.c.inc b/target/riscv/insn_trans/trans_rvb.c.inc index f36577579d..5a5751557d 100644 --- a/target/riscv/insn_trans/trans_rvb.c.inc +++ b/target/riscv/insn_trans/trans_rvb.c.inc @@ -489,7 +489,7 @@ static bool trans_slli_uw(DisasContext *ctx, arg_slli_uw *a) static bool trans_clmul(DisasContext *ctx, arg_clmul *a) { - REQUIRE_ZBC(ctx); + REQUIRE_EITHER_EXT(ctx, zbc, zbkc); return gen_arith(ctx, a, EXT_NONE, gen_helper_clmul, NULL); } @@ -501,7 +501,7 @@ static void gen_clmulh(TCGv dst, TCGv src1, TCGv src2) static bool trans_clmulh(DisasContext *ctx, arg_clmulr *a) { - REQUIRE_ZBC(ctx); + REQUIRE_EITHER_EXT(ctx, zbc, zbkc); return gen_arith(ctx, a, EXT_NONE, gen_clmulh, NULL); } -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: Weiwei Li <liweiwei@iscas.ac.cn> To: richard.henderson@linaro.org, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, qemu-riscv@nongnu.org, qemu-devel@nongnu.org Cc: wangjunqiang@iscas.ac.cn, lazyparser@gmail.com, lustrew@foxmail.com, luruibo2000@163.com, Weiwei Li <liweiwei@iscas.ac.cn> Subject: [PATCH v11 03/14] target/riscv: rvk: add support for zbkc extension Date: Tue, 19 Apr 2022 09:48:36 +0800 [thread overview] Message-ID: <20220419014847.9722-4-liweiwei@iscas.ac.cn> (raw) In-Reply-To: <20220419014847.9722-1-liweiwei@iscas.ac.cn> - reuse partial instructions of zbc extension, update extension check for them Signed-off-by: Weiwei Li <liweiwei@iscas.ac.cn> Signed-off-by: Junqiang Wang <wangjunqiang@iscas.ac.cn> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> --- target/riscv/insn32.decode | 3 ++- target/riscv/insn_trans/trans_rvb.c.inc | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/target/riscv/insn32.decode b/target/riscv/insn32.decode index fdceaf621a..3a49acab37 100644 --- a/target/riscv/insn32.decode +++ b/target/riscv/insn32.decode @@ -770,9 +770,10 @@ clzw 0110000 00000 ..... 001 ..... 0011011 @r2 ctzw 0110000 00001 ..... 001 ..... 0011011 @r2 cpopw 0110000 00010 ..... 001 ..... 0011011 @r2 -# *** RV32 Zbc Standard Extension *** +# *** RV32 Zbc/Zbkc Standard Extension *** clmul 0000101 .......... 001 ..... 0110011 @r clmulh 0000101 .......... 011 ..... 0110011 @r +# *** RV32 extra Zbc Standard Extension *** clmulr 0000101 .......... 010 ..... 0110011 @r # *** RV32 Zbs Standard Extension *** diff --git a/target/riscv/insn_trans/trans_rvb.c.inc b/target/riscv/insn_trans/trans_rvb.c.inc index f36577579d..5a5751557d 100644 --- a/target/riscv/insn_trans/trans_rvb.c.inc +++ b/target/riscv/insn_trans/trans_rvb.c.inc @@ -489,7 +489,7 @@ static bool trans_slli_uw(DisasContext *ctx, arg_slli_uw *a) static bool trans_clmul(DisasContext *ctx, arg_clmul *a) { - REQUIRE_ZBC(ctx); + REQUIRE_EITHER_EXT(ctx, zbc, zbkc); return gen_arith(ctx, a, EXT_NONE, gen_helper_clmul, NULL); } @@ -501,7 +501,7 @@ static void gen_clmulh(TCGv dst, TCGv src1, TCGv src2) static bool trans_clmulh(DisasContext *ctx, arg_clmulr *a) { - REQUIRE_ZBC(ctx); + REQUIRE_EITHER_EXT(ctx, zbc, zbkc); return gen_arith(ctx, a, EXT_NONE, gen_clmulh, NULL); } -- 2.17.1
next prev parent reply other threads:[~2022-04-19 1:51 UTC|newest] Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-04-19 1:48 [PATCH v11 00/14] support subsets of scalar crypto extension Weiwei Li 2022-04-19 1:48 ` Weiwei Li 2022-04-19 1:48 ` [PATCH v11 01/14] target/riscv: rvk: add cfg properties for zbk* and zk* Weiwei Li 2022-04-19 1:48 ` Weiwei Li 2022-04-19 1:48 ` [PATCH v11 02/14] target/riscv: rvk: add support for zbkb extension Weiwei Li 2022-04-19 1:48 ` Weiwei Li 2022-04-19 1:48 ` Weiwei Li [this message] 2022-04-19 1:48 ` [PATCH v11 03/14] target/riscv: rvk: add support for zbkc extension Weiwei Li 2022-04-19 1:48 ` [PATCH v11 04/14] target/riscv: rvk: add support for zbkx extension Weiwei Li 2022-04-19 1:48 ` Weiwei Li 2022-04-19 1:48 ` [PATCH v11 05/14] crypto: move sm4_sbox from target/arm Weiwei Li 2022-04-19 1:48 ` Weiwei Li 2022-04-19 1:48 ` [PATCH v11 06/14] target/riscv: rvk: add support for zknd/zkne extension in RV32 Weiwei Li 2022-04-19 1:48 ` Weiwei Li 2022-04-19 1:48 ` [PATCH v11 07/14] target/riscv: rvk: add support for zkne/zknd extension in RV64 Weiwei Li 2022-04-19 1:48 ` Weiwei Li 2022-04-19 1:48 ` [PATCH v11 08/14] target/riscv: rvk: add support for sha256 related instructions in zknh extension Weiwei Li 2022-04-19 1:48 ` Weiwei Li 2022-04-19 1:48 ` [PATCH v11 09/14] target/riscv: rvk: add support for sha512 related instructions for RV32 " Weiwei Li 2022-04-19 1:48 ` Weiwei Li 2022-04-19 1:48 ` [PATCH v11 10/14] target/riscv: rvk: add support for sha512 related instructions for RV64 " Weiwei Li 2022-04-19 1:48 ` Weiwei Li 2022-04-19 1:48 ` [PATCH v11 11/14] target/riscv: rvk: add support for zksed/zksh extension Weiwei Li 2022-04-19 1:48 ` Weiwei Li 2022-04-19 1:48 ` [PATCH v11 12/14] target/riscv: rvk: add CSR support for Zkr Weiwei Li 2022-04-19 1:48 ` Weiwei Li 2022-04-22 0:34 ` Alistair Francis 2022-04-22 0:34 ` Alistair Francis 2022-04-19 1:48 ` [PATCH v11 13/14] disas/riscv.c: rvk: add disas support for Zbk* and Zk* instructions Weiwei Li 2022-04-19 1:48 ` Weiwei Li 2022-04-19 1:48 ` [PATCH v11 14/14] target/riscv: rvk: expose zbk* and zk* properties Weiwei Li 2022-04-19 1:48 ` Weiwei Li 2022-04-22 23:01 ` [PATCH v11 00/14] support subsets of scalar crypto extension Alistair Francis 2022-04-22 23:01 ` Alistair Francis
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=20220419014847.9722-4-liweiwei@iscas.ac.cn \ --to=liweiwei@iscas.ac.cn \ --cc=alistair.francis@wdc.com \ --cc=bin.meng@windriver.com \ --cc=lazyparser@gmail.com \ --cc=luruibo2000@163.com \ --cc=lustrew@foxmail.com \ --cc=palmer@dabbelt.com \ --cc=qemu-devel@nongnu.org \ --cc=qemu-riscv@nongnu.org \ --cc=richard.henderson@linaro.org \ --cc=wangjunqiang@iscas.ac.cn \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.