Change moxie branch target encodings.
authorAnthony Green <green@redhat.com>
Sat, 8 Sep 2012 01:20:28 +0000 (01:20 +0000)
committerAnthony Green <green@redhat.com>
Sat, 8 Sep 2012 01:20:28 +0000 (01:20 +0000)
gas/ChangeLog
gas/config/tc-moxie.c

index 548ed9e38a440339d04882f54ca5a8d84eacb900..c2446e8c716d1fdc5c214a06ef8f59a68b77442e 100644 (file)
@@ -1,3 +1,8 @@
+2012-09-07  Anthony Green  <green@moxielogic.com>
+
+       * config/tc-moxie.c (md_pcrel_from): Branches are now relative
+          to the address following the branch instruction.
+
 2012-09-06  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
 
        * config/tc-s390.c (set_highgprs_p): New variable.
index 2fffc6594c8c8831125cbdf67b6ee29ad0c9a9d1..e73887dc9cb238ebae5cb89c3abdb70ff93f5b79 100644 (file)
@@ -774,7 +774,8 @@ md_pcrel_from (fixS *fixP)
     case BFD_RELOC_32:
       return addr + 4;
     case BFD_RELOC_MOXIE_10_PCREL:
-      return addr;
+      /* Offset is from the end of the instruction.  */
+      return addr + 2;
     default:
       abort ();
       return addr;