oops - omitted from previous delta
authorNick Clifton <nickc@redhat.com>
Thu, 4 Apr 2013 07:24:08 +0000 (07:24 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 4 Apr 2013 07:24:08 +0000 (07:24 +0000)
gas/config/tc-v850.c

index 276756a800954e2fc26ec97e5e6f34a9fdd422a8..a23387c186d2de9c707c8386608e4c61619d2d16 100644 (file)
@@ -3459,6 +3459,11 @@ md_apply_fix (fixS *fixP, valueT *valueP, segT seg ATTRIBUTE_UNUSED)
       else
        insn = bfd_getl16 ((unsigned char *) where);
 
+      /* When inserting loop offets a backwards displacement
+        is encoded as a positive value.  */
+      if (operand->flags & V850_INVERSE_PCREL)
+       value = - value;
+
       insn = v850_insert_operand (insn, operand, (offsetT) value,
                                  &errmsg);
       if (errmsg)