[PATCH v4 0/3] RISC-V: Support Scalar Cryptography extension
Nelson Chu
nelson.chu@sifive.com
Tue Nov 16 04:07:36 GMT 2021
Hi Guys,
I have added the missing ChangeLogs in the commit comment, and fixed
some minor indent. These k extension patches look good to me, so
committed.
Thanks
Nelson
On Mon, Nov 15, 2021 at 11:04 AM jiawei <jiawei@iscas.ac.cn> wrote:
>
> This patch is support Scalar Cryptography extension(k-ext v1.0.0-rc6) as
> binutils part, you can find gcc patches part in https://github.com/WuSiYu/riscv-gcc/tree/trunk-crypto-rebase by siyu@isrc.iscas.ac.cn.
>
> The first patch fix the order check with 'z' begin sub-extension, it set 'zb' before 'zk' as a right case. Some instruction in 'zbkb' and 'zbkc' is both used by Bitmanip and Scalar Cryptography extension, we just redefine the class with them.
>
> Here is the github repo link contain this patch: https://github.com/pz9115/riscv-binutils-gdb/commits/k-ext-rebase, the old version of this work is form https://github.com/riscv-collab/riscv-binutils-gdb/pull/254, Thanks for Nelson Chu and Jim Wilson's review and help.
>
> Version logs:
>
> v2: Add missing arch "k" in riscv_supported_std_ext[] to make the order check right with "zk" behind "zb" as Neslon Chu's comment.
>
> v3: Remove the trailing spaces as Andreas Schwab's comment. Add commit for each patch and add split testcases into sub-extension tests as Christoph Muellner's comment.
>
> v4: Change letter order in riscv_supported_std_ext[], Move INSN_CLASS_* into follow patch, Fix SHFL/UNSHFL Mask error, Fix typo error, Add CSR_CLASS ZKR for ES_CSR as Neslon Chu's comment.
>
> jiawei (3):
> RISC-V: Minimal support of scalar crypto extension
> RISC-V: Scalar crypto instructions and operand set
> RISC-V: Scalar crypto instruction and Entropy Source CSR testcases
>
> bfd/elfxx-riscv.c | 53 ++++++++++++
> gas/config/tc-riscv.c | 29 +++++++
> gas/testsuite/gas/riscv/k-ext-64.d | 47 ++++++++++
> gas/testsuite/gas/riscv/k-ext-64.s | 38 ++++++++
> gas/testsuite/gas/riscv/k-ext.d | 44 ++++++++++
> gas/testsuite/gas/riscv/k-ext.s | 35 ++++++++
> .../gas/riscv/priv-reg-fail-version-1p10.d | 2 +-
> .../gas/riscv/priv-reg-fail-version-1p11.d | 2 +-
> .../gas/riscv/priv-reg-fail-version-1p9p1.d | 2 +-
> .../gas/riscv/priv-reg-version-1p10.d | 1 +
> .../gas/riscv/priv-reg-version-1p11.d | 1 +
> .../gas/riscv/priv-reg-version-1p9p1.d | 1 +
> gas/testsuite/gas/riscv/priv-reg.s | 3 +
> gas/testsuite/gas/riscv/zbkb-32.d | 22 +++++
> gas/testsuite/gas/riscv/zbkb-32.s | 13 +++
> gas/testsuite/gas/riscv/zbkb-64.d | 24 ++++++
> gas/testsuite/gas/riscv/zbkb-64.s | 15 ++++
> gas/testsuite/gas/riscv/zbkc-32.d | 12 +++
> gas/testsuite/gas/riscv/zbkc-64.d | 12 +++
> gas/testsuite/gas/riscv/zbkc.s | 3 +
> gas/testsuite/gas/riscv/zbkx-32.d | 12 +++
> gas/testsuite/gas/riscv/zbkx-64.d | 12 +++
> gas/testsuite/gas/riscv/zbkx.s | 3 +
> gas/testsuite/gas/riscv/zknd-32.d | 12 +++
> gas/testsuite/gas/riscv/zknd-32.s | 3 +
> gas/testsuite/gas/riscv/zknd-64.d | 15 ++++
> gas/testsuite/gas/riscv/zknd-64.s | 6 ++
> gas/testsuite/gas/riscv/zkne-32.d | 12 +++
> gas/testsuite/gas/riscv/zkne-32.s | 3 +
> gas/testsuite/gas/riscv/zkne-64.d | 14 +++
> gas/testsuite/gas/riscv/zkne-64.s | 5 ++
> gas/testsuite/gas/riscv/zknh-32.d | 20 +++++
> gas/testsuite/gas/riscv/zknh-32.s | 11 +++
> gas/testsuite/gas/riscv/zknh-64.d | 18 ++++
> gas/testsuite/gas/riscv/zknh-64.s | 9 ++
> gas/testsuite/gas/riscv/zksed-32.d | 12 +++
> gas/testsuite/gas/riscv/zksed-64.d | 12 +++
> gas/testsuite/gas/riscv/zksed.s | 3 +
> gas/testsuite/gas/riscv/zksh-32.d | 12 +++
> gas/testsuite/gas/riscv/zksh-64.d | 12 +++
> gas/testsuite/gas/riscv/zksh.s | 3 +
> include/opcode/riscv-opc.h | 75 ++++++++++++++++
> include/opcode/riscv.h | 18 ++++
> opcodes/riscv-dis.c | 8 ++
> opcodes/riscv-opc.c | 86 +++++++++++++++----
> 45 files changed, 735 insertions(+), 20 deletions(-)
> create mode 100644 gas/testsuite/gas/riscv/k-ext-64.d
> create mode 100644 gas/testsuite/gas/riscv/k-ext-64.s
> create mode 100644 gas/testsuite/gas/riscv/k-ext.d
> create mode 100644 gas/testsuite/gas/riscv/k-ext.s
> create mode 100644 gas/testsuite/gas/riscv/zbkb-32.d
> create mode 100644 gas/testsuite/gas/riscv/zbkb-32.s
> create mode 100644 gas/testsuite/gas/riscv/zbkb-64.d
> create mode 100644 gas/testsuite/gas/riscv/zbkb-64.s
> create mode 100644 gas/testsuite/gas/riscv/zbkc-32.d
> create mode 100644 gas/testsuite/gas/riscv/zbkc-64.d
> create mode 100644 gas/testsuite/gas/riscv/zbkc.s
> create mode 100644 gas/testsuite/gas/riscv/zbkx-32.d
> create mode 100644 gas/testsuite/gas/riscv/zbkx-64.d
> create mode 100644 gas/testsuite/gas/riscv/zbkx.s
> create mode 100644 gas/testsuite/gas/riscv/zknd-32.d
> create mode 100644 gas/testsuite/gas/riscv/zknd-32.s
> create mode 100644 gas/testsuite/gas/riscv/zknd-64.d
> create mode 100644 gas/testsuite/gas/riscv/zknd-64.s
> create mode 100644 gas/testsuite/gas/riscv/zkne-32.d
> create mode 100644 gas/testsuite/gas/riscv/zkne-32.s
> create mode 100644 gas/testsuite/gas/riscv/zkne-64.d
> create mode 100644 gas/testsuite/gas/riscv/zkne-64.s
> create mode 100644 gas/testsuite/gas/riscv/zknh-32.d
> create mode 100644 gas/testsuite/gas/riscv/zknh-32.s
> create mode 100644 gas/testsuite/gas/riscv/zknh-64.d
> create mode 100644 gas/testsuite/gas/riscv/zknh-64.s
> create mode 100644 gas/testsuite/gas/riscv/zksed-32.d
> create mode 100644 gas/testsuite/gas/riscv/zksed-64.d
> create mode 100644 gas/testsuite/gas/riscv/zksed.s
> create mode 100644 gas/testsuite/gas/riscv/zksh-32.d
> create mode 100644 gas/testsuite/gas/riscv/zksh-64.d
> create mode 100644 gas/testsuite/gas/riscv/zksh.s
>
> --
> 2.25.1
>
More information about the Binutils
mailing list