* config/tc-mn10300.c (md_assemble): Subtract operand->shift
authorAlexandre Oliva <aoliva@redhat.com>
Sun, 6 May 2001 20:05:28 +0000 (20:05 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Sun, 6 May 2001 20:05:28 +0000 (20:05 +0000)
from offset in non-pcrel operands too.

gas/ChangeLog
gas/config/tc-mn10300.c

index 249070eeda5591219a1c2219ff287516fab33661..a5b3c3d66597f0d2d064a018ce81af25be7c45b5 100644 (file)
@@ -1,3 +1,8 @@
+2001-05-06  Alexandre Oliva  <aoliva@redhat.com>
+
+       * config/tc-mn10300.c (md_assemble): Subtract operand->shift
+       from offset in non-pcrel operands too.
+
 2001-05-06  Nick Clifton  <nickc@cambridge.redhat.com>
 
        * config/tc-arm.h (MAX_MEM_FOR_RS_ALIGN_CODE): Define.
index 00f1c0534ccb9c7f43865b25395637893a19c398..59e13c7063149ca15989cf8e066850c9e51ac9c2 100644 (file)
@@ -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)