aboutsummaryrefslogtreecommitdiff
path: root/gcc/common
diff options
context:
space:
mode:
authorJiawei <jiawei@iscas.ac.cn>2024-08-02 23:23:14 +0800
committerJiawei <jiawei@iscas.ac.cn>2024-08-08 14:13:02 +0800
commitc8f3fdd53871a20838be532b58ef610bf1dd75e1 (patch)
tree44529850371229e53bae1a948dcf17de37eee61f /gcc/common
parent79209273663672ff05663554741fd2558b4aac99 (diff)
downloadgcc-c8f3fdd53871a20838be532b58ef610bf1dd75e1.zip
gcc-c8f3fdd53871a20838be532b58ef610bf1dd75e1.tar.gz
gcc-c8f3fdd53871a20838be532b58ef610bf1dd75e1.tar.bz2
RISC-V: Minimal support for Zimop extension.
This patch support Zimop and Zcmop extension[1].To enable GCC to recognize and process Zimop and Zcmop extension correctly at compile time. https://github.com/riscv/riscv-isa-manual/blob/main/src/zimop.adoc gcc/ChangeLog: * common/config/riscv/riscv-common.cc: New extension. * config/riscv/riscv.opt: New mask. gcc/testsuite/ChangeLog: * gcc.target/riscv/arch-42.c: New test. * gcc.target/riscv/arch-43.c: New test.
Diffstat (limited to 'gcc/common')
-rw-r--r--gcc/common/config/riscv/riscv-common.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc
index 1944c778..62c6e1d 100644
--- a/gcc/common/config/riscv/riscv-common.cc
+++ b/gcc/common/config/riscv/riscv-common.cc
@@ -97,6 +97,8 @@ static const riscv_implied_info_t riscv_implied_info[] =
{"zabha", "zaamo"},
{"zacas", "zaamo"},
+ {"zcmop", "zca"},
+
{"b", "zba"},
{"b", "zbb"},
{"b", "zbs"},
@@ -319,6 +321,9 @@ static const struct riscv_ext_version riscv_ext_version_table[] =
{"zicclsm", ISA_SPEC_CLASS_NONE, 1, 0},
{"ziccrse", ISA_SPEC_CLASS_NONE, 1, 0},
+ {"zimop", ISA_SPEC_CLASS_NONE, 1, 0},
+ {"zcmop", ISA_SPEC_CLASS_NONE, 1, 0},
+
{"zicntr", ISA_SPEC_CLASS_NONE, 2, 0},
{"zihpm", ISA_SPEC_CLASS_NONE, 2, 0},
@@ -1629,6 +1634,9 @@ static const riscv_ext_flag_table_t riscv_ext_flag_table[] =
{"zicbop", &gcc_options::x_riscv_zicmo_subext, MASK_ZICBOP},
{"zic64b", &gcc_options::x_riscv_zicmo_subext, MASK_ZIC64B},
+ {"zimop", &gcc_options::x_riscv_mop_subext, MASK_ZIMOP},
+ {"zcmop", &gcc_options::x_riscv_mop_subext, MASK_ZCMOP},
+
{"zve32x", &gcc_options::x_target_flags, MASK_VECTOR},
{"zve32f", &gcc_options::x_target_flags, MASK_VECTOR},
{"zve64x", &gcc_options::x_target_flags, MASK_VECTOR},