]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Support RISC-V Profiles 20/22.
authorJiawei <jiawei@iscas.ac.cn>
Sat, 10 May 2025 12:25:52 +0000 (20:25 +0800)
committerJiawei <jiawei@iscas.ac.cn>
Sun, 11 May 2025 03:45:16 +0000 (11:45 +0800)
commit43b450e3f72a53c744e77f55393962f1d349373a
tree2218ba2dbe8355b46196308a44dd36431f82e885
parentbfb61bf309ed207694a97adabc454bfd0936b269
RISC-V: Support RISC-V Profiles 20/22.

This patch introduces support for RISC-V Profiles RV20 and RV22 [1],
enabling developers to utilize these profiles through the -march option.

[1] https://github.com/riscv/riscv-profiles/releases/tag/v1.0

Version log:
Using lowercase letters to present Profiles.
Using '_' as divsor between Profiles and other RISC-V extension.
Add descriptions in invoke.texi.
Checking if there exist '_' between Profiles and additional extensions.
Using std::string to avoid memory problems.

gcc/ChangeLog:

* common/config/riscv/riscv-common.cc (struct riscv_profiles): New struct.
(riscv_subset_list::parse_profiles): New parser.
(riscv_subset_list::parse_base_ext): Ditto.
* config/riscv/riscv-subset.h: New def.
* doc/invoke.texi: New option descriptions.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/arch-49.c: New test.
* gcc.target/riscv/arch-50.c: New test.
* gcc.target/riscv/arch-51.c: New test.
* gcc.target/riscv/arch-52.c: New test.
gcc/common/config/riscv/riscv-common.cc
gcc/config/riscv/riscv-subset.h
gcc/doc/invoke.texi
gcc/testsuite/gcc.target/riscv/arch-49.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/arch-50.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/arch-51.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/arch-52.c [new file with mode: 0644]