summaryrefslogtreecommitdiff
path: root/bfd/elfxx-riscv.c
diff options
context:
space:
mode:
authorTsukasa OI <research_trasio@irq.a4lg.com>2022-02-27 17:51:04 +0900
committerNelson Chu <nelson.chu@sifive.com>2022-05-25 11:19:59 +0800
commit51498ab9abc6122817428198e831d36923e293a4 (patch)
tree0ecc61c2c36842aa6210468845c02a749c0c398d /bfd/elfxx-riscv.c
parentdd4832bf3efc1bd1797a6b9188260692b8b0db52 (diff)
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.
Diffstat (limited to 'bfd/elfxx-riscv.c')
-rw-r--r--bfd/elfxx-riscv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c
index b2806185fa..2953dc34b2 100644
--- a/bfd/elfxx-riscv.c
+++ b/bfd/elfxx-riscv.c
@@ -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)