[PATCH] RISC-V: Minimal support for sdtrig and ssstrict extensions.

This patch support sdtrig and ssstrict extensions[1].
To enable GCC to recognize and process sdtrig and ssstrict extensions correctly
at compile time.

[1] https://github.com/riscv/riscv-profiles/blob/main/src/rva23-profile.adoc

gcc/ChangeLog:

	* common/config/riscv/riscv-common.cc: New extension.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/arch-47.c: New test.
This commit is contained in:
Dongyan Chen
2025-05-06 17:09:54 -06:00
committed by Jeff Law
parent aed2a447c7
commit 82126b26d1
2 changed files with 8 additions and 0 deletions

View File

@@ -432,6 +432,8 @@ static const struct riscv_ext_version riscv_ext_version_table[] =
{"zcmp", ISA_SPEC_CLASS_NONE, 1, 0},
{"zcmt", ISA_SPEC_CLASS_NONE, 1, 0},
{"sdtrig", ISA_SPEC_CLASS_NONE, 1, 0},
{"smaia", ISA_SPEC_CLASS_NONE, 1, 0},
{"smepmp", ISA_SPEC_CLASS_NONE, 1, 0},
{"smstateen", ISA_SPEC_CLASS_NONE, 1, 0},
@@ -440,6 +442,7 @@ static const struct riscv_ext_version riscv_ext_version_table[] =
{"sscofpmf", ISA_SPEC_CLASS_NONE, 1, 0},
{"ssstateen", ISA_SPEC_CLASS_NONE, 1, 0},
{"sstc", ISA_SPEC_CLASS_NONE, 1, 0},
{"ssstrict", ISA_SPEC_CLASS_NONE, 1, 0},
{"svade", ISA_SPEC_CLASS_NONE, 1, 0},
{"svadu", ISA_SPEC_CLASS_NONE, 1, 0},

View File

@@ -0,0 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-march=rv64gc_sdtrig_ssstrict -mabi=lp64" } */
int foo()
{
}