aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-v850.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2013-04-04 07:24:08 +0000
committerNick Clifton <nickc@redhat.com>2013-04-04 07:24:08 +0000
commit86d27af662b1e20c4322b5aa6801ac34b60b054c (patch)
treebeae9df96d1f3f752465a486a1461e0bc884ca93 /gas/config/tc-v850.c
parent4bd05f249301e76338775741c6eb97c25f0d9c37 (diff)
downloadgdb-86d27af662b1e20c4322b5aa6801ac34b60b054c.zip
gdb-86d27af662b1e20c4322b5aa6801ac34b60b054c.tar.gz
gdb-86d27af662b1e20c4322b5aa6801ac34b60b054c.tar.bz2
oops - omitted from previous delta
Diffstat (limited to 'gas/config/tc-v850.c')
-rw-r--r--gas/config/tc-v850.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c
index 276756a..a23387c 100644
--- a/gas/config/tc-v850.c
+++ b/gas/config/tc-v850.c
@@ -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)