RISC-V: Fix requirement handling on Zhinx+{D,Q}
authorTsukasa OI <research_trasio@irq.a4lg.com>
Fri, 24 Jun 2022 02:59:04 +0000 (11:59 +0900)
committerNelson Chu <nelson.chu@sifive.com>
Thu, 7 Jul 2022 04:05:56 +0000 (12:05 +0800)
commit37cf60c6a6d36bbf5cf1523697906c4bdb4eb468
treed3a3651e6dfa3a6653dd85ef9099ebf428d88c09
parent9b5ebf652b36502ffe79fb196e312bf9ea93f72f
RISC-V: Fix requirement handling on Zhinx+{D,Q}

This commit fixes how instructions are masked on Zhinx+Z{d,q}inx.
fcvt.h.d and fcvt.d.h require ((D&&Zfh)||(Zdinx&&Zhinx)) and
fcvt.h.q and fcvt.q.h require ((Q&&Zfh)||(Zqinx&&Zhinx)).

bfd/ChangeLog:

* elfxx-riscv.c (riscv_multi_subset_supports): Fix feature gate
on INSN_CLASS_{D,Q}_AND_ZFH_INX.
(riscv_multi_subset_supports_ext): Fix feature gate diagnostics
on INSN_CLASS_{D,Q}_AND_ZFH_INX.

gas/ChangeLog:

* testsuite/gas/riscv/fp-zhinx-insns.d: Add Zqinx to -march
for proper testing.
bfd/elfxx-riscv.c
gas/testsuite/gas/riscv/fp-zhinx-insns.d