This is the mail archive of the
mailing list for the binutils project.
Re: [Patch, moxie] Change branch target offset encodings
On Fri, Sep 7, 2012 at 9:19 PM, Anthony Green <firstname.lastname@example.org> wrote:
> Now that there's a hardware implementation of moxie, it was noticed
> that the logic could be simplified by encoding PC relative branch
> offsets relative to the address of the instruction following the
> branch instead of relative to the branch instruction itself. I'm
> checking this change in.
And here's the forgotten disassembler patch that I am about to check in.
2012-09-14 Anthony Green <email@example.com>
* moxie-dis.c (print_insn_moxie): Branch targets are relative to
the address after the branch instruction.
RCS file: /cvs/src/src/opcodes/moxie-dis.c,v
retrieving revision 1.5
diff -u -p -r1.5 moxie-dis.c
--- opcodes/moxie-dis.c 13 Sep 2012 22:24:49 -0000 1.5
+++ opcodes/moxie-dis.c 14 Sep 2012 10:45:54 -0000
@@ -205,7 +205,7 @@ print_insn_moxie (bfd_vma addr, struct d
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),