Move free_all_objfiles to program_space
[deliverable/binutils-gdb.git] / opcodes / tic6x-dis.c
index 1a6f5757ce1e1b006a0d31fbbf3940720c9bfc87..45a1e98f2a26cb6d57e32e98c5177978beb9d0be 100644 (file)
@@ -1,5 +1,5 @@
 /* TI C6X disassembler.
-   Copyright (C) 2010-2017 Free Software Foundation, Inc.
+   Copyright (C) 2010-2019 Free Software Foundation, Inc.
    Contributed by Joseph Myers <joseph@codesourcery.com>
                  Bernd Schmidt  <bernds@codesourcery.com>
 
@@ -21,7 +21,7 @@
    MA 02110-1301, USA.  */
 
 #include "sysdep.h"
-#include "dis-asm.h"
+#include "disassemble.h"
 #include "opcode/tic6x.h"
 #include "libiberty.h"
 
@@ -163,9 +163,9 @@ static unsigned int
 tic6x_extract_32 (unsigned char *p, struct disassemble_info *info)
 {
   if (info->endian == BFD_ENDIAN_LITTLE)
-    return (p[0]) | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
+    return p[0] | (p[1] << 8) | (p[2] << 16) | ((unsigned) p[3] << 24);
   else
-    return (p[3]) | (p[2] << 8) | (p[1] << 16) | (p[0] << 24);
+    return p[3] | (p[2] << 8) | (p[1] << 16) | ((unsigned) p[0] << 24);
 }
 
 /* Extract a 16-bit value read from the instruction stream.  */
@@ -316,7 +316,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
       const char *parallel;
       const char *cond = "";
       const char *func_unit;
-      char func_unit_buf[7];
+      char func_unit_buf[8];
       unsigned int func_unit_side = 0;
       unsigned int func_unit_data_side = 0;
       unsigned int func_unit_cross = 0;
@@ -703,8 +703,9 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
          if (opc->flags & TIC6X_FLAG_INSN16_BSIDE && func_unit_side == 1)
              func_unit_cross = 1;
 
-         snprintf (func_unit_buf, 7, " .%c%u%s%s", func_unit_char,
-                   func_unit_side, (func_unit_cross ? "X" : ""), data_str);
+         snprintf (func_unit_buf, sizeof func_unit_buf, " .%c%u%s%s",
+                   func_unit_char, func_unit_side,
+                   (func_unit_cross ? "X" : ""), data_str);
          func_unit = func_unit_buf;
        }
 
This page took 0.02508 seconds and 4 git commands to generate.