xcoff slurp_armap bounds checking
[deliverable/binutils-gdb.git] / opcodes / pdp11-dis.c
index 1d9eaa5a511c337e366eaf30214341209d882128..a19fbc0f3d9d6ccd8b67a6ffc55cd48dd72e55c5 100644 (file)
@@ -1,5 +1,5 @@
 /* Print DEC PDP-11 instructions.
-   Copyright (C) 2001-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2019 Free Software Foundation, Inc.
 
    This file is part of the GNU opcodes library.
 
@@ -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)
This page took 0.039129 seconds and 4 git commands to generate.