]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Minimal support for ssnpm, smnpm and smmpm extensions.
authorDongyan Chen <chendongyan@isrc.iscas.ac.cn>
Mon, 12 May 2025 09:19:24 +0000 (17:19 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Mon, 12 May 2025 13:31:14 +0000 (21:31 +0800)
commit7e5f5fd101f8686d34532f7afab9314f252e71cd
tree9ce1bb7b1a8bd91076592e805ea1dabb653328b8
parentd42f7244289ad8be1d3f7320528240bb849979e4
RISC-V: Minimal support for ssnpm, smnpm and smmpm extensions.

This patch support ssnpm, smnpm, smmpm, sspm and supm extensions[1].
To enable GCC to recognize and process ssnpm, smnpm, smmpm, sspm and
supm extensions correctly at compile time.

[1]https://github.com/riscv/riscv-j-extension/blob/master/zjpm/instructions.adoc

Changes for v5:
- Fix the testsuite error in arch-50.c.
Changes for v4:
- Fix the code based on the commit id 9b13bea07706a7cae0185f8a860d67209308c050.
Changes for v3:
- Fix the error messages in gcc/testsuite/gcc.target/riscv/arch-46.c
Changes for v2:
- Add the sspm and supm extensions.
- Add the check_conflict_ext function to check the compatibility of ssnpm, smnpm, smmpm, sspm and supm extensions.
- Add the test cases for ssnpm, smnpm, smmpm, sspm and supm extensions.

gcc/ChangeLog:

* common/config/riscv/riscv-common.cc
(riscv_subset_list::check_conflict_ext): New extension.
* config/riscv/riscv.opt: Ditto.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/arch-ss-1.c: New test.
* gcc.target/riscv/arch-ss-2.c: New test.
gcc/common/config/riscv/riscv-common.cc
gcc/config/riscv/riscv.opt
gcc/testsuite/gcc.target/riscv/arch-ss-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/arch-ss-2.c [new file with mode: 0644]