diff options
author | jiawei <jiawei@iscas.ac.cn> | 2021-11-17 20:10:07 +0800 |
---|---|---|
committer | Nelson Chu <nelson.chu@sifive.com> | 2021-11-18 14:43:23 +0800 |
commit | de83e5142d054218f476f7364f795bcaa30efd3f (patch) | |
tree | ca33a98af3306f2a3373a7dc238d0247f6e2d703 /opcodes/riscv-dis.c | |
parent | da05b70e56866fd39288f4ff531ddfa6cb988514 (diff) | |
download | gdb-de83e5142d054218f476f7364f795bcaa30efd3f.zip gdb-de83e5142d054218f476f7364f795bcaa30efd3f.tar.gz gdb-de83e5142d054218f476f7364f795bcaa30efd3f.tar.bz2 |
RISC-V: Add instructions and operand set for z[fdq]inx
Reuse float instructions in INSN_CLASS_F/D/Q, use riscv_subset_supports to
verify if z*inx enabled and use gpr instead of fpr when z*inx is enable.
bfd/ChangeLog:
* elfxx-riscv.c (riscv_multi_subset_supports): Added support for
z*inx extension.
gas/ChangeLog:
* config/tc-riscv.c (riscv_ip): Added register choice for z*inx.
include/ChangeLog:
* opcode/riscv.h (enum riscv_insn_class): Reused INSN_CLASS_* for z*inx.
opcodes/ChangeLog:
* riscv-dis.c (riscv_disassemble_insn): Added disassemble check for
z*inx.
* riscv-opc.c: Reused INSN_CLASS_* for z*inx.
Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'opcodes/riscv-dis.c')
-rw-r--r-- | opcodes/riscv-dis.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c index fac80b4..acb8471 100644 --- a/opcodes/riscv-dis.c +++ b/opcodes/riscv-dis.c @@ -601,6 +601,10 @@ riscv_disassemble_insn (bfd_vma memaddr, insn_t word, disassemble_info *info) xlen = ehdr->e_ident[EI_CLASS] == ELFCLASS64 ? 64 : 32; } + /* If arch has ZFINX flags, use gpr for disassemble. */ + if(riscv_subset_supports (&riscv_rps_dis, "zfinx")) + riscv_fpr_names = riscv_gpr_names_abi; + for (; op->name; op++) { /* Does the opcode match? */ |