diff options
author | Zhongyao Chen <chenzhongyao.hit@gmail.com> | 2025-10-13 20:55:40 -0600 |
---|---|---|
committer | Jeff Law <jlaw@ventanamicro.com> | 2025-10-13 20:56:07 -0600 |
commit | 79b8f23a7099a0ff4b4f8796894814f2112c4289 (patch) | |
tree | 671ac6fbe97b2db514ddcdde5bdda0c85d4259f9 /gcc/testsuite/g++.dg/cpp2a | |
parent | b4d6b3356967bce49f166ead405cb2f3b0a7dad3 (diff) | |
download | gcc-master.zip gcc-master.tar.gz gcc-master.tar.bz2 |
users can now write code like the following to adapt to the
current RISC-V profile selected at compile time:
```c
#ifdef __riscv_rva23u64
// Code specific to the rva23u64 profile
#endif
```
Changes from v2:
- clarify get_profile_name comment
gcc/
* common/config/riscv/riscv-common.cc (riscv_subset_list::get_profile_name):
New function.
* config/riscv/riscv-c.cc (riscv_cpu_cpp_builtins): Define
profile macro if a profile is detected.
* config/riscv/riscv-subset.h (riscv_subset_list::get_profile_name): Declare.
gcc/testsuite/
* gcc.target/riscv/predef-profiles-1.c: New test for __riscv_rvi20u64.
* gcc.target/riscv/predef-profiles-2.c: New test for __riscv_rvi20u32.
* gcc.target/riscv/predef-profiles-3.c: New test for __riscv_rva20u64.
* gcc.target/riscv/predef-profiles-4.c: New test for __riscv_rva22u64.
* gcc.target/riscv/predef-profiles-5.c: New test for __riscv_rva23u64.
* gcc.target/riscv/predef-profiles-6.c: New test for __riscv_rva23s64.
* gcc.target/riscv/predef-profiles-7.c: New test for __riscv_rvb23u64.
* gcc.target/riscv/predef-profiles-8.c: New test for __riscv_rvb23s64.
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp2a')
0 files changed, 0 insertions, 0 deletions