From 8254c3d2c94ae5458095ea6c25446ba89134b9da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20M=C3=BCllner?= Date: Fri, 1 Jul 2022 05:21:01 +0200 Subject: RISC-V: Add T-Head Bitmanip vendor extension MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit T-Head has a range of vendor-specific instructions. Therefore it makes sense to group them into smaller chunks in form of vendor extensions. This patch adds the XThead{Ba,Bb,Bs} extensions, a collection of T-Head-specific bitmanipulation instructions. The 'th' prefix and the "XThead{Ba,Bb,Bs}" extension are documented in a PR for the RISC-V toolchain conventions ([1]). [1] https://github.com/riscv-non-isa/riscv-toolchain-conventions/pull/19 Co-developed-by: Lifang Xia Signed-off-by: Christoph Müllner --- bfd/elfxx-riscv.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'bfd/elfxx-riscv.c') diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c index ed516c2..febb84e 100644 --- a/bfd/elfxx-riscv.c +++ b/bfd/elfxx-riscv.c @@ -1224,6 +1224,9 @@ static struct riscv_supported_ext riscv_supported_std_zxm_ext[] = static struct riscv_supported_ext riscv_supported_vendor_x_ext[] = { + {"xtheadba", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, + {"xtheadbb", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, + {"xtheadbs", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, {"xtheadcmo", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, {"xtheadsync", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, {NULL, 0, 0, 0, 0} @@ -2388,6 +2391,12 @@ riscv_multi_subset_supports (riscv_parse_subset_t *rps, return riscv_subset_supports (rps, "svinval"); case INSN_CLASS_H: return riscv_subset_supports (rps, "h"); + case INSN_CLASS_XTHEADBA: + return riscv_subset_supports (rps, "xtheadba"); + case INSN_CLASS_XTHEADBB: + return riscv_subset_supports (rps, "xtheadbb"); + case INSN_CLASS_XTHEADBS: + return riscv_subset_supports (rps, "xtheadbs"); case INSN_CLASS_XTHEADCMO: return riscv_subset_supports (rps, "xtheadcmo"); case INSN_CLASS_XTHEADSYNC: @@ -2519,6 +2528,12 @@ riscv_multi_subset_supports_ext (riscv_parse_subset_t *rps, return "svinval"; case INSN_CLASS_H: return _("h"); + case INSN_CLASS_XTHEADBA: + return "xtheadba"; + case INSN_CLASS_XTHEADBB: + return "xtheadbb"; + case INSN_CLASS_XTHEADBS: + return "xtheadbs"; case INSN_CLASS_XTHEADCMO: return "xtheadcmo"; case INSN_CLASS_XTHEADSYNC: -- cgit v1.1