RISC-V: Fix RV32Q conflict

This commit makes RV32 + 'Q' extension (version 2.2 or later) not
conflicting since this combination is no longer prohibited by the
specification.

bfd/ChangeLog:

	* elfxx-riscv.c (riscv_parse_check_conflicts): Remove conflict
	detection that prohibits RV32Q on 'Q' version 2.2 or later.

gas/ChangeLog:

	* testsuite/gas/riscv/march-fail-rv32iq.d: Removed.
	* testsuite/gas/riscv/march-fail-rv32iq.l: Likewise.
	* testsuite/gas/riscv/march-fail-rv32iq2p0.d: New test
	showing RV32IQ fails on 'Q' extension version 2.0.
	* testsuite/gas/riscv/march-fail-rv32iq2p0.l: Likewise.
	* testsuite/gas/riscv/march-fail-rv32iq2.d: Likewise.
	* testsuite/gas/riscv/march-fail-rv32iq-isa-2p2.d: New test
	showing RV32IQ fails on ISA specification version 2.2.
	* testsuite/gas/riscv/march-ok-rv32iq2p2.d: New test
	showing RV32IQ succesds on 'Q' extension version 2.2.
	* testsuite/gas/riscv/march-ok-rv32iq-isa-20190608.d: New test
	showing RV32IQ succesds on ISA specification 20190608.
This commit is contained in:
Tsukasa OI 2022-02-27 17:51:04 +09:00 committed by Nelson Chu
parent dd4832bf3e
commit 51498ab9ab
8 changed files with 22 additions and 5 deletions

View File

@ -1887,10 +1887,11 @@ riscv_parse_check_conflicts (riscv_parse_subset_t *rps)
no_conflict = false;
}
if (riscv_lookup_subset (rps->subset_list, "q", &subset)
&& (subset->major_version < 2 || (subset->major_version == 2
&& subset->minor_version < 2))
&& xlen < 64)
{
rps->error_handler
(_("rv%d does not support the `q' extension"), xlen);
rps->error_handler (_("rv%d does not support the `q' extension"), xlen);
no_conflict = false;
}
if (riscv_lookup_subset (rps->subset_list, "e", &subset)

View File

@ -0,0 +1,3 @@
#as: -misa-spec=2.2 -march=rv32iq
#source: empty.s
#error_output: march-fail-rv32iq2p0.l

View File

@ -1,3 +0,0 @@
#as: -march=rv32iq
#source: empty.s
#error_output: march-fail-rv32iq.l

View File

@ -0,0 +1,3 @@
#as: -march=rv32iq2
#source: empty.s
#error_output: march-fail-rv32iq2p0.l

View File

@ -0,0 +1,3 @@
#as: -march=rv32iq2p0
#source: empty.s
#error_output: march-fail-rv32iq2p0.l

View File

@ -0,0 +1,5 @@
#as: -misa-spec=20190608 -march=rv32iq
#objdump: -dr
#source: empty.s
.*: file format elf32-(little|big)riscv

View File

@ -0,0 +1,5 @@
#as: -march=rv32iq2p2
#objdump: -dr
#source: empty.s
.*: file format elf32-(little|big)riscv