Fix moxie disassembly for new branch semantics
authorAnthony Green <green@redhat.com>
Fri, 14 Sep 2012 10:49:03 +0000 (10:49 +0000)
committerAnthony Green <green@redhat.com>
Fri, 14 Sep 2012 10:49:03 +0000 (10:49 +0000)
opcodes/ChangeLog
opcodes/moxie-dis.c

index a1b2bfe5b3d7f4992a7b7dae6002db4480b256b5..5b703589a8964e1e1d1a5fc88c65cb48b8ef6059 100644 (file)
@@ -1,3 +1,8 @@
+2012-09-14  Anthony Green  <green@moxielogic.com>
+
+       * moxie-dis.c (print_insn_moxie): Branch targets are relative to
+       the address after the branch instruction.
+
 2012-09-13  Anthony Green  <green@moxielogic.com>
 
        * moxie-dis.c (print_insn_moxie): Handle bi-endian encodings.
index 77821bba780ac35d1db0d6bcb6f3619c89ccb751..38429de1ae51ddc96ddb2e4eacc2b0b2b17bae96 100644 (file)
@@ -205,7 +205,7 @@ print_insn_moxie (bfd_vma addr, struct disassemble_info * info)
        {
        case MOXIE_F3_PCREL:
          fpr (stream, "%s\t", opcode->name);
-         info->print_address_func ((bfd_vma) (addr + INST2OFFSET(iword)), 
+         info->print_address_func ((bfd_vma) (addr + INST2OFFSET(iword) + 2), 
                                    info);
          break;
        default: