RISC-V: Add zhinx extension supports.
authorjiawei <jiawei@iscas.ac.cn>
Mon, 30 May 2022 02:35:02 +0000 (10:35 +0800)
committerNelson Chu <nelson.chu@sifive.com>
Mon, 30 May 2022 03:42:08 +0000 (11:42 +0800)
commit292c7bf86de50ad643b929a7ac5769505d54e45f
tree63e803693ef4b60ba49739c59baede22892bd9e0
parent9606310bbbf8a2d529b5c2aa71cac48a46f65869
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.
bfd/elfxx-riscv.c
gas/testsuite/gas/riscv/fp-zhinx-insns.d [new file with mode: 0644]
gas/testsuite/gas/riscv/fp-zhinx-insns.s [new file with mode: 0644]
include/opcode/riscv.h
opcodes/riscv-opc.c