aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-riscv.c
diff options
context:
space:
mode:
authorChristoph Müllner <christoph.muellner@vrull.eu>2022-07-01 05:21:01 +0200
committerPhilipp Tomsich <philipp.tomsich@vrull.eu>2022-09-22 18:06:09 +0200
commit8254c3d2c94ae5458095ea6c25446ba89134b9da (patch)
tree0978d35a008fa77f701bbb187dcaad68c1832dc5 /bfd/elfxx-riscv.c
parent8b7419c429919884adced1fd2eae8c805b45b49a (diff)
downloadgdb-8254c3d2c94ae5458095ea6c25446ba89134b9da.zip
gdb-8254c3d2c94ae5458095ea6c25446ba89134b9da.tar.gz
gdb-8254c3d2c94ae5458095ea6c25446ba89134b9da.tar.bz2
RISC-V: Add T-Head Bitmanip vendor extension
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 <lifang_xia@linux.alibaba.com> Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
Diffstat (limited to 'bfd/elfxx-riscv.c')
-rw-r--r--bfd/elfxx-riscv.c15
1 files changed, 15 insertions, 0 deletions
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: