/* This is the machine dependent code of the Visium Assembler.
- Copyright (C) 2005-2016 Free Software Foundation, Inc.
+ Copyright (C) 2005-2017 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
arelent *reloc;
bfd_reloc_code_real_type code;
- reloc = (arelent *) xmalloc (sizeof (arelent));
+ reloc = XNEW (arelent);
- reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
+ reloc->sym_ptr_ptr = XNEW (asymbol *);
*reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
{"mcm", VISIUM_ARCH_MCM},
{"gr5", VISIUM_ARCH_MCM},
{"gr6", VISIUM_ARCH_GR6},
- {NULL, 0}
};
struct visium_long_option_table
static int
visium_parse_arch (const char *str)
{
- struct visium_arch_option_table *opt;
+ unsigned int i;
if (strlen (str) == 0)
{
return 0;
}
-
- for (opt = visium_archs; opt->name != NULL; opt++)
- if (strcmp (opt->name, str) == 0)
+ for (i = 0; i < ARRAY_SIZE (visium_archs); i++)
+ if (strcmp (visium_archs[i].name, str) == 0)
{
- visium_arch = opt->value;
+ visium_arch = visium_archs[i].value;
return 1;
}
/* Equal to MAX_PRECISION in atof-ieee.c. */
#define MAX_LITTLENUMS 6
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
int i, prec;
/* Look up mnemonic in opcode table, and get the code,
the instruction format, and the flags that indicate
- which family members support this mnenonic. */
+ which family members support this mnemonic. */
if (get_opcode (&opcode, &amode, &arch_flags, mnem) < 0)
{
- as_bad ("Unknown instruction mnenonic `%s'", mnem);
+ as_bad ("Unknown instruction mnemonic `%s'", mnem);
return;
}
break;
case mode_das:
- /* register := register * 5-bit imediate/register shift count
+ /* register := register * 5-bit immediate/register shift count
Example:
asl.l r1,r2,4 */
ans = parse_gen_reg (&str, &r1);
return;
}
this_dest = r1;
-
- /* fall through... */
+ /* Fall through. */
case mode_i:
/* MOVIL/WRTL traditionally get an implicit "%l" applied