aboutsummaryrefslogtreecommitdiff
path: root/gcc/common
diff options
context:
space:
mode:
authorSiYu Wu <siyu@isrc.iscas.ac.cn>2021-11-22 16:19:09 +0800
committerKito Cheng <kito.cheng@sifive.com>2021-12-04 00:10:26 +0800
commitadd31efdc7b0aa869cb9d83f40e274e864072b25 (patch)
tree714eaf82d8558b44bc014670d6ede53deebeb8bd /gcc/common
parent06f2e7d49fc6341ea0128ccd83fd13705dd2c523 (diff)
downloadgcc-add31efdc7b0aa869cb9d83f40e274e864072b25.zip
gcc-add31efdc7b0aa869cb9d83f40e274e864072b25.tar.gz
gcc-add31efdc7b0aa869cb9d83f40e274e864072b25.tar.bz2
RISC-V: Add option defines for Scalar Cryptography
gcc/ChangeLog: 2021-11-21 SiYu Wu <siyu@isrc.iscas.ac.cn> * common/config/riscv/riscv-common.c (riscv_ext_version_table): Add zbk* and zk*. * config/riscv/riscv-opts.h (MASK_ZBKB): New. (MASK_ZBKC): Ditto. (MASK_ZBKX): Ditto. (MASK_ZKNE): Ditto. (MASK_ZKND): Ditto. (MASK_ZKNH): Ditto. (MASK_ZKR): Ditto. (MASK_ZKSED): Ditto. (MASK_ZKSH): Ditto. (MASK_ZKT): Ditto. (TARGET_ZBKB): Ditto. (TARGET_ZBKC): Ditto. (TARGET_ZBKX): Ditto. (TARGET_ZKNE): Ditto. (TARGET_ZKND): Ditto. (TARGET_ZKNH): Ditto. (TARGET_ZKR): Ditto. (TARGET_ZKSED): Ditto. (TARGET_ZKSH): Ditto. (TARGET_ZKT): Ditto. * config/riscv/riscv.opt (riscv_zk_subext): New.
Diffstat (limited to 'gcc/common')
-rw-r--r--gcc/common/config/riscv/riscv-common.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/common/config/riscv/riscv-common.c b/gcc/common/config/riscv/riscv-common.c
index b8dd0ae..14dc605 100644
--- a/gcc/common/config/riscv/riscv-common.c
+++ b/gcc/common/config/riscv/riscv-common.c
@@ -106,6 +106,17 @@ static const struct riscv_ext_version riscv_ext_version_table[] =
{"zbc", ISA_SPEC_CLASS_NONE, 1, 0},
{"zbs", ISA_SPEC_CLASS_NONE, 1, 0},
+ {"zbkb", ISA_SPEC_CLASS_NONE, 1, 0},
+ {"zbkc", ISA_SPEC_CLASS_NONE, 1, 0},
+ {"zbkx", ISA_SPEC_CLASS_NONE, 1, 0},
+ {"zkne", ISA_SPEC_CLASS_NONE, 1, 0},
+ {"zknd", ISA_SPEC_CLASS_NONE, 1, 0},
+ {"zknh", ISA_SPEC_CLASS_NONE, 1, 0},
+ {"zkr", ISA_SPEC_CLASS_NONE, 1, 0},
+ {"zksed", ISA_SPEC_CLASS_NONE, 1, 0},
+ {"zksh", ISA_SPEC_CLASS_NONE, 1, 0},
+ {"zkt", ISA_SPEC_CLASS_NONE, 1, 0},
+
/* Terminate the list. */
{NULL, ISA_SPEC_CLASS_NONE, 0, 0}
};
@@ -915,6 +926,17 @@ static const riscv_ext_flag_table_t riscv_ext_flag_table[] =
{"zbc", &gcc_options::x_riscv_zb_subext, MASK_ZBC},
{"zbs", &gcc_options::x_riscv_zb_subext, MASK_ZBS},
+ {"zbkb", &gcc_options::x_riscv_zk_subext, MASK_ZBKB},
+ {"zbkc", &gcc_options::x_riscv_zk_subext, MASK_ZBKC},
+ {"zbkx", &gcc_options::x_riscv_zk_subext, MASK_ZBKX},
+ {"zknd", &gcc_options::x_riscv_zk_subext, MASK_ZKND},
+ {"zkne", &gcc_options::x_riscv_zk_subext, MASK_ZKNE},
+ {"zknh", &gcc_options::x_riscv_zk_subext, MASK_ZKNH},
+ {"zkr", &gcc_options::x_riscv_zk_subext, MASK_ZKR},
+ {"zksed", &gcc_options::x_riscv_zk_subext, MASK_ZKSED},
+ {"zksh", &gcc_options::x_riscv_zk_subext, MASK_ZKSH},
+ {"zkt", &gcc_options::x_riscv_zk_subext, MASK_ZKT},
+
{NULL, NULL, 0}
};