X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;ds=sidebyside;f=opcodes%2Fpdp11-dis.c;h=02d46a9760d1741d2f1bf8215f5336e5e899e587;hb=63ffd7c9131c0e9723016d33cf8d435cc508d02b;hp=b61675b812195fc2b9dd41b714c9059b37167938;hpb=6f2750feaf2827ef8a1a0a5b2f90c1e9a6cabbd1;p=deliverable%2Fbinutils-gdb.git diff --git a/opcodes/pdp11-dis.c b/opcodes/pdp11-dis.c index b61675b812..02d46a9760 100644 --- a/opcodes/pdp11-dis.c +++ b/opcodes/pdp11-dis.c @@ -1,5 +1,5 @@ /* Print DEC PDP-11 instructions. - Copyright (C) 2001-2016 Free Software Foundation, Inc. + Copyright (C) 2001-2020 Free Software Foundation, Inc. This file is part of the GNU opcodes library. @@ -19,7 +19,7 @@ MA 02110-1301, USA. */ #include "sysdep.h" -#include "dis-asm.h" +#include "disassemble.h" #include "opcode/pdp11.h" #define AFTER_INSTRUCTION "\t" @@ -31,8 +31,7 @@ #define F info->stream /* Sign-extend a 16-bit number in an int. */ -#define SIGN_BITS (8 * sizeof (int) - 16) -#define sign_extend(x) (((x) << SIGN_BITS) >> SIGN_BITS) +#define sign_extend(x) ((((x) & 0xffff) ^ 0x8000) - 0x8000) static int read_word (bfd_vma memaddr, int *word, disassemble_info *info)