aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <jimw@sifive.com>2018-01-05 17:51:23 -0800
committerJim Wilson <jimw@sifive.com>2018-01-05 17:51:23 -0800
commit35eeb78fa9535df6a273c053d8f102e046261b89 (patch)
tree74a18745c631ab06e4cd6b0619a099d97893a8ed /opcodes/riscv-dis.c
parentAutomatic date update in version.in (diff)
downloadbinutils-gdb-35eeb78fa9535df6a273c053d8f102e046261b89.tar.gz
binutils-gdb-35eeb78fa9535df6a273c053d8f102e046261b89.tar.bz2
binutils-gdb-35eeb78fa9535df6a273c053d8f102e046261b89.zip
RISC-V: Print symbol address for jalr w/ zero offset.
ld/ * testsuite/ld-riscv-elf/disas-jalr.d: New. * testsuite/ld-riscv-elf/disas-jalr.s: New. * testsuite/ld-riscv-elf/ld-riscv-elf.exp: Run new testcase. opcodes/ * riscv-dis.c (print_insn_args) <'s'>: Call maybe_print_address for a jalr.
Diffstat (limited to 'opcodes/riscv-dis.c')
-rw-r--r--opcodes/riscv-dis.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c
index 972cbcfd2f3..cc427b4b935 100644
--- a/opcodes/riscv-dis.c
+++ b/opcodes/riscv-dis.c
@@ -226,6 +226,8 @@ print_insn_args (const char *d, insn_t l, bfd_vma pc, disassemble_info *info)
case 'b':
case 's':
+ if ((l & MASK_JALR) == MATCH_JALR)
+ maybe_print_address (pd, rs1, 0);
print (info->stream, "%s", riscv_gpr_names[rs1]);
break;