forked from gcc-mirror/gcc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RISC-V: Define __riscv_v_intrinsic [PR109312]
RVV intrinsic has defined a macro to identity the version of RVV intrinsic spec, we missed that before, thanksful we are catch this before release. gcc/ChangeLog: PR target/109312 * config/riscv/riscv-c.cc (riscv_ext_version_value): New. (riscv_cpu_cpp_builtins): Define __riscv_v_intrinsic and minor refactor. gcc/testsuite/ChangeLog: PR target/109312 * gcc.target/riscv/predef-__riscv_v_intrinsic.c: New test.
- Loading branch information
1 parent
97383b4
commit 5a92351
Showing
2 changed files
with
25 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
gcc/testsuite/gcc.target/riscv/predef-__riscv_v_intrinsic.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* { dg-do compile } */ | ||
/* { dg-options "-march=rv64imafdcv -mabi=lp64d" } */ | ||
|
||
int main () { | ||
|
||
#if __riscv_v_intrinsic != 11000 | ||
#error "__riscv_v_intrinsic" | ||
#endif | ||
|
||
return 0; | ||
} |