/* Print instructions for the Texas TMS320C[34]X, for GDB and GNU Binutils.
- Copyright (C) 2002-2020 Free Software Foundation, Inc.
+ Copyright (C) 2002-2024 Free Software Foundation, Inc.
Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz)
indirect_t;
static unsigned long tic4x_version = 0;
-static int tic4x_dp = 0;
+static unsigned int tic4x_dp = 0;
static tic4x_inst_t **optab = NULL;
static tic4x_inst_t **optab_special = NULL;
static const char *registernames[REG_TABLE_SIZE];
tic4x_version = info->mach;
/* Don't stash anything from a previous call using a different
machine. */
- if (optab)
- {
- free (optab);
- optab = NULL;
- }
- if (optab_special)
- {
- free (optab_special);
- optab_special = NULL;
- }
+ free (optab);
+ optab = NULL;
+ free (optab_special);
+ optab_special = NULL;
registernames[REG_R0] = NULL;
}
if (optab == NULL)
{
- optab = xcalloc (sizeof (tic4x_inst_t *), (1 << TIC4X_HASH_SIZE));
+ optab = xcalloc ((1 << TIC4X_HASH_SIZE), sizeof (tic4x_inst_t *));
- optab_special = xcalloc (sizeof (tic4x_inst_t *), TIC4X_SPESOP_SIZE);
+ optab_special = xcalloc (TIC4X_SPESOP_SIZE, sizeof (tic4x_inst_t *));
/* Install opcodes in reverse order so that preferred
forms overwrite synonyms. */