[V3,0/5] RISC-V: Implement Scalar Cryptography Extension

Message ID 20230220070125.2291-1-shihua@iscas.ac.cn
Headers
Series RISC-V: Implement Scalar Cryptography Extension |

Message

Liao Shihua Feb. 20, 2023, 7:01 a.m. UTC
  This series adds basic support for the Scalar Cryptography extensions:
* Zbkb
* Zbkc
* Zbkx
* Zknd
* Zkne
* Zknh
* Zksed
* Zksh

The implementation follows the version Scalar Cryptography v1.0.0 of the specification,
which can be found here:
https://github.com/riscv/riscv-crypto/releases/tag/v1.0.0-scalar

It works by Wu Siyu and Liao Shihua .
Liao Shihua (5):
  Add prototypes for RISC-V Crypto built-in functions
  Implement ZBKB, ZBKC and ZBKX extensions
  Implement ZKND and ZKNE extensions
  Implement ZKNH extension
  Implement ZKSH and ZKSED extensions

 gcc/config/riscv/bitmanip.md                  |  20 +-
 gcc/config/riscv/constraints.md               |   8 +
 gcc/config/riscv/crypto.md                    | 435 ++++++++++++++++++
 gcc/config/riscv/riscv-builtins.cc            |  26 ++
 gcc/config/riscv/riscv-ftypes.def             |  10 +
 gcc/config/riscv/riscv-scalar-crypto.def      |  94 ++++
 gcc/config/riscv/riscv.md                     |   4 +-
 gcc/testsuite/gcc.target/riscv/zbkb32.c       |  36 ++
 gcc/testsuite/gcc.target/riscv/zbkb64.c       |  28 ++
 gcc/testsuite/gcc.target/riscv/zbkc32.c       |  17 +
 gcc/testsuite/gcc.target/riscv/zbkc64.c       |  17 +
 gcc/testsuite/gcc.target/riscv/zbkx32.c       |  18 +
 gcc/testsuite/gcc.target/riscv/zbkx64.c       |  18 +
 gcc/testsuite/gcc.target/riscv/zknd32.c       |  18 +
 gcc/testsuite/gcc.target/riscv/zknd64.c       |  36 ++
 gcc/testsuite/gcc.target/riscv/zkne32.c       |  18 +
 gcc/testsuite/gcc.target/riscv/zkne64.c       |  30 ++
 gcc/testsuite/gcc.target/riscv/zknh-sha256.c  |  28 ++
 .../gcc.target/riscv/zknh-sha512-32.c         |  42 ++
 .../gcc.target/riscv/zknh-sha512-64.c         |  31 ++
 gcc/testsuite/gcc.target/riscv/zksed32.c      |  19 +
 gcc/testsuite/gcc.target/riscv/zksed64.c      |  19 +
 gcc/testsuite/gcc.target/riscv/zksh32.c       |  19 +
 gcc/testsuite/gcc.target/riscv/zksh64.c       |  19 +
 24 files changed, 999 insertions(+), 11 deletions(-)
 create mode 100644 gcc/config/riscv/crypto.md
 create mode 100644 gcc/config/riscv/riscv-scalar-crypto.def
 create mode 100644 gcc/testsuite/gcc.target/riscv/zbkb32.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/zbkb64.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/zbkc32.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/zbkc64.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/zbkx32.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/zbkx64.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/zknd32.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/zknd64.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/zkne32.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/zkne64.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/zknh-sha256.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/zknh-sha512-32.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/zknh-sha512-64.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/zksed32.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/zksed64.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/zksh32.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/zksh64.c
  

Comments

Kito Cheng March 5, 2023, 10:19 a.m. UTC | #1
Committed, thanks!

