aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorTsukasa OI <research_trasio@irq.a4lg.com>2023-08-12 16:14:04 +0000
committerTsukasa OI <research_trasio@irq.a4lg.com>2023-08-15 06:46:18 +0000
commit239af8cbd15cd9ef11e333f9889834665066e4b3 (patch)
tree3950380006ea35b0425fcb5e638f4d1a19445ff7 /bfd
parent2266f8631806ec65a9a9ff8a7c68a56c83eae81d (diff)
downloadgdb-239af8cbd15cd9ef11e333f9889834665066e4b3.zip
gdb-239af8cbd15cd9ef11e333f9889834665066e4b3.tar.gz
gdb-239af8cbd15cd9ef11e333f9889834665066e4b3.tar.bz2
RISC-V: Make "fli.h" available to 'Zvfh' + 'Zfa'
The documentation of the 'Zfa' extension states that "fli.h" is available "if the Zfh or Zvfh extension is implemented" (both the latest and the oldest editions are checked). This fact was not reflected in Binutils ('Zvfh' implies 'Zfhmin', not full 'Zfh' extension and "fli.h" required 'Zfh' and 'Zfa' extensions). This commit makes "fli.h" also available when both 'Zfa' and 'Zvfh' extensions are implemented. bfd/ChangeLog: * elfxx-riscv.c (riscv_multi_subset_supports): Add new instruction class handling. (riscv_multi_subset_supports_ext): Likewise. gas/ChangeLog: * testsuite/gas/riscv/zfa-zvfh.s: New test. * testsuite/gas/riscv/zfa-zvfh.d: Ditto. include/ChangeLog: * opcode/riscv.h (enum riscv_insn_class): Add new instruction class. opcodes/ChangeLog: * riscv-opc.c (riscv_opcodes): Change instruction class of "fli.h" from INSN_CLASS_ZFH_AND_ZFA to new INSN_CLASS_ZFH_OR_ZVFH_AND_ZFA.
Diffstat (limited to 'bfd')
-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 6b34c2f..e9852ef 100644
--- a/bfd/elfxx-riscv.c
+++ b/bfd/elfxx-riscv.c
@@ -2463,6 +2463,10 @@ riscv_multi_subset_supports (riscv_parse_subset_t *rps,
case INSN_CLASS_ZFH_AND_ZFA:
return riscv_subset_supports (rps, "zfh")
&& riscv_subset_supports (rps, "zfa");
+ case INSN_CLASS_ZFH_OR_ZVFH_AND_ZFA:
+ return (riscv_subset_supports (rps, "zfh")
+ || riscv_subset_supports (rps, "zvfh"))
+ && riscv_subset_supports (rps, "zfa");
case INSN_CLASS_ZBA:
return riscv_subset_supports (rps, "zba");
case INSN_CLASS_ZBB:
@@ -2704,6 +2708,17 @@ riscv_multi_subset_supports_ext (riscv_parse_subset_t *rps,
return "zfh";
else
return "zfa";
+ case INSN_CLASS_ZFH_OR_ZVFH_AND_ZFA:
+ if (!riscv_subset_supports (rps, "zfa"))
+ {
+ if (!riscv_subset_supports (rps, "zfh")
+ && !riscv_subset_supports (rps, "zvfh"))
+ return _("zfh' and `zfa', or `zvfh' and `zfa");
+ else
+ return "zfa";
+ }
+ else
+ return _("zfh' or `zvfh");
case INSN_CLASS_ZBA:
return "zba";
case INSN_CLASS_ZBB: