diff options
author | Jim Wilson <jimw@sifive.com> | 2018-01-05 17:51:23 -0800 |
---|---|---|
committer | Jim Wilson <jimw@sifive.com> | 2018-01-05 17:51:23 -0800 |
commit | 35eeb78fa9535df6a273c053d8f102e046261b89 (patch) | |
tree | 74a18745c631ab06e4cd6b0619a099d97893a8ed /ld/testsuite | |
parent | 77a502c03a347f0eb31e53e94cab528190c5bd1f (diff) | |
download | gdb-35eeb78fa9535df6a273c053d8f102e046261b89.zip gdb-35eeb78fa9535df6a273c053d8f102e046261b89.tar.gz gdb-35eeb78fa9535df6a273c053d8f102e046261b89.tar.bz2 |
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 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ld-riscv-elf/disas-jalr.d | 13 | ||||
-rw-r--r-- | ld/testsuite/ld-riscv-elf/disas-jalr.s | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp | 1 |
3 files changed, 19 insertions, 0 deletions
diff --git a/ld/testsuite/ld-riscv-elf/disas-jalr.d b/ld/testsuite/ld-riscv-elf/disas-jalr.d new file mode 100644 index 0000000..d523e95 --- /dev/null +++ b/ld/testsuite/ld-riscv-elf/disas-jalr.d @@ -0,0 +1,13 @@ +#name: jalr zero-offset symbols +#source: disas-jalr.s +#ld: --no-relax +#objdump: -d + +.*:[ ]+file format .* + +Disassembly of section \.text: + +.* <_start>: +#... +.*:[ ]+fffff097[ ]+auipc[ ]+ra,0xfffff +.*:[ ]+000080e7[ ]+jalr[ ]+ra # .* <_start> diff --git a/ld/testsuite/ld-riscv-elf/disas-jalr.s b/ld/testsuite/ld-riscv-elf/disas-jalr.s new file mode 100644 index 0000000..28ce478 --- /dev/null +++ b/ld/testsuite/ld-riscv-elf/disas-jalr.s @@ -0,0 +1,5 @@ + .text + .globl _start +_start: + .skip 4096 + call _start diff --git a/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp b/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp index aaee4ac..5b5d2ea 100644 --- a/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp +++ b/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp @@ -21,6 +21,7 @@ if [istarget "riscv*-*-*"] { run_dump_test "c-lui" + run_dump_test "disas-jalr" set abis { rv32gc ilp32 elf32lriscv rv64gc lp64 elf64lriscv } foreach { arch abi emul } $abis { |