aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-mn10300.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2001-05-06 20:05:28 +0000
committerAlexandre Oliva <aoliva@redhat.com>2001-05-06 20:05:28 +0000
commita7c92daeedfd9d5326113d1776c6db7ed18efcc6 (patch)
tree210eec6da75505d2c4c80e65b88e44f41ee51974 /gas/config/tc-mn10300.c
parentc194fbe18b3dc65535031125bdaab04383f892f7 (diff)
downloadfsf-binutils-gdb-a7c92daeedfd9d5326113d1776c6db7ed18efcc6.zip
fsf-binutils-gdb-a7c92daeedfd9d5326113d1776c6db7ed18efcc6.tar.gz
fsf-binutils-gdb-a7c92daeedfd9d5326113d1776c6db7ed18efcc6.tar.bz2
* config/tc-mn10300.c (md_assemble): Subtract operand->shift
from offset in non-pcrel operands too.
Diffstat (limited to 'gas/config/tc-mn10300.c')
-rw-r--r--gas/config/tc-mn10300.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/gas/config/tc-mn10300.c b/gas/config/tc-mn10300.c
index 00f1c05..59e13c7 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)