RISC-V: Support riscv bitmanip frozen ZBA/ZBB/ZBC instructions (v0.93).
authorClaire Xenia Wolf <claire@symbioticeda.com>
Tue, 15 Dec 2020 15:11:03 +0000 (07:11 -0800)
committerNelson Chu <nelson.chu@sifive.com>
Thu, 7 Jan 2021 03:44:54 +0000 (11:44 +0800)
commit2652cfad8d9d6ab05fe6296802ec499682a00749
tree117665ece17441b71841d299fa3cc151e38b4b9e
parentd4e57b87a3d5879917c30e33b14760fd76ff7b38
RISC-V: Support riscv bitmanip frozen ZBA/ZBB/ZBC instructions (v0.93).

In fact rev8/orc.b/zext.h are the aliases of grevi/gorci/pack[w], so we
should update them to INSN_ALIAS when we have supported their true instruction
in the future.  Though we still use the [MATCH|MAKS]_[GREVI|GORCI|PACK|PACKW]
to encode them.  Besides, the orc.b has the same encoding both in rv32 and
rv64, so we just keep one of them in the opcode table.

This patch is implemented according to the following link,
https://github.com/riscv/riscv-bitmanip/pull/101

2021-01-07  Claire Xenia Wolf  <claire@symbioticeda.com>
            Jim Wilson  <jimw@sifive.com>
            Andrew Waterman  <andrew@sifive.com>
            Maxim Blinov  <maxim.blinov@embecosm.com>
            Kito Cheng  <kito.cheng@sifive.com>
            Nelson Chu  <nelson.chu@sifive.com>

bfd/
    * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zba, zbb and zbc.
gas/
    * config/tc-riscv.c (riscv_multi_subset_supports): Handle INSN_CLASS_ZB*.
    (riscv_get_default_ext_version): Do not check the default_isa_spec when
    the version defined in the riscv_opcodes table is ISA_SPEC_CLASS_DRAFT.
    * testsuite/gas/riscv/bitmanip-insns-32.d: New testcase.
    * testsuite/gas/riscv/bitmanip-insns-64.d: Likewise.
    * testsuite/gas/riscv/bitmanip-insns.s: Likewise.
include/
    * opcode/riscv-opc.h: Added MASK/MATCH/DECLARE_INSN for ZBA/ZBB/ZBC.
    * opcode/riscv.h (riscv_insn_class): Added INSN_CLASS_ZB*.
    (enum riscv_isa_spec_class): Added ISA_SPEC_CLASS_DRAFT for the
    frozen extensions.
opcodes/
    * riscv-opc.c (riscv_opcodes): Add ZBA/ZBB/ZBC instructions.
    (MASK_RVB_IMM): Used for rev8 and orc.b encoding.
12 files changed:
bfd/ChangeLog
bfd/elfxx-riscv.c
gas/ChangeLog
gas/config/tc-riscv.c
gas/testsuite/gas/riscv/bitmanip-insns-32.d [new file with mode: 0644]
gas/testsuite/gas/riscv/bitmanip-insns-64.d [new file with mode: 0644]
gas/testsuite/gas/riscv/bitmanip-insns.s [new file with mode: 0644]
include/ChangeLog
include/opcode/riscv-opc.h
include/opcode/riscv.h
opcodes/ChangeLog
opcodes/riscv-opc.c