tic4x: sign extension using shifts
[deliverable/binutils-gdb.git] / opcodes / tic4x-dis.c
index 01cfa1e060ff8258a079c55b2aab00ee585f12ad..34e270b71387ff53fa7139e04c9ae59f3fc37598 100644 (file)
@@ -1,6 +1,6 @@
 /* Print instructions for the Texas TMS320C[34]X, for GDB and GNU Binutils.
 
-   Copyright (C) 2002-2019 Free Software Foundation, Inc.
+   Copyright (C) 2002-2020 Free Software Foundation, Inc.
 
    Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz)
 
@@ -148,8 +148,7 @@ tic4x_print_register (struct disassemble_info *info, unsigned long regno)
              = (tic4x_register_t *)(tic4x_registers + i);
        }
     }
-  if (regno > (IS_CPU_TIC4X (tic4x_version) ? TIC4X_REG_MAX : TIC3X_REG_MAX)
-      || registertable[regno] == NULL)
+  if (regno > (IS_CPU_TIC4X (tic4x_version) ? TIC4X_REG_MAX : TIC3X_REG_MAX))
     return 0;
   if (info != NULL)
     (*info->fprintf_func) (info->stream, "%s", registertable[regno]->name);
@@ -277,7 +276,7 @@ tic4x_print_cond (struct disassemble_info *info, unsigned int cond)
 
   if (condtable == NULL)
     {
-      condtable = xcalloc (sizeof (tic4x_cond_t *), 32);
+      condtable = xcalloc (32, sizeof (tic4x_cond_t *));
       for (i = 0; i < tic4x_num_conds; i++)
        condtable[tic4x_conds[i].cond] = (tic4x_cond_t *)(tic4x_conds + i);
     }
This page took 0.024954 seconds and 4 git commands to generate.