summaryrefslogtreecommitdiff
path: root/opcodes/pdp11-dis.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-10-01 11:19:38 +0000
committerNick Clifton <nickc@redhat.com>2004-10-01 11:19:38 +0000
commitc36954838095ffdfce77a42ebfae03f17c855a60 (patch)
tree66a9047ceb9582b0c46943e3ea728f077778e978 /opcodes/pdp11-dis.c
parentcdd3087816ed255755d70807961a319a77b51759 (diff)
downloadgdb-c36954838095ffdfce77a42ebfae03f17c855a60.tar.gz
Fixes for the encoding and decoding of the PDP11's SOB instruction
Diffstat (limited to 'opcodes/pdp11-dis.c')
-rw-r--r--opcodes/pdp11-dis.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/opcodes/pdp11-dis.c b/opcodes/pdp11-dis.c
index 4f5bf84aead..1756e53b7d9 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);