From: Alexandre Oliva Date: Sun, 6 May 2001 20:05:28 +0000 (+0000) Subject: * config/tc-mn10300.c (md_assemble): Subtract operand->shift X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a7c92daeedfd9d5326113d1776c6db7ed18efcc6;p=binutils-gdb.git * config/tc-mn10300.c (md_assemble): Subtract operand->shift from offset in non-pcrel operands too. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 249070eeda5..a5b3c3d6659 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2001-05-06 Alexandre Oliva + + * config/tc-mn10300.c (md_assemble): Subtract operand->shift + from offset in non-pcrel operands too. + 2001-05-06 Nick Clifton * config/tc-arm.h (MAX_MEM_FOR_RS_ALIGN_CODE): Define. diff --git a/gas/config/tc-mn10300.c b/gas/config/tc-mn10300.c index 00f1c0534cc..59e13c70631 100644 --- a/gas/config/tc-mn10300.c +++ b/gas/config/tc-mn10300.c @@ -1727,13 +1727,7 @@ keep_going: /* Is the reloc pc-relative? */ pcrel = (operand->flags & MN10300_OPERAND_PCREL) != 0; - offset = size - reloc_size / 8; - - /* If the pcrel relocation isn't at the end of the insn, - we have to adjust the offset for the relocation to be - correct. */ - if (pcrel) - offset -= operand->shift / 8; + offset = size - (reloc_size + operand->shift) / 8; /* Choose a proper BFD relocation type. */ if (pcrel)