[v2] RISC-V: Update crypto vector ISA info with latest spec
Checks
Commit Message
Rebase and resend this patch due to it was not added into patchwork
before. Kito had already reviewed it. Please refer to
https://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg327499.html
This patch add the Zvkb subset of crypto vector extension. The
corresponding test cases have aslo been modified.
gcc/ChangeLog:
* common/config/riscv/riscv-common.cc: Add zvkb ISA info.
* config/riscv/riscv.opt: Add Mask(ZVKB)
gcc/testsuite/ChangeLog:
* gcc.target/riscv/zvkn-1.c: Replace zvbb with zvkb.
* gcc.target/riscv/zvkn.c: Ditto.
* gcc.target/riscv/zvknc-1.c:Ditto.
* gcc.target/riscv/zvknc-2.c:Ditto.
* gcc.target/riscv/zvknc.c: Ditto.
* gcc.target/riscv/zvkng-1.c:Ditto.
* gcc.target/riscv/zvkng-2.c:Ditto.
* gcc.target/riscv/zvkng.c: Ditto.
* gcc.target/riscv/zvks-1.c: Ditto.
* gcc.target/riscv/zvks.c: Ditto.
* gcc.target/riscv/zvksc-1.c:Ditto.
* gcc.target/riscv/zvksc-2.c:Ditto.
* gcc.target/riscv/zvksc.c: Ditto.
* gcc.target/riscv/zvksg-1.c:Ditto.
* gcc.target/riscv/zvksg-2.c:Ditto.
* gcc.target/riscv/zvksg.c: Ditto.
---
gcc/common/config/riscv/riscv-common.cc | 6 ++++--
gcc/config/riscv/riscv.opt | 2 ++
gcc/testsuite/gcc.target/riscv/zvkn-1.c | 8 ++++----
gcc/testsuite/gcc.target/riscv/zvkn.c | 4 ++--
gcc/testsuite/gcc.target/riscv/zvknc-1.c | 8 ++++----
gcc/testsuite/gcc.target/riscv/zvknc-2.c | 4 ++--
gcc/testsuite/gcc.target/riscv/zvknc.c | 4 ++--
gcc/testsuite/gcc.target/riscv/zvkng-1.c | 8 ++++----
gcc/testsuite/gcc.target/riscv/zvkng-2.c | 4 ++--
gcc/testsuite/gcc.target/riscv/zvkng.c | 4 ++--
gcc/testsuite/gcc.target/riscv/zvks-1.c | 8 ++++----
gcc/testsuite/gcc.target/riscv/zvks.c | 4 ++--
gcc/testsuite/gcc.target/riscv/zvksc-1.c | 8 ++++----
gcc/testsuite/gcc.target/riscv/zvksc-2.c | 4 ++--
gcc/testsuite/gcc.target/riscv/zvksc.c | 4 ++--
gcc/testsuite/gcc.target/riscv/zvksg-1.c | 8 ++++----
gcc/testsuite/gcc.target/riscv/zvksg-2.c | 4 ++--
gcc/testsuite/gcc.target/riscv/zvksg.c | 4 ++--
18 files changed, 50 insertions(+), 46 deletions(-)
Comments
LGTM again :)
On Mon, Dec 4, 2023 at 2:44 PM Feng Wang <wangfeng@eswincomputing.com> wrote:
>
> Rebase and resend this patch due to it was not added into patchwork
> before. Kito had already reviewed it. Please refer to
> https://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg327499.html
>
> This patch add the Zvkb subset of crypto vector extension. The
> corresponding test cases have aslo been modified.
>
> gcc/ChangeLog:
>
> * common/config/riscv/riscv-common.cc: Add zvkb ISA info.
> * config/riscv/riscv.opt: Add Mask(ZVKB)
>
> gcc/testsuite/ChangeLog:
>
> * gcc.target/riscv/zvkn-1.c: Replace zvbb with zvkb.
> * gcc.target/riscv/zvkn.c: Ditto.
> * gcc.target/riscv/zvknc-1.c:Ditto.
> * gcc.target/riscv/zvknc-2.c:Ditto.
> * gcc.target/riscv/zvknc.c: Ditto.
> * gcc.target/riscv/zvkng-1.c:Ditto.
> * gcc.target/riscv/zvkng-2.c:Ditto.
> * gcc.target/riscv/zvkng.c: Ditto.
> * gcc.target/riscv/zvks-1.c: Ditto.
> * gcc.target/riscv/zvks.c: Ditto.
> * gcc.target/riscv/zvksc-1.c:Ditto.
> * gcc.target/riscv/zvksc-2.c:Ditto.
> * gcc.target/riscv/zvksc.c: Ditto.
> * gcc.target/riscv/zvksg-1.c:Ditto.
> * gcc.target/riscv/zvksg-2.c:Ditto.
> * gcc.target/riscv/zvksg.c: Ditto.
> ---
> gcc/common/config/riscv/riscv-common.cc | 6 ++++--
> gcc/config/riscv/riscv.opt | 2 ++
> gcc/testsuite/gcc.target/riscv/zvkn-1.c | 8 ++++----
> gcc/testsuite/gcc.target/riscv/zvkn.c | 4 ++--
> gcc/testsuite/gcc.target/riscv/zvknc-1.c | 8 ++++----
> gcc/testsuite/gcc.target/riscv/zvknc-2.c | 4 ++--
> gcc/testsuite/gcc.target/riscv/zvknc.c | 4 ++--
> gcc/testsuite/gcc.target/riscv/zvkng-1.c | 8 ++++----
> gcc/testsuite/gcc.target/riscv/zvkng-2.c | 4 ++--
> gcc/testsuite/gcc.target/riscv/zvkng.c | 4 ++--
> gcc/testsuite/gcc.target/riscv/zvks-1.c | 8 ++++----
> gcc/testsuite/gcc.target/riscv/zvks.c | 4 ++--
> gcc/testsuite/gcc.target/riscv/zvksc-1.c | 8 ++++----
> gcc/testsuite/gcc.target/riscv/zvksc-2.c | 4 ++--
> gcc/testsuite/gcc.target/riscv/zvksc.c | 4 ++--
> gcc/testsuite/gcc.target/riscv/zvksg-1.c | 8 ++++----
> gcc/testsuite/gcc.target/riscv/zvksg-2.c | 4 ++--
> gcc/testsuite/gcc.target/riscv/zvksg.c | 4 ++--
> 18 files changed, 50 insertions(+), 46 deletions(-)
>
> diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc
> index ded85b4c578..6c210412515 100644
> --- a/gcc/common/config/riscv/riscv-common.cc
> +++ b/gcc/common/config/riscv/riscv-common.cc
> @@ -106,7 +106,7 @@ static const riscv_implied_info_t riscv_implied_info[] =
>
> {"zvkn", "zvkned"},
> {"zvkn", "zvknhb"},
> - {"zvkn", "zvbb"},
> + {"zvkn", "zvkb"},
> {"zvkn", "zvkt"},
> {"zvknc", "zvkn"},
> {"zvknc", "zvbc"},
> @@ -114,7 +114,7 @@ static const riscv_implied_info_t riscv_implied_info[] =
> {"zvkng", "zvkg"},
> {"zvks", "zvksed"},
> {"zvks", "zvksh"},
> - {"zvks", "zvbb"},
> + {"zvks", "zvkb"},
> {"zvks", "zvkt"},
> {"zvksc", "zvks"},
> {"zvksc", "zvbc"},
> @@ -253,6 +253,7 @@ static const struct riscv_ext_version riscv_ext_version_table[] =
>
> {"zvbb", ISA_SPEC_CLASS_NONE, 1, 0},
> {"zvbc", ISA_SPEC_CLASS_NONE, 1, 0},
> + {"zvkb", ISA_SPEC_CLASS_NONE, 1, 0},
> {"zvkg", ISA_SPEC_CLASS_NONE, 1, 0},
> {"zvkned", ISA_SPEC_CLASS_NONE, 1, 0},
> {"zvknha", ISA_SPEC_CLASS_NONE, 1, 0},
> @@ -1624,6 +1625,7 @@ static const riscv_ext_flag_table_t riscv_ext_flag_table[] =
>
> {"zvbb", &gcc_options::x_riscv_zvb_subext, MASK_ZVBB},
> {"zvbc", &gcc_options::x_riscv_zvb_subext, MASK_ZVBC},
> + {"zvkb", &gcc_options::x_riscv_zvb_subext, MASK_ZVKB},
> {"zvkg", &gcc_options::x_riscv_zvk_subext, MASK_ZVKG},
> {"zvkned", &gcc_options::x_riscv_zvk_subext, MASK_ZVKNED},
> {"zvknha", &gcc_options::x_riscv_zvk_subext, MASK_ZVKNHA},
> diff --git a/gcc/config/riscv/riscv.opt b/gcc/config/riscv/riscv.opt
> index 0c6517bdc8b..78186fff6c5 100644
> --- a/gcc/config/riscv/riscv.opt
> +++ b/gcc/config/riscv/riscv.opt
> @@ -319,6 +319,8 @@ Mask(ZVBB) Var(riscv_zvb_subext)
>
> Mask(ZVBC) Var(riscv_zvb_subext)
>
> +Mask(ZVKB) Var(riscv_zvb_subext)
> +
> TargetVariable
> int riscv_zvk_subext
>
> diff --git a/gcc/testsuite/gcc.target/riscv/zvkn-1.c b/gcc/testsuite/gcc.target/riscv/zvkn-1.c
> index 23b255b4779..069a8f66c92 100644
> --- a/gcc/testsuite/gcc.target/riscv/zvkn-1.c
> +++ b/gcc/testsuite/gcc.target/riscv/zvkn-1.c
> @@ -1,6 +1,6 @@
> /* { dg-do compile } */
> -/* { dg-options "-march=rv64gc_zvkned_zvknhb_zvbb_zvkt" { target { rv64 } } } */
> -/* { dg-options "-march=rv32gc_zvkned_zvknhb_zvbb_zvkt" { target { rv32 } } } */
> +/* { dg-options "-march=rv64gc_zvkned_zvknhb_zvkb_zvkt" { target { rv64 } } } */
> +/* { dg-options "-march=rv32gc_zvkned_zvknhb_zvkb_zvkt" { target { rv32 } } } */
>
> #ifndef __riscv_zvkn
> #error "Feature macro for `Zvkn' not defined"
> @@ -14,8 +14,8 @@
> #error "Feature macro for `Zvknhb' not defined"
> #endif
>
> -#ifndef __riscv_zvbb
> -#error "Feature macro for `Zvbb' not defined"
> +#ifndef __riscv_zvkb
> +#error "Feature macro for `Zvkb' not defined"
> #endif
>
> #ifndef __riscv_zvkt
> diff --git a/gcc/testsuite/gcc.target/riscv/zvkn.c b/gcc/testsuite/gcc.target/riscv/zvkn.c
> index 0047ebdede6..bcecbcc7e77 100644
> --- a/gcc/testsuite/gcc.target/riscv/zvkn.c
> +++ b/gcc/testsuite/gcc.target/riscv/zvkn.c
> @@ -14,8 +14,8 @@
> #error "Feature macro for `Zvknhb' not defined"
> #endif
>
> -#ifndef __riscv_zvbb
> -#error "Feature macro for `Zvbb' not defined"
> +#ifndef __riscv_zvkb
> +#error "Feature macro for `Zvkb' not defined"
> #endif
>
> #ifndef __riscv_zvkt
> diff --git a/gcc/testsuite/gcc.target/riscv/zvknc-1.c b/gcc/testsuite/gcc.target/riscv/zvknc-1.c
> index d8a84c02118..64cae2bfe83 100644
> --- a/gcc/testsuite/gcc.target/riscv/zvknc-1.c
> +++ b/gcc/testsuite/gcc.target/riscv/zvknc-1.c
> @@ -1,6 +1,6 @@
> /* { dg-do compile } */
> -/* { dg-options "-march=rv64gc_zvkned_zvknhb_zvbb_zvkt_zvbc" { target { rv64 } } } */
> -/* { dg-options "-march=rv32gc_zvkned_zvknhb_zvbb_zvkt_zvbc" { target { rv32 } } } */
> +/* { dg-options "-march=rv64gc_zvkned_zvknhb_zvkb_zvkt_zvbc" { target { rv64 } } } */
> +/* { dg-options "-march=rv32gc_zvkned_zvknhb_zvkb_zvkt_zvbc" { target { rv32 } } } */
>
> #ifndef __riscv_zvknc
> #error "Feature macro for `Zvknc' not defined"
> @@ -18,8 +18,8 @@
> #error "Feature macro for `Zvknhb' not defined"
> #endif
>
> -#ifndef __riscv_zvbb
> -#error "Feature macro for `Zvbb' not defined"
> +#ifndef __riscv_zvkb
> +#error "Feature macro for `ZvKb' not defined"
> #endif
>
> #ifndef __riscv_zvkt
> diff --git a/gcc/testsuite/gcc.target/riscv/zvknc-2.c b/gcc/testsuite/gcc.target/riscv/zvknc-2.c
> index 36cc6335d13..1f8b510bfd1 100644
> --- a/gcc/testsuite/gcc.target/riscv/zvknc-2.c
> +++ b/gcc/testsuite/gcc.target/riscv/zvknc-2.c
> @@ -18,8 +18,8 @@
> #error "Feature macro for `Zvknhb' not defined"
> #endif
>
> -#ifndef __riscv_zvbb
> -#error "Feature macro for `Zvbb' not defined"
> +#ifndef __riscv_zvkb
> +#error "Feature macro for `Zvkb' not defined"
> #endif
>
> #ifndef __riscv_zvkt
> diff --git a/gcc/testsuite/gcc.target/riscv/zvknc.c b/gcc/testsuite/gcc.target/riscv/zvknc.c
> index a177f17fbd7..64dda5fdf1f 100644
> --- a/gcc/testsuite/gcc.target/riscv/zvknc.c
> +++ b/gcc/testsuite/gcc.target/riscv/zvknc.c
> @@ -18,8 +18,8 @@
> #error "Feature macro for `Zvknhb' not defined"
> #endif
>
> -#ifndef __riscv_zvbb
> -#error "Feature macro for `Zvbb' not defined"
> +#ifndef __riscv_zvkb
> +#error "Feature macro for `Zvkb' not defined"
> #endif
>
> #ifndef __riscv_zvkt
> diff --git a/gcc/testsuite/gcc.target/riscv/zvkng-1.c b/gcc/testsuite/gcc.target/riscv/zvkng-1.c
> index d996b42af00..5419585f4de 100644
> --- a/gcc/testsuite/gcc.target/riscv/zvkng-1.c
> +++ b/gcc/testsuite/gcc.target/riscv/zvkng-1.c
> @@ -1,6 +1,6 @@
> /* { dg-do compile } */
> -/* { dg-options "-march=rv64gc_zvkned_zvknhb_zvbb_zvkt_zvkg" { target { rv64 } } } */
> -/* { dg-options "-march=rv32gc_zvkned_zvknhb_zvbb_zvkt_zvkg" { target { rv32 } } } */
> +/* { dg-options "-march=rv64gc_zvkned_zvknhb_zvkb_zvkt_zvkg" { target { rv64 } } } */
> +/* { dg-options "-march=rv32gc_zvkned_zvknhb_zvkb_zvkt_zvkg" { target { rv32 } } } */
>
> #ifndef __riscv_zvkng
> #error "Feature macro for `Zvkng' not defined"
> @@ -18,8 +18,8 @@
> #error "Feature macro for `Zvknhb' not defined"
> #endif
>
> -#ifndef __riscv_zvbb
> -#error "Feature macro for `Zvbb' not defined"
> +#ifndef __riscv_zvkb
> +#error "Feature macro for `Zvkb' not defined"
> #endif
>
> #ifndef __riscv_zvkt
> diff --git a/gcc/testsuite/gcc.target/riscv/zvkng-2.c b/gcc/testsuite/gcc.target/riscv/zvkng-2.c
> index 00199992d5c..6c7b239e831 100644
> --- a/gcc/testsuite/gcc.target/riscv/zvkng-2.c
> +++ b/gcc/testsuite/gcc.target/riscv/zvkng-2.c
> @@ -18,8 +18,8 @@
> #error "Feature macro for `Zvknhb' not defined"
> #endif
>
> -#ifndef __riscv_zvbb
> -#error "Feature macro for `Zvbb' not defined"
> +#ifndef __riscv_zvkb
> +#error "Feature macro for `Zvkb' not defined"
> #endif
>
> #ifndef __riscv_zvkt
> diff --git a/gcc/testsuite/gcc.target/riscv/zvkng.c b/gcc/testsuite/gcc.target/riscv/zvkng.c
> index 4605faf3c6c..6c516a4ae13 100644
> --- a/gcc/testsuite/gcc.target/riscv/zvkng.c
> +++ b/gcc/testsuite/gcc.target/riscv/zvkng.c
> @@ -18,8 +18,8 @@
> #error "Feature macro for `Zvknhb' not defined"
> #endif
>
> -#ifndef __riscv_zvbb
> -#error "Feature macro for `Zvbb' not defined"
> +#ifndef __riscv_zvkb
> +#error "Feature macro for `Zvkb' not defined"
> #endif
>
> #ifndef __riscv_zvkt
> diff --git a/gcc/testsuite/gcc.target/riscv/zvks-1.c b/gcc/testsuite/gcc.target/riscv/zvks-1.c
> index a576cdb0476..180b3f3c2a9 100644
> --- a/gcc/testsuite/gcc.target/riscv/zvks-1.c
> +++ b/gcc/testsuite/gcc.target/riscv/zvks-1.c
> @@ -1,6 +1,6 @@
> /* { dg-do compile } */
> -/* { dg-options "-march=rv64gc_zvksed_zvksh_zvbb_zvkt" { target { rv64 } } } */
> -/* { dg-options "-march=rv32gc_zvksed_zvksh_zvbb_zvkt" { target { rv32 } } } */
> +/* { dg-options "-march=rv64gc_zvksed_zvksh_zvkb_zvkt" { target { rv64 } } } */
> +/* { dg-options "-march=rv32gc_zvksed_zvksh_zvkb_zvkt" { target { rv32 } } } */
>
> #ifndef __riscv_zvks
> #error "Feature macro for `Zvks' not defined"
> @@ -14,8 +14,8 @@
> #error "Feature macro for `Zvksh' not defined"
> #endif
>
> -#ifndef __riscv_zvbb
> -#error "Feature macro for `Zvbb' not defined"
> +#ifndef __riscv_zvkb
> +#error "Feature macro for `Zvkb' not defined"
> #endif
>
> #ifndef __riscv_zvkt
> diff --git a/gcc/testsuite/gcc.target/riscv/zvks.c b/gcc/testsuite/gcc.target/riscv/zvks.c
> index d31b2610c20..2022d168ec1 100644
> --- a/gcc/testsuite/gcc.target/riscv/zvks.c
> +++ b/gcc/testsuite/gcc.target/riscv/zvks.c
> @@ -14,8 +14,8 @@
> #error "Feature macro for `Zvksh' not defined"
> #endif
>
> -#ifndef __riscv_zvbb
> -#error "Feature macro for `Zvbb' not defined"
> +#ifndef __riscv_zvkb
> +#error "Feature macro for `Zvkb' not defined"
> #endif
>
> #ifndef __riscv_zvkt
> diff --git a/gcc/testsuite/gcc.target/riscv/zvksc-1.c b/gcc/testsuite/gcc.target/riscv/zvksc-1.c
> index 3b76e6cea70..0c81b4ee93b 100644
> --- a/gcc/testsuite/gcc.target/riscv/zvksc-1.c
> +++ b/gcc/testsuite/gcc.target/riscv/zvksc-1.c
> @@ -1,6 +1,6 @@
> /* { dg-do compile } */
> -/* { dg-options "-march=rv64gc_zvksed_zvksh_zvbb_zvkt_zvbc" { target { rv64 } } } */
> -/* { dg-options "-march=rv32gc_zvksed_zvksh_zvbb_zvkt_zvbc" { target { rv32 } } } */
> +/* { dg-options "-march=rv64gc_zvksed_zvksh_zvkb_zvkt_zvbc" { target { rv64 } } } */
> +/* { dg-options "-march=rv32gc_zvksed_zvksh_zvkb_zvkt_zvbc" { target { rv32 } } } */
>
> #ifndef __riscv_zvksc
> #error "Feature macro for `Zvksc' not defined"
> @@ -18,8 +18,8 @@
> #error "Feature macro for `Zvksh' not defined"
> #endif
>
> -#ifndef __riscv_zvbb
> -#error "Feature macro for `Zvbb' not defined"
> +#ifndef __riscv_zvkb
> +#error "Feature macro for `Zvkb' not defined"
> #endif
>
> #ifndef __riscv_zvkt
> diff --git a/gcc/testsuite/gcc.target/riscv/zvksc-2.c b/gcc/testsuite/gcc.target/riscv/zvksc-2.c
> index b95e34ec6e4..0cee3586390 100644
> --- a/gcc/testsuite/gcc.target/riscv/zvksc-2.c
> +++ b/gcc/testsuite/gcc.target/riscv/zvksc-2.c
> @@ -18,8 +18,8 @@
> #error "Feature macro for `Zvksh' not defined"
> #endif
>
> -#ifndef __riscv_zvbb
> -#error "Feature macro for `Zvbb' not defined"
> +#ifndef __riscv_zvkb
> +#error "Feature macro for `Zvkb' not defined"
> #endif
>
> #ifndef __riscv_zvkt
> diff --git a/gcc/testsuite/gcc.target/riscv/zvksc.c b/gcc/testsuite/gcc.target/riscv/zvksc.c
> index 983f1aa89ec..6c33a86aa2e 100644
> --- a/gcc/testsuite/gcc.target/riscv/zvksc.c
> +++ b/gcc/testsuite/gcc.target/riscv/zvksc.c
> @@ -18,8 +18,8 @@
> #error "Feature macro for `Zvksh' not defined"
> #endif
>
> -#ifndef __riscv_zvbb
> -#error "Feature macro for `Zvbb' not defined"
> +#ifndef __riscv_zvkb
> +#error "Feature macro for `Zvkb' not defined"
> #endif
>
> #ifndef __riscv_zvkt
> diff --git a/gcc/testsuite/gcc.target/riscv/zvksg-1.c b/gcc/testsuite/gcc.target/riscv/zvksg-1.c
> index e6b30552e4c..a81c8faf302 100644
> --- a/gcc/testsuite/gcc.target/riscv/zvksg-1.c
> +++ b/gcc/testsuite/gcc.target/riscv/zvksg-1.c
> @@ -1,6 +1,6 @@
> /* { dg-do compile } */
> -/* { dg-options "-march=rv64gc_zvksed_zvksh_zvbb_zvkt_zvkg" { target { rv64 } } } */
> -/* { dg-options "-march=rv32gc_zvksed_zvksh_zvbb_zvkt_zvkg" { target { rv32 } } } */
> +/* { dg-options "-march=rv64gc_zvksed_zvksh_zvkb_zvkt_zvkg" { target { rv64 } } } */
> +/* { dg-options "-march=rv32gc_zvksed_zvksh_zvkb_zvkt_zvkg" { target { rv32 } } } */
>
> #ifndef __riscv_zvksg
> #error "Feature macro for `Zvksg' not defined"
> @@ -18,8 +18,8 @@
> #error "Feature macro for `Zvksh' not defined"
> #endif
>
> -#ifndef __riscv_zvbb
> -#error "Feature macro for `Zvbb' not defined"
> +#ifndef __riscv_zvkb
> +#error "Feature macro for `ZvKb' not defined"
> #endif
>
> #ifndef __riscv_zvkt
> diff --git a/gcc/testsuite/gcc.target/riscv/zvksg-2.c b/gcc/testsuite/gcc.target/riscv/zvksg-2.c
> index 2475e8bba1a..f6aa06bfbbe 100644
> --- a/gcc/testsuite/gcc.target/riscv/zvksg-2.c
> +++ b/gcc/testsuite/gcc.target/riscv/zvksg-2.c
> @@ -18,8 +18,8 @@
> #error "Feature macro for `Zvksh' not defined"
> #endif
>
> -#ifndef __riscv_zvbb
> -#error "Feature macro for `Zvbb' not defined"
> +#ifndef __riscv_zvkb
> +#error "Feature macro for `Zvkb' not defined"
> #endif
>
> #ifndef __riscv_zvkt
> diff --git a/gcc/testsuite/gcc.target/riscv/zvksg.c b/gcc/testsuite/gcc.target/riscv/zvksg.c
> index 4db9b5d6b9b..af2cd6e26ac 100644
> --- a/gcc/testsuite/gcc.target/riscv/zvksg.c
> +++ b/gcc/testsuite/gcc.target/riscv/zvksg.c
> @@ -18,8 +18,8 @@
> #error "Feature macro for `Zvksh' not defined"
> #endif
>
> -#ifndef __riscv_zvbb
> -#error "Feature macro for `Zvbb' not defined"
> +#ifndef __riscv_zvkb
> +#error "Feature macro for `Zvkb' not defined"
> #endif
>
> #ifndef __riscv_zvkt
> --
> 2.17.1
>
Committed! Thanks Kito.
BR,
Fei
On 2023-12-04 15:01 Kito Cheng <kito.cheng@gmail.com> wrote:
>
>LGTM again :)
>
>On Mon, Dec 4, 2023 at 2:44 PM Feng Wang <wangfeng@eswincomputing.com> wrote:
>>
>> Rebase and resend this patch due to it was not added into patchwork
>> before. Kito had already reviewed it. Please refer to
>> https://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg327499.html
>>
>> This patch add the Zvkb subset of crypto vector extension. The
>> corresponding test cases have aslo been modified.
>>
>> gcc/ChangeLog:
>>
>> * common/config/riscv/riscv-common.cc: Add zvkb ISA info.
>> * config/riscv/riscv.opt: Add Mask(ZVKB)
>>
>> gcc/testsuite/ChangeLog:
>>
>> * gcc.target/riscv/zvkn-1.c: Replace zvbb with zvkb.
>> * gcc.target/riscv/zvkn.c: Ditto.
>> * gcc.target/riscv/zvknc-1.c:Ditto.
>> * gcc.target/riscv/zvknc-2.c:Ditto.
>> * gcc.target/riscv/zvknc.c: Ditto.
>> * gcc.target/riscv/zvkng-1.c:Ditto.
>> * gcc.target/riscv/zvkng-2.c:Ditto.
>> * gcc.target/riscv/zvkng.c: Ditto.
>> * gcc.target/riscv/zvks-1.c: Ditto.
>> * gcc.target/riscv/zvks.c: Ditto.
>> * gcc.target/riscv/zvksc-1.c:Ditto.
>> * gcc.target/riscv/zvksc-2.c:Ditto.
>> * gcc.target/riscv/zvksc.c: Ditto.
>> * gcc.target/riscv/zvksg-1.c:Ditto.
>> * gcc.target/riscv/zvksg-2.c:Ditto.
>> * gcc.target/riscv/zvksg.c: Ditto.
>> ---
>> gcc/common/config/riscv/riscv-common.cc | 6 ++++--
>> gcc/config/riscv/riscv.opt | 2 ++
>> gcc/testsuite/gcc.target/riscv/zvkn-1.c | 8 ++++----
>> gcc/testsuite/gcc.target/riscv/zvkn.c | 4 ++--
>> gcc/testsuite/gcc.target/riscv/zvknc-1.c | 8 ++++----
>> gcc/testsuite/gcc.target/riscv/zvknc-2.c | 4 ++--
>> gcc/testsuite/gcc.target/riscv/zvknc.c | 4 ++--
>> gcc/testsuite/gcc.target/riscv/zvkng-1.c | 8 ++++----
>> gcc/testsuite/gcc.target/riscv/zvkng-2.c | 4 ++--
>> gcc/testsuite/gcc.target/riscv/zvkng.c | 4 ++--
>> gcc/testsuite/gcc.target/riscv/zvks-1.c | 8 ++++----
>> gcc/testsuite/gcc.target/riscv/zvks.c | 4 ++--
>> gcc/testsuite/gcc.target/riscv/zvksc-1.c | 8 ++++----
>> gcc/testsuite/gcc.target/riscv/zvksc-2.c | 4 ++--
>> gcc/testsuite/gcc.target/riscv/zvksc.c | 4 ++--
>> gcc/testsuite/gcc.target/riscv/zvksg-1.c | 8 ++++----
>> gcc/testsuite/gcc.target/riscv/zvksg-2.c | 4 ++--
>> gcc/testsuite/gcc.target/riscv/zvksg.c | 4 ++--
>> 18 files changed, 50 insertions(+), 46 deletions(-)
>>
>> diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc
>> index ded85b4c578..6c210412515 100644
>> --- a/gcc/common/config/riscv/riscv-common.cc
>> +++ b/gcc/common/config/riscv/riscv-common.cc
>> @@ -106,7 +106,7 @@ static const riscv_implied_info_t riscv_implied_info[] =
>>
>> {"zvkn", "zvkned"},
>> {"zvkn", "zvknhb"},
>> - {"zvkn", "zvbb"},
>> + {"zvkn", "zvkb"},
>> {"zvkn", "zvkt"},
>> {"zvknc", "zvkn"},
>> {"zvknc", "zvbc"},
>> @@ -114,7 +114,7 @@ static const riscv_implied_info_t riscv_implied_info[] =
>> {"zvkng", "zvkg"},
>> {"zvks", "zvksed"},
>> {"zvks", "zvksh"},
>> - {"zvks", "zvbb"},
>> + {"zvks", "zvkb"},
>> {"zvks", "zvkt"},
>> {"zvksc", "zvks"},
>> {"zvksc", "zvbc"},
>> @@ -253,6 +253,7 @@ static const struct riscv_ext_version riscv_ext_version_table[] =
>>
>> {"zvbb", ISA_SPEC_CLASS_NONE, 1, 0},
>> {"zvbc", ISA_SPEC_CLASS_NONE, 1, 0},
>> + {"zvkb", ISA_SPEC_CLASS_NONE, 1, 0},
>> {"zvkg", ISA_SPEC_CLASS_NONE, 1, 0},
>> {"zvkned", ISA_SPEC_CLASS_NONE, 1, 0},
>> {"zvknha", ISA_SPEC_CLASS_NONE, 1, 0},
>> @@ -1624,6 +1625,7 @@ static const riscv_ext_flag_table_t riscv_ext_flag_table[] =
>>
>> {"zvbb", &gcc_options::x_riscv_zvb_subext, MASK_ZVBB},
>> {"zvbc", &gcc_options::x_riscv_zvb_subext, MASK_ZVBC},
>> + {"zvkb", &gcc_options::x_riscv_zvb_subext, MASK_ZVKB},
>> {"zvkg", &gcc_options::x_riscv_zvk_subext, MASK_ZVKG},
>> {"zvkned", &gcc_options::x_riscv_zvk_subext, MASK_ZVKNED},
>> {"zvknha", &gcc_options::x_riscv_zvk_subext, MASK_ZVKNHA},
>> diff --git a/gcc/config/riscv/riscv.opt b/gcc/config/riscv/riscv.opt
>> index 0c6517bdc8b..78186fff6c5 100644
>> --- a/gcc/config/riscv/riscv.opt
>> +++ b/gcc/config/riscv/riscv.opt
>> @@ -319,6 +319,8 @@ Mask(ZVBB) Var(riscv_zvb_subext)
>>
>> Mask(ZVBC) Var(riscv_zvb_subext)
>>
>> +Mask(ZVKB) Var(riscv_zvb_subext)
>> +
>> TargetVariable
>> int riscv_zvk_subext
>>
>> diff --git a/gcc/testsuite/gcc.target/riscv/zvkn-1.c b/gcc/testsuite/gcc.target/riscv/zvkn-1.c
>> index 23b255b4779..069a8f66c92 100644
>> --- a/gcc/testsuite/gcc.target/riscv/zvkn-1.c
>> +++ b/gcc/testsuite/gcc.target/riscv/zvkn-1.c
>> @@ -1,6 +1,6 @@
>> /* { dg-do compile } */
>> -/* { dg-options "-march=rv64gc_zvkned_zvknhb_zvbb_zvkt" { target { rv64 } } } */
>> -/* { dg-options "-march=rv32gc_zvkned_zvknhb_zvbb_zvkt" { target { rv32 } } } */
>> +/* { dg-options "-march=rv64gc_zvkned_zvknhb_zvkb_zvkt" { target { rv64 } } } */
>> +/* { dg-options "-march=rv32gc_zvkned_zvknhb_zvkb_zvkt" { target { rv32 } } } */
>>
>> #ifndef __riscv_zvkn
>> #error "Feature macro for `Zvkn' not defined"
>> @@ -14,8 +14,8 @@
>> #error "Feature macro for `Zvknhb' not defined"
>> #endif
>>
>> -#ifndef __riscv_zvbb
>> -#error "Feature macro for `Zvbb' not defined"
>> +#ifndef __riscv_zvkb
>> +#error "Feature macro for `Zvkb' not defined"
>> #endif
>>
>> #ifndef __riscv_zvkt
>> diff --git a/gcc/testsuite/gcc.target/riscv/zvkn.c b/gcc/testsuite/gcc.target/riscv/zvkn.c
>> index 0047ebdede6..bcecbcc7e77 100644
>> --- a/gcc/testsuite/gcc.target/riscv/zvkn.c
>> +++ b/gcc/testsuite/gcc.target/riscv/zvkn.c
>> @@ -14,8 +14,8 @@
>> #error "Feature macro for `Zvknhb' not defined"
>> #endif
>>
>> -#ifndef __riscv_zvbb
>> -#error "Feature macro for `Zvbb' not defined"
>> +#ifndef __riscv_zvkb
>> +#error "Feature macro for `Zvkb' not defined"
>> #endif
>>
>> #ifndef __riscv_zvkt
>> diff --git a/gcc/testsuite/gcc.target/riscv/zvknc-1.c b/gcc/testsuite/gcc.target/riscv/zvknc-1.c
>> index d8a84c02118..64cae2bfe83 100644
>> --- a/gcc/testsuite/gcc.target/riscv/zvknc-1.c
>> +++ b/gcc/testsuite/gcc.target/riscv/zvknc-1.c
>> @@ -1,6 +1,6 @@
>> /* { dg-do compile } */
>> -/* { dg-options "-march=rv64gc_zvkned_zvknhb_zvbb_zvkt_zvbc" { target { rv64 } } } */
>> -/* { dg-options "-march=rv32gc_zvkned_zvknhb_zvbb_zvkt_zvbc" { target { rv32 } } } */
>> +/* { dg-options "-march=rv64gc_zvkned_zvknhb_zvkb_zvkt_zvbc" { target { rv64 } } } */
>> +/* { dg-options "-march=rv32gc_zvkned_zvknhb_zvkb_zvkt_zvbc" { target { rv32 } } } */
>>
>> #ifndef __riscv_zvknc
>> #error "Feature macro for `Zvknc' not defined"
>> @@ -18,8 +18,8 @@
>> #error "Feature macro for `Zvknhb' not defined"
>> #endif
>>
>> -#ifndef __riscv_zvbb
>> -#error "Feature macro for `Zvbb' not defined"
>> +#ifndef __riscv_zvkb
>> +#error "Feature macro for `ZvKb' not defined"
>> #endif
>>
>> #ifndef __riscv_zvkt
>> diff --git a/gcc/testsuite/gcc.target/riscv/zvknc-2.c b/gcc/testsuite/gcc.target/riscv/zvknc-2.c
>> index 36cc6335d13..1f8b510bfd1 100644
>> --- a/gcc/testsuite/gcc.target/riscv/zvknc-2.c
>> +++ b/gcc/testsuite/gcc.target/riscv/zvknc-2.c
>> @@ -18,8 +18,8 @@
>> #error "Feature macro for `Zvknhb' not defined"
>> #endif
>>
>> -#ifndef __riscv_zvbb
>> -#error "Feature macro for `Zvbb' not defined"
>> +#ifndef __riscv_zvkb
>> +#error "Feature macro for `Zvkb' not defined"
>> #endif
>>
>> #ifndef __riscv_zvkt
>> diff --git a/gcc/testsuite/gcc.target/riscv/zvknc.c b/gcc/testsuite/gcc.target/riscv/zvknc.c
>> index a177f17fbd7..64dda5fdf1f 100644
>> --- a/gcc/testsuite/gcc.target/riscv/zvknc.c
>> +++ b/gcc/testsuite/gcc.target/riscv/zvknc.c
>> @@ -18,8 +18,8 @@
>> #error "Feature macro for `Zvknhb' not defined"
>> #endif
>>
>> -#ifndef __riscv_zvbb
>> -#error "Feature macro for `Zvbb' not defined"
>> +#ifndef __riscv_zvkb
>> +#error "Feature macro for `Zvkb' not defined"
>> #endif
>>
>> #ifndef __riscv_zvkt
>> diff --git a/gcc/testsuite/gcc.target/riscv/zvkng-1.c b/gcc/testsuite/gcc.target/riscv/zvkng-1.c
>> index d996b42af00..5419585f4de 100644
>> --- a/gcc/testsuite/gcc.target/riscv/zvkng-1.c
>> +++ b/gcc/testsuite/gcc.target/riscv/zvkng-1.c
>> @@ -1,6 +1,6 @@
>> /* { dg-do compile } */
>> -/* { dg-options "-march=rv64gc_zvkned_zvknhb_zvbb_zvkt_zvkg" { target { rv64 } } } */
>> -/* { dg-options "-march=rv32gc_zvkned_zvknhb_zvbb_zvkt_zvkg" { target { rv32 } } } */
>> +/* { dg-options "-march=rv64gc_zvkned_zvknhb_zvkb_zvkt_zvkg" { target { rv64 } } } */
>> +/* { dg-options "-march=rv32gc_zvkned_zvknhb_zvkb_zvkt_zvkg" { target { rv32 } } } */
>>
>> #ifndef __riscv_zvkng
>> #error "Feature macro for `Zvkng' not defined"
>> @@ -18,8 +18,8 @@
>> #error "Feature macro for `Zvknhb' not defined"
>> #endif
>>
>> -#ifndef __riscv_zvbb
>> -#error "Feature macro for `Zvbb' not defined"
>> +#ifndef __riscv_zvkb
>> +#error "Feature macro for `Zvkb' not defined"
>> #endif
>>
>> #ifndef __riscv_zvkt
>> diff --git a/gcc/testsuite/gcc.target/riscv/zvkng-2.c b/gcc/testsuite/gcc.target/riscv/zvkng-2.c
>> index 00199992d5c..6c7b239e831 100644
>> --- a/gcc/testsuite/gcc.target/riscv/zvkng-2.c
>> +++ b/gcc/testsuite/gcc.target/riscv/zvkng-2.c
>> @@ -18,8 +18,8 @@
>> #error "Feature macro for `Zvknhb' not defined"
>> #endif
>>
>> -#ifndef __riscv_zvbb
>> -#error "Feature macro for `Zvbb' not defined"
>> +#ifndef __riscv_zvkb
>> +#error "Feature macro for `Zvkb' not defined"
>> #endif
>>
>> #ifndef __riscv_zvkt
>> diff --git a/gcc/testsuite/gcc.target/riscv/zvkng.c b/gcc/testsuite/gcc.target/riscv/zvkng.c
>> index 4605faf3c6c..6c516a4ae13 100644
>> --- a/gcc/testsuite/gcc.target/riscv/zvkng.c
>> +++ b/gcc/testsuite/gcc.target/riscv/zvkng.c
>> @@ -18,8 +18,8 @@
>> #error "Feature macro for `Zvknhb' not defined"
>> #endif
>>
>> -#ifndef __riscv_zvbb
>> -#error "Feature macro for `Zvbb' not defined"
>> +#ifndef __riscv_zvkb
>> +#error "Feature macro for `Zvkb' not defined"
>> #endif
>>
>> #ifndef __riscv_zvkt
>> diff --git a/gcc/testsuite/gcc.target/riscv/zvks-1.c b/gcc/testsuite/gcc.target/riscv/zvks-1.c
>> index a576cdb0476..180b3f3c2a9 100644
>> --- a/gcc/testsuite/gcc.target/riscv/zvks-1.c
>> +++ b/gcc/testsuite/gcc.target/riscv/zvks-1.c
>> @@ -1,6 +1,6 @@
>> /* { dg-do compile } */
>> -/* { dg-options "-march=rv64gc_zvksed_zvksh_zvbb_zvkt" { target { rv64 } } } */
>> -/* { dg-options "-march=rv32gc_zvksed_zvksh_zvbb_zvkt" { target { rv32 } } } */
>> +/* { dg-options "-march=rv64gc_zvksed_zvksh_zvkb_zvkt" { target { rv64 } } } */
>> +/* { dg-options "-march=rv32gc_zvksed_zvksh_zvkb_zvkt" { target { rv32 } } } */
>>
>> #ifndef __riscv_zvks
>> #error "Feature macro for `Zvks' not defined"
>> @@ -14,8 +14,8 @@
>> #error "Feature macro for `Zvksh' not defined"
>> #endif
>>
>> -#ifndef __riscv_zvbb
>> -#error "Feature macro for `Zvbb' not defined"
>> +#ifndef __riscv_zvkb
>> +#error "Feature macro for `Zvkb' not defined"
>> #endif
>>
>> #ifndef __riscv_zvkt
>> diff --git a/gcc/testsuite/gcc.target/riscv/zvks.c b/gcc/testsuite/gcc.target/riscv/zvks.c
>> index d31b2610c20..2022d168ec1 100644
>> --- a/gcc/testsuite/gcc.target/riscv/zvks.c
>> +++ b/gcc/testsuite/gcc.target/riscv/zvks.c
>> @@ -14,8 +14,8 @@
>> #error "Feature macro for `Zvksh' not defined"
>> #endif
>>
>> -#ifndef __riscv_zvbb
>> -#error "Feature macro for `Zvbb' not defined"
>> +#ifndef __riscv_zvkb
>> +#error "Feature macro for `Zvkb' not defined"
>> #endif
>>
>> #ifndef __riscv_zvkt
>> diff --git a/gcc/testsuite/gcc.target/riscv/zvksc-1.c b/gcc/testsuite/gcc.target/riscv/zvksc-1.c
>> index 3b76e6cea70..0c81b4ee93b 100644
>> --- a/gcc/testsuite/gcc.target/riscv/zvksc-1.c
>> +++ b/gcc/testsuite/gcc.target/riscv/zvksc-1.c
>> @@ -1,6 +1,6 @@
>> /* { dg-do compile } */
>> -/* { dg-options "-march=rv64gc_zvksed_zvksh_zvbb_zvkt_zvbc" { target { rv64 } } } */
>> -/* { dg-options "-march=rv32gc_zvksed_zvksh_zvbb_zvkt_zvbc" { target { rv32 } } } */
>> +/* { dg-options "-march=rv64gc_zvksed_zvksh_zvkb_zvkt_zvbc" { target { rv64 } } } */
>> +/* { dg-options "-march=rv32gc_zvksed_zvksh_zvkb_zvkt_zvbc" { target { rv32 } } } */
>>
>> #ifndef __riscv_zvksc
>> #error "Feature macro for `Zvksc' not defined"
>> @@ -18,8 +18,8 @@
>> #error "Feature macro for `Zvksh' not defined"
>> #endif
>>
>> -#ifndef __riscv_zvbb
>> -#error "Feature macro for `Zvbb' not defined"
>> +#ifndef __riscv_zvkb
>> +#error "Feature macro for `Zvkb' not defined"
>> #endif
>>
>> #ifndef __riscv_zvkt
>> diff --git a/gcc/testsuite/gcc.target/riscv/zvksc-2.c b/gcc/testsuite/gcc.target/riscv/zvksc-2.c
>> index b95e34ec6e4..0cee3586390 100644
>> --- a/gcc/testsuite/gcc.target/riscv/zvksc-2.c
>> +++ b/gcc/testsuite/gcc.target/riscv/zvksc-2.c
>> @@ -18,8 +18,8 @@
>> #error "Feature macro for `Zvksh' not defined"
>> #endif
>>
>> -#ifndef __riscv_zvbb
>> -#error "Feature macro for `Zvbb' not defined"
>> +#ifndef __riscv_zvkb
>> +#error "Feature macro for `Zvkb' not defined"
>> #endif
>>
>> #ifndef __riscv_zvkt
>> diff --git a/gcc/testsuite/gcc.target/riscv/zvksc.c b/gcc/testsuite/gcc.target/riscv/zvksc.c
>> index 983f1aa89ec..6c33a86aa2e 100644
>> --- a/gcc/testsuite/gcc.target/riscv/zvksc.c
>> +++ b/gcc/testsuite/gcc.target/riscv/zvksc.c
>> @@ -18,8 +18,8 @@
>> #error "Feature macro for `Zvksh' not defined"
>> #endif
>>
>> -#ifndef __riscv_zvbb
>> -#error "Feature macro for `Zvbb' not defined"
>> +#ifndef __riscv_zvkb
>> +#error "Feature macro for `Zvkb' not defined"
>> #endif
>>
>> #ifndef __riscv_zvkt
>> diff --git a/gcc/testsuite/gcc.target/riscv/zvksg-1.c b/gcc/testsuite/gcc.target/riscv/zvksg-1.c
>> index e6b30552e4c..a81c8faf302 100644
>> --- a/gcc/testsuite/gcc.target/riscv/zvksg-1.c
>> +++ b/gcc/testsuite/gcc.target/riscv/zvksg-1.c
>> @@ -1,6 +1,6 @@
>> /* { dg-do compile } */
>> -/* { dg-options "-march=rv64gc_zvksed_zvksh_zvbb_zvkt_zvkg" { target { rv64 } } } */
>> -/* { dg-options "-march=rv32gc_zvksed_zvksh_zvbb_zvkt_zvkg" { target { rv32 } } } */
>> +/* { dg-options "-march=rv64gc_zvksed_zvksh_zvkb_zvkt_zvkg" { target { rv64 } } } */
>> +/* { dg-options "-march=rv32gc_zvksed_zvksh_zvkb_zvkt_zvkg" { target { rv32 } } } */
>>
>> #ifndef __riscv_zvksg
>> #error "Feature macro for `Zvksg' not defined"
>> @@ -18,8 +18,8 @@
>> #error "Feature macro for `Zvksh' not defined"
>> #endif
>>
>> -#ifndef __riscv_zvbb
>> -#error "Feature macro for `Zvbb' not defined"
>> +#ifndef __riscv_zvkb
>> +#error "Feature macro for `ZvKb' not defined"
>> #endif
>>
>> #ifndef __riscv_zvkt
>> diff --git a/gcc/testsuite/gcc.target/riscv/zvksg-2.c b/gcc/testsuite/gcc.target/riscv/zvksg-2.c
>> index 2475e8bba1a..f6aa06bfbbe 100644
>> --- a/gcc/testsuite/gcc.target/riscv/zvksg-2.c
>> +++ b/gcc/testsuite/gcc.target/riscv/zvksg-2.c
>> @@ -18,8 +18,8 @@
>> #error "Feature macro for `Zvksh' not defined"
>> #endif
>>
>> -#ifndef __riscv_zvbb
>> -#error "Feature macro for `Zvbb' not defined"
>> +#ifndef __riscv_zvkb
>> +#error "Feature macro for `Zvkb' not defined"
>> #endif
>>
>> #ifndef __riscv_zvkt
>> diff --git a/gcc/testsuite/gcc.target/riscv/zvksg.c b/gcc/testsuite/gcc.target/riscv/zvksg.c
>> index 4db9b5d6b9b..af2cd6e26ac 100644
>> --- a/gcc/testsuite/gcc.target/riscv/zvksg.c
>> +++ b/gcc/testsuite/gcc.target/riscv/zvksg.c
>> @@ -18,8 +18,8 @@
>> #error "Feature macro for `Zvksh' not defined"
>> #endif
>>
>> -#ifndef __riscv_zvbb
>> -#error "Feature macro for `Zvbb' not defined"
>> +#ifndef __riscv_zvkb
>> +#error "Feature macro for `Zvkb' not defined"
>> #endif
>>
>> #ifndef __riscv_zvkt
>> --
>> 2.17.1
>>
@@ -106,7 +106,7 @@ static const riscv_implied_info_t riscv_implied_info[] =
{"zvkn", "zvkned"},
{"zvkn", "zvknhb"},
- {"zvkn", "zvbb"},
+ {"zvkn", "zvkb"},
{"zvkn", "zvkt"},
{"zvknc", "zvkn"},
{"zvknc", "zvbc"},
@@ -114,7 +114,7 @@ static const riscv_implied_info_t riscv_implied_info[] =
{"zvkng", "zvkg"},
{"zvks", "zvksed"},
{"zvks", "zvksh"},
- {"zvks", "zvbb"},
+ {"zvks", "zvkb"},
{"zvks", "zvkt"},
{"zvksc", "zvks"},
{"zvksc", "zvbc"},
@@ -253,6 +253,7 @@ static const struct riscv_ext_version riscv_ext_version_table[] =
{"zvbb", ISA_SPEC_CLASS_NONE, 1, 0},
{"zvbc", ISA_SPEC_CLASS_NONE, 1, 0},
+ {"zvkb", ISA_SPEC_CLASS_NONE, 1, 0},
{"zvkg", ISA_SPEC_CLASS_NONE, 1, 0},
{"zvkned", ISA_SPEC_CLASS_NONE, 1, 0},
{"zvknha", ISA_SPEC_CLASS_NONE, 1, 0},
@@ -1624,6 +1625,7 @@ static const riscv_ext_flag_table_t riscv_ext_flag_table[] =
{"zvbb", &gcc_options::x_riscv_zvb_subext, MASK_ZVBB},
{"zvbc", &gcc_options::x_riscv_zvb_subext, MASK_ZVBC},
+ {"zvkb", &gcc_options::x_riscv_zvb_subext, MASK_ZVKB},
{"zvkg", &gcc_options::x_riscv_zvk_subext, MASK_ZVKG},
{"zvkned", &gcc_options::x_riscv_zvk_subext, MASK_ZVKNED},
{"zvknha", &gcc_options::x_riscv_zvk_subext, MASK_ZVKNHA},
@@ -319,6 +319,8 @@ Mask(ZVBB) Var(riscv_zvb_subext)
Mask(ZVBC) Var(riscv_zvb_subext)
+Mask(ZVKB) Var(riscv_zvb_subext)
+
TargetVariable
int riscv_zvk_subext
@@ -1,6 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc_zvkned_zvknhb_zvbb_zvkt" { target { rv64 } } } */
-/* { dg-options "-march=rv32gc_zvkned_zvknhb_zvbb_zvkt" { target { rv32 } } } */
+/* { dg-options "-march=rv64gc_zvkned_zvknhb_zvkb_zvkt" { target { rv64 } } } */
+/* { dg-options "-march=rv32gc_zvkned_zvknhb_zvkb_zvkt" { target { rv32 } } } */
#ifndef __riscv_zvkn
#error "Feature macro for `Zvkn' not defined"
@@ -14,8 +14,8 @@
#error "Feature macro for `Zvknhb' not defined"
#endif
-#ifndef __riscv_zvbb
-#error "Feature macro for `Zvbb' not defined"
+#ifndef __riscv_zvkb
+#error "Feature macro for `Zvkb' not defined"
#endif
#ifndef __riscv_zvkt
@@ -14,8 +14,8 @@
#error "Feature macro for `Zvknhb' not defined"
#endif
-#ifndef __riscv_zvbb
-#error "Feature macro for `Zvbb' not defined"
+#ifndef __riscv_zvkb
+#error "Feature macro for `Zvkb' not defined"
#endif
#ifndef __riscv_zvkt
@@ -1,6 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc_zvkned_zvknhb_zvbb_zvkt_zvbc" { target { rv64 } } } */
-/* { dg-options "-march=rv32gc_zvkned_zvknhb_zvbb_zvkt_zvbc" { target { rv32 } } } */
+/* { dg-options "-march=rv64gc_zvkned_zvknhb_zvkb_zvkt_zvbc" { target { rv64 } } } */
+/* { dg-options "-march=rv32gc_zvkned_zvknhb_zvkb_zvkt_zvbc" { target { rv32 } } } */
#ifndef __riscv_zvknc
#error "Feature macro for `Zvknc' not defined"
@@ -18,8 +18,8 @@
#error "Feature macro for `Zvknhb' not defined"
#endif
-#ifndef __riscv_zvbb
-#error "Feature macro for `Zvbb' not defined"
+#ifndef __riscv_zvkb
+#error "Feature macro for `ZvKb' not defined"
#endif
#ifndef __riscv_zvkt
@@ -18,8 +18,8 @@
#error "Feature macro for `Zvknhb' not defined"
#endif
-#ifndef __riscv_zvbb
-#error "Feature macro for `Zvbb' not defined"
+#ifndef __riscv_zvkb
+#error "Feature macro for `Zvkb' not defined"
#endif
#ifndef __riscv_zvkt
@@ -18,8 +18,8 @@
#error "Feature macro for `Zvknhb' not defined"
#endif
-#ifndef __riscv_zvbb
-#error "Feature macro for `Zvbb' not defined"
+#ifndef __riscv_zvkb
+#error "Feature macro for `Zvkb' not defined"
#endif
#ifndef __riscv_zvkt
@@ -1,6 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc_zvkned_zvknhb_zvbb_zvkt_zvkg" { target { rv64 } } } */
-/* { dg-options "-march=rv32gc_zvkned_zvknhb_zvbb_zvkt_zvkg" { target { rv32 } } } */
+/* { dg-options "-march=rv64gc_zvkned_zvknhb_zvkb_zvkt_zvkg" { target { rv64 } } } */
+/* { dg-options "-march=rv32gc_zvkned_zvknhb_zvkb_zvkt_zvkg" { target { rv32 } } } */
#ifndef __riscv_zvkng
#error "Feature macro for `Zvkng' not defined"
@@ -18,8 +18,8 @@
#error "Feature macro for `Zvknhb' not defined"
#endif
-#ifndef __riscv_zvbb
-#error "Feature macro for `Zvbb' not defined"
+#ifndef __riscv_zvkb
+#error "Feature macro for `Zvkb' not defined"
#endif
#ifndef __riscv_zvkt
@@ -18,8 +18,8 @@
#error "Feature macro for `Zvknhb' not defined"
#endif
-#ifndef __riscv_zvbb
-#error "Feature macro for `Zvbb' not defined"
+#ifndef __riscv_zvkb
+#error "Feature macro for `Zvkb' not defined"
#endif
#ifndef __riscv_zvkt
@@ -18,8 +18,8 @@
#error "Feature macro for `Zvknhb' not defined"
#endif
-#ifndef __riscv_zvbb
-#error "Feature macro for `Zvbb' not defined"
+#ifndef __riscv_zvkb
+#error "Feature macro for `Zvkb' not defined"
#endif
#ifndef __riscv_zvkt
@@ -1,6 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc_zvksed_zvksh_zvbb_zvkt" { target { rv64 } } } */
-/* { dg-options "-march=rv32gc_zvksed_zvksh_zvbb_zvkt" { target { rv32 } } } */
+/* { dg-options "-march=rv64gc_zvksed_zvksh_zvkb_zvkt" { target { rv64 } } } */
+/* { dg-options "-march=rv32gc_zvksed_zvksh_zvkb_zvkt" { target { rv32 } } } */
#ifndef __riscv_zvks
#error "Feature macro for `Zvks' not defined"
@@ -14,8 +14,8 @@
#error "Feature macro for `Zvksh' not defined"
#endif
-#ifndef __riscv_zvbb
-#error "Feature macro for `Zvbb' not defined"
+#ifndef __riscv_zvkb
+#error "Feature macro for `Zvkb' not defined"
#endif
#ifndef __riscv_zvkt
@@ -14,8 +14,8 @@
#error "Feature macro for `Zvksh' not defined"
#endif
-#ifndef __riscv_zvbb
-#error "Feature macro for `Zvbb' not defined"
+#ifndef __riscv_zvkb
+#error "Feature macro for `Zvkb' not defined"
#endif
#ifndef __riscv_zvkt
@@ -1,6 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc_zvksed_zvksh_zvbb_zvkt_zvbc" { target { rv64 } } } */
-/* { dg-options "-march=rv32gc_zvksed_zvksh_zvbb_zvkt_zvbc" { target { rv32 } } } */
+/* { dg-options "-march=rv64gc_zvksed_zvksh_zvkb_zvkt_zvbc" { target { rv64 } } } */
+/* { dg-options "-march=rv32gc_zvksed_zvksh_zvkb_zvkt_zvbc" { target { rv32 } } } */
#ifndef __riscv_zvksc
#error "Feature macro for `Zvksc' not defined"
@@ -18,8 +18,8 @@
#error "Feature macro for `Zvksh' not defined"
#endif
-#ifndef __riscv_zvbb
-#error "Feature macro for `Zvbb' not defined"
+#ifndef __riscv_zvkb
+#error "Feature macro for `Zvkb' not defined"
#endif
#ifndef __riscv_zvkt
@@ -18,8 +18,8 @@
#error "Feature macro for `Zvksh' not defined"
#endif
-#ifndef __riscv_zvbb
-#error "Feature macro for `Zvbb' not defined"
+#ifndef __riscv_zvkb
+#error "Feature macro for `Zvkb' not defined"
#endif
#ifndef __riscv_zvkt
@@ -18,8 +18,8 @@
#error "Feature macro for `Zvksh' not defined"
#endif
-#ifndef __riscv_zvbb
-#error "Feature macro for `Zvbb' not defined"
+#ifndef __riscv_zvkb
+#error "Feature macro for `Zvkb' not defined"
#endif
#ifndef __riscv_zvkt
@@ -1,6 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc_zvksed_zvksh_zvbb_zvkt_zvkg" { target { rv64 } } } */
-/* { dg-options "-march=rv32gc_zvksed_zvksh_zvbb_zvkt_zvkg" { target { rv32 } } } */
+/* { dg-options "-march=rv64gc_zvksed_zvksh_zvkb_zvkt_zvkg" { target { rv64 } } } */
+/* { dg-options "-march=rv32gc_zvksed_zvksh_zvkb_zvkt_zvkg" { target { rv32 } } } */
#ifndef __riscv_zvksg
#error "Feature macro for `Zvksg' not defined"
@@ -18,8 +18,8 @@
#error "Feature macro for `Zvksh' not defined"
#endif
-#ifndef __riscv_zvbb
-#error "Feature macro for `Zvbb' not defined"
+#ifndef __riscv_zvkb
+#error "Feature macro for `ZvKb' not defined"
#endif
#ifndef __riscv_zvkt
@@ -18,8 +18,8 @@
#error "Feature macro for `Zvksh' not defined"
#endif
-#ifndef __riscv_zvbb
-#error "Feature macro for `Zvbb' not defined"
+#ifndef __riscv_zvkb
+#error "Feature macro for `Zvkb' not defined"
#endif
#ifndef __riscv_zvkt
@@ -18,8 +18,8 @@
#error "Feature macro for `Zvksh' not defined"
#endif
-#ifndef __riscv_zvbb
-#error "Feature macro for `Zvbb' not defined"
+#ifndef __riscv_zvkb
+#error "Feature macro for `Zvkb' not defined"
#endif
#ifndef __riscv_zvkt