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 /gas | |
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 'gas')
-rw-r--r-- | gas/config/tc-riscv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c index 0b11bb3..7cc2063 100644 --- a/gas/config/tc-riscv.c +++ b/gas/config/tc-riscv.c @@ -2879,7 +2879,9 @@ riscv_ip (char *str, struct riscv_cl_insn *ip, expressionS *imm_expr, case 'T': /* Floating point RS2. */ case 'U': /* Floating point RS1 and RS2. */ case 'R': /* Floating point RS3. */ - if (reg_lookup (&asarg, RCLASS_FPR, ®no)) + if (reg_lookup (&asarg, + (riscv_subset_supports (&riscv_rps_as, "zfinx") + ? RCLASS_GPR : RCLASS_FPR), ®no)) { char c = *oparg; if (*asarg == ' ') |