On Mon, Feb 20, 2023 at 3:01 PM Liao Shihua <shihua@iscas.ac.cn> wrote:
>
> This series adds basic support for the Scalar Cryptography extensions:
> * Zbkb
> * Zbkc
> * Zbkx
> * Zknd
> * Zkne
> * Zknh
> * Zksed
> * Zksh
>
> The implementation follows the version Scalar Cryptography v1.0.0 of the specification,
> which can be found here:
> https://github.com/riscv/riscv-crypto/releases/tag/v1.0.0-scalar
>
> It works by Wu Siyu and Liao Shihua .
> Liao Shihua (5):
>   Add prototypes for RISC-V Crypto built-in functions
>   Implement ZBKB, ZBKC and ZBKX extensions
>   Implement ZKND and ZKNE extensions
>   Implement ZKNH extension
>   Implement ZKSH and ZKSED extensions
>
>  gcc/config/riscv/bitmanip.md                  |  20 +-
>  gcc/config/riscv/constraints.md               |   8 +
>  gcc/config/riscv/crypto.md                    | 435 ++++++++++++++++++
>  gcc/config/riscv/riscv-builtins.cc            |  26 ++
>  gcc/config/riscv/riscv-ftypes.def             |  10 +
>  gcc/config/riscv/riscv-scalar-crypto.def      |  94 ++++
>  gcc/config/riscv/riscv.md                     |   4 +-
>  gcc/testsuite/gcc.target/riscv/zbkb32.c       |  36 ++
>  gcc/testsuite/gcc.target/riscv/zbkb64.c       |  28 ++
>  gcc/testsuite/gcc.target/riscv/zbkc32.c       |  17 +
>  gcc/testsuite/gcc.target/riscv/zbkc64.c       |  17 +
>  gcc/testsuite/gcc.target/riscv/zbkx32.c       |  18 +
>  gcc/testsuite/gcc.target/riscv/zbkx64.c       |  18 +
>  gcc/testsuite/gcc.target/riscv/zknd32.c       |  18 +
>  gcc/testsuite/gcc.target/riscv/zknd64.c       |  36 ++
>  gcc/testsuite/gcc.target/riscv/zkne32.c       |  18 +
>  gcc/testsuite/gcc.target/riscv/zkne64.c       |  30 ++
>  gcc/testsuite/gcc.target/riscv/zknh-sha256.c  |  28 ++
>  .../gcc.target/riscv/zknh-sha512-32.c         |  42 ++
>  .../gcc.target/riscv/zknh-sha512-64.c         |  31 ++
>  gcc/testsuite/gcc.target/riscv/zksed32.c      |  19 +
>  gcc/testsuite/gcc.target/riscv/zksed64.c      |  19 +
>  gcc/testsuite/gcc.target/riscv/zksh32.c       |  19 +
>  gcc/testsuite/gcc.target/riscv/zksh64.c       |  19 +
>  24 files changed, 999 insertions(+), 11 deletions(-)
>  create mode 100644 gcc/config/riscv/crypto.md
>  create mode 100644 gcc/config/riscv/riscv-scalar-crypto.def
>  create mode 100644 gcc/testsuite/gcc.target/riscv/zbkb32.c
>  create mode 100644 gcc/testsuite/gcc.target/riscv/zbkb64.c
>  create mode 100644 gcc/testsuite/gcc.target/riscv/zbkc32.c
>  create mode 100644 gcc/testsuite/gcc.target/riscv/zbkc64.c
>  create mode 100644 gcc/testsuite/gcc.target/riscv/zbkx32.c
>  create mode 100644 gcc/testsuite/gcc.target/riscv/zbkx64.c
>  create mode 100644 gcc/testsuite/gcc.target/riscv/zknd32.c
>  create mode 100644 gcc/testsuite/gcc.target/riscv/zknd64.c
>  create mode 100644 gcc/testsuite/gcc.target/riscv/zkne32.c
>  create mode 100644 gcc/testsuite/gcc.target/riscv/zkne64.c
>  create mode 100644 gcc/testsuite/gcc.target/riscv/zknh-sha256.c
>  create mode 100644 gcc/testsuite/gcc.target/riscv/zknh-sha512-32.c
>  create mode 100644 gcc/testsuite/gcc.target/riscv/zknh-sha512-64.c
>  create mode 100644 gcc/testsuite/gcc.target/riscv/zksed32.c
>  create mode 100644 gcc/testsuite/gcc.target/riscv/zksed64.c
>  create mode 100644 gcc/testsuite/gcc.target/riscv/zksh32.c
>  create mode 100644 gcc/testsuite/gcc.target/riscv/zksh64.c
>
> --
> 2.38.1.windows.1
>