From ded5cb94441b2a47a75a0b1d26218f0d5e3dca28 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 21 Jun 2021 17:07:05 +0930 Subject: 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. --- gas/config/tc-pj.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'gas/config') diff --git a/gas/config/tc-pj.c b/gas/config/tc-pj.c index 72391f6..22aa409 100644 --- a/gas/config/tc-pj.c +++ b/gas/config/tc-pj.c @@ -404,6 +404,7 @@ md_apply_fix (fixS *fixP, valueT * valP, segT seg ATTRIBUTE_UNUSED) break; case BFD_RELOC_PJ_CODE_DIR32: + case BFD_RELOC_PJ_CODE_REL32: *buf++ = val >> 24; *buf++ = val >> 16; *buf++ = val >> 8; @@ -440,10 +441,6 @@ md_apply_fix (fixS *fixP, valueT * valP, segT seg ATTRIBUTE_UNUSED) } break; - case BFD_RELOC_PJ_CODE_REL32: - fixP->fx_done = 0; - return; - default: abort (); } -- cgit v1.1