RISC-V: Add Z*inx imcompatible check in gcc
authorJiawei <jiawei@iscas.ac.cn>
Tue, 28 Mar 2023 16:55:15 +0000 (00:55 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Wed, 29 Mar 2023 13:48:19 +0000 (21:48 +0800)
commitb2f327b9be81326c9e59fc6da98074c909ac7408
treef2ea60c6d0a139256427faded2bdb6cf8b1a8ac5
parent8b2766e87dbf0d20808bc92d8e6ee7f876d19ab2
RISC-V: Add Z*inx imcompatible check in gcc

Z*inx is conflict with float extensions, add incompatible check when
z*inx and f extension both enabled.

Since all float extension imply f extension and all z*inx extension
imply zfinx extension, so we just need to check f with zfinx extension
as the base case.

Co-Authored by: Kito Cheng <kito.cheng@gmail.com>

gcc/ChangeLog:

* common/config/riscv/riscv-common.cc (riscv_subset_list::parse):
New check.

gcc/testsuite/ChangeLog:

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