From 14127cc4f2b98a818bef55c977eb3ea11b0ba5ce Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Fri, 1 Oct 2004 11:19:38 +0000 Subject: Fixes for the encoding and decoding of the PDP11's SOB instruction --- opcodes/ChangeLog | 5 +++++ opcodes/pdp11-dis.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'opcodes') diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index cf49121..2dde353 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,8 @@ +2004-10-01 Bill Farmer + + * pdp11-dis.c (print_insn_pdp11): Subtract the SOB's displacement + rather than add it. + 2004-09-30 Paul Brook * arm-dis.c (print_insn_arm): Handle 'e' for SMI instruction. diff --git a/opcodes/pdp11-dis.c b/opcodes/pdp11-dis.c index 4f5bf84..1756e53 100644 --- a/opcodes/pdp11-dis.c +++ b/opcodes/pdp11-dis.c @@ -342,7 +342,8 @@ print_insn_pdp11 (memaddr, info) case PDP11_OPCODE_REG_DISPL: { int displ = (opcode & 0x3f) << 10; - bfd_vma address = memaddr + (sign_extend (displ) >> 9); + bfd_vma address = memaddr - (displ >> 9); + FPRINTF (F, OP.name); FPRINTF (F, AFTER_INSTRUCTION); print_reg (src, info); -- cgit v1.1