aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-06-21 17:07:05 +0930
committerAlan Modra <amodra@gmail.com>2021-06-22 17:44:45 +0930
commitded5cb94441b2a47a75a0b1d26218f0d5e3dca28 (patch)
tree4817ba5c5893550c18a2e219871c3a91f870c8cf /opcodes
parent456ef1c1d43c0407801fb2d59db355472be8a554 (diff)
downloadbinutils-ded5cb94441b2a47a75a0b1d26218f0d5e3dca28.zip
binutils-ded5cb94441b2a47a75a0b1d26218f0d5e3dca28.tar.gz
binutils-ded5cb94441b2a47a75a0b1d26218f0d5e3dca28.tar.bz2
picojava assembler and disassembler fixes
Commit 54758c3e398d made changes to the picojava support based on https://sourceware.org/pipermail/binutils/2005-November/045136.html An update from picojava to picojava II, I think. Unfortunately the patch neglected any changes to the gas testsuite, resulting in "FAIL: pj" since that date. This patch makes a few relatively simple changes to cure the regression. gas/ * config/tc-pj.c (md_apply_fix): Apply PJ_CODE_REL32 relocs. * testsuite/gas/pj/ops.s: Update jsr, ret, getstatic, putstatic, getfield, putfield, invokevirtual, invokespecial, invokestatic, invokeinterface, goto_w, jsr_w assembly. Delete version 1 picojava opcodes. * testsuite/gas/pj/ops.d: Match expected output. opcodes/ * pj-dis.c (print_insn_pj): Don't print trailing tab. Do print separator for pcrel insns.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog5
-rw-r--r--opcodes/pj-dis.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 035182c..0dab08e 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+2021-06-22 Alan Modra <amodra@gmail.com>
+
+ * pj-dis.c (print_insn_pj): Don't print trailing tab. Do
+ print separator for pcrel insns.
+
2021-06-19 Alan Modra <amodra@gmail.com>
* vax-dis.c (print_insn_vax): Avoid pointer overflow.
diff --git a/opcodes/pj-dis.c b/opcodes/pj-dis.c
index adf16a4..a67ea38 100644
--- a/opcodes/pj-dis.c
+++ b/opcodes/pj-dis.c
@@ -57,7 +57,7 @@ print_insn_pj (bfd_vma addr, struct disassemble_info *info)
if ((status = info->read_memory_func (addr + 1, &byte_2, 1, info)))
goto fail;
- fprintf_fn (stream, "%s\t", pj_opc_info[opcode + byte_2].u.name);
+ fprintf_fn (stream, "%s", pj_opc_info[opcode + byte_2].u.name);
return 2;
}
else
@@ -160,10 +160,11 @@ print_insn_pj (bfd_vma addr, struct disassemble_info *info)
for (i = 0; i < size; i++)
val = (val << 8) | (data[i] & 0xff);
+ fprintf_fn (stream, "%s", sep);
if (PCREL (op->arg[a]))
(*info->print_address_func) (val + insn_start, info);
else
- fprintf_fn (stream, "%s%d", sep, val);
+ fprintf_fn (stream, "%d", val);
sep = ",";
addr += size;