RISC-V: Add zhinx extension supports.

The zhinx extension is a sub-extension in zfinx, corresponding to
zfh extension but use GPRs instead of FPRs.

This patch expanded the zfh insn class define, since zfh and zhinx
use the same opcodes, thanks for Nelson's works.

changelog in V2: Add missing classes of 'zfh' and 'zhinx' in
"riscv_multi_subset_supports_ext".

bfd/ChangeLog:

        * elfxx-riscv.c (riscv_multi_subset_supports): New extensions.
        (riscv_multi_subset_supports_ext): New extensions.

gas/ChangeLog:

        * testsuite/gas/riscv/fp-zhinx-insns.d: New test.
        * testsuite/gas/riscv/fp-zhinx-insns.s: New test.

include/ChangeLog:

        * opcode/riscv.h (enum riscv_insn_class): New INSN classes.

opcodes/ChangeLog:

        * riscv-opc.c: Modify INSN_CLASS.
This commit is contained in:
jiawei
2022-05-30 10:35:02 +08:00
committed by Nelson Chu
parent 9606310bbb
commit 292c7bf86d
5 changed files with 204 additions and 62 deletions

View File

@ -371,8 +371,9 @@ enum riscv_insn_class
INSN_CLASS_D_OR_ZDINX,
INSN_CLASS_Q_OR_ZQINX,
INSN_CLASS_ZFH,
INSN_CLASS_D_AND_ZFH,
INSN_CLASS_Q_AND_ZFH,
INSN_CLASS_ZFH_OR_ZHINX,
INSN_CLASS_D_AND_ZFH_INX,
INSN_CLASS_Q_AND_ZFH_INX,
INSN_CLASS_ZBA,
INSN_CLASS_ZBB,
INSN_CLASS_ZBC,