]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - opcodes/pdp11-dis.c
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / opcodes / pdp11-dis.c
index e984b2bce757368e0bb807acf9b8afd805b19028..65f060b8329033a697f3c1ca70425d14e4b4d2c7 100644 (file)
@@ -1,5 +1,5 @@
 /* Print DEC PDP-11 instructions.
-   Copyright (C) 2001-2014 Free Software Foundation, Inc.
+   Copyright (C) 2001-2021 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)