+2020-08-24 Alan Modra <amodra@gmail.com>
+
+ * config/tc-aarch64.c (md_begin): Don't bother checking for
+ out of memory failure from str_htab_create.
+ * config/tc-arc.c (arc_insert_opcode, md_begin): Likewise.
+ (arc_extcorereg, arc_stralloc): Likewise.
+ * config/tc-arm.c (md_begin): Likewise.
+ * config/tc-cr16.c (initialise_reg_hash_table, md_begin): Likewise.
+ * config/tc-cris.c (md_begin): Likewise.
+ * config/tc-crx.c (md_begin): Likewise.
+ * config/tc-pdp11.c (md_begin): Likewise.
+ * config/tc-score.c (s3_build_reg_hsh, s3_begin): Likewise.
+ * config/tc-score7.c (s7_build_reg_hsh, s7_begin): Likewise.
+
2020-08-24 Alan Modra <amodra@gmail.com>
* config/tc-arm.c (move_or_literal_pool): Avoid false positive
unsigned mach;
unsigned int i;
- if ((aarch64_ops_hsh = str_htab_create ()) == NULL
- || (aarch64_cond_hsh = str_htab_create ()) == NULL
- || (aarch64_shift_hsh = str_htab_create ()) == NULL
- || (aarch64_sys_regs_hsh = str_htab_create ()) == NULL
- || (aarch64_pstatefield_hsh = str_htab_create ()) == NULL
- || (aarch64_sys_regs_ic_hsh = str_htab_create ()) == NULL
- || (aarch64_sys_regs_dc_hsh = str_htab_create ()) == NULL
- || (aarch64_sys_regs_at_hsh = str_htab_create ()) == NULL
- || (aarch64_sys_regs_tlbi_hsh = str_htab_create ()) == NULL
- || (aarch64_sys_regs_sr_hsh = str_htab_create ()) == NULL
- || (aarch64_reg_hsh = str_htab_create ()) == NULL
- || (aarch64_barrier_opt_hsh = str_htab_create ()) == NULL
- || (aarch64_nzcv_hsh = str_htab_create ()) == NULL
- || (aarch64_pldop_hsh = str_htab_create ()) == NULL
- || (aarch64_hint_opt_hsh = str_htab_create ()) == NULL)
- as_fatal (_("virtual memory exhausted"));
+ aarch64_ops_hsh = str_htab_create ();
+ aarch64_cond_hsh = str_htab_create ();
+ aarch64_shift_hsh = str_htab_create ();
+ aarch64_sys_regs_hsh = str_htab_create ();
+ aarch64_pstatefield_hsh = str_htab_create ();
+ aarch64_sys_regs_ic_hsh = str_htab_create ();
+ aarch64_sys_regs_dc_hsh = str_htab_create ();
+ aarch64_sys_regs_at_hsh = str_htab_create ();
+ aarch64_sys_regs_tlbi_hsh = str_htab_create ();
+ aarch64_sys_regs_sr_hsh = str_htab_create ();
+ aarch64_reg_hsh = str_htab_create ();
+ aarch64_barrier_opt_hsh = str_htab_create ();
+ aarch64_nzcv_hsh = str_htab_create ();
+ aarch64_pldop_hsh = str_htab_create ();
+ aarch64_hint_opt_hsh = str_htab_create ();
fill_instruction_hash_table ();
entry->opcode = XRESIZEVEC (const struct arc_opcode *, entry->opcode,
entry->count + 1);
- if (entry->opcode == NULL)
- as_fatal (_("Virtual memory exhausted"));
-
entry->opcode[entry->count] = opcode;
entry->count++;
}
/* Set up a hash table for the instructions. */
arc_opcode_hash = str_htab_create ();
- if (arc_opcode_hash == NULL)
- as_fatal (_("Virtual memory exhausted"));
/* Initialize the hash table with the insns. */
do
/* Register declaration. */
arc_reg_hash = str_htab_create ();
- if (arc_reg_hash == NULL)
- as_fatal (_("Virtual memory exhausted"));
declare_register_set ();
declare_register ("gp", 26);
/* Aux register declaration. */
arc_aux_hash = str_htab_create ();
- if (arc_aux_hash == NULL)
- as_fatal (_("Virtual memory exhausted"));
const struct arc_aux_reg *auxr = &arc_aux_regs[0];
unsigned int i;
/* Address type declaration. */
arc_addrtype_hash = str_htab_create ();
- if (arc_addrtype_hash == NULL)
- as_fatal (_("Virtual memory exhausted"));
declare_addrtype ("bd", ARC_NPS400_ADDRTYPE_BD);
declare_addrtype ("jid", ARC_NPS400_ADDRTYPE_JID);
ext_condcode.arc_ext_condcode =
XRESIZEVEC (struct arc_flag_operand, ext_condcode.arc_ext_condcode,
ext_condcode.size + 1);
- if (ext_condcode.arc_ext_condcode == NULL)
- as_fatal (_("Virtual memory exhausted"));
ccode = ext_condcode.arc_ext_condcode + ext_condcode.size - 1;
ccode->name = ereg.name;
len += strlen (s2) + 1;
p = (char *) xmalloc (len);
- if (p == NULL)
- as_fatal (_("Virtual memory exhausted"));
if (s1)
{
unsigned mach;
unsigned int i;
- if ( (arm_ops_hsh = str_htab_create ()) == NULL
- || (arm_cond_hsh = str_htab_create ()) == NULL
- || (arm_vcond_hsh = str_htab_create ()) == NULL
- || (arm_shift_hsh = str_htab_create ()) == NULL
- || (arm_psr_hsh = str_htab_create ()) == NULL
- || (arm_v7m_psr_hsh = str_htab_create ()) == NULL
- || (arm_reg_hsh = str_htab_create ()) == NULL
- || (arm_reloc_hsh = str_htab_create ()) == NULL
- || (arm_barrier_opt_hsh = str_htab_create ()) == NULL)
- as_fatal (_("virtual memory exhausted"));
+ arm_ops_hsh = str_htab_create ();
+ arm_cond_hsh = str_htab_create ();
+ arm_vcond_hsh = str_htab_create ();
+ arm_shift_hsh = str_htab_create ();
+ arm_psr_hsh = str_htab_create ();
+ arm_v7m_psr_hsh = str_htab_create ();
+ arm_reg_hsh = str_htab_create ();
+ arm_reloc_hsh = str_htab_create ();
+ arm_barrier_opt_hsh = str_htab_create ();
for (i = 0; i < sizeof (insns) / sizeof (struct asm_opcode); i++)
if (str_hash_find (arm_ops_hsh, insns[i].template_name) == NULL)
const reg_entry *rreg;
*hash_table = str_htab_create ();
- if (*hash_table == NULL)
- as_fatal (_("Virtual memory exhausted"));
for (rreg = register_table;
rreg < (register_table + num_entries);
int i = 0;
/* Set up a hash table for the instructions. */
- if ((cr16_inst_hash = str_htab_create ()) == NULL)
- as_fatal (_("Virtual memory exhausted"));
+ cr16_inst_hash = str_htab_create ();
while (cr16_instruction[i].mnemonic != NULL)
{
/* Set up a hash table for the instructions. */
op_hash = str_htab_create ();
- if (op_hash == NULL)
- as_fatal (_("Virtual memory exhausted"));
/* Enable use of ".if ..asm.arch.cris.v32"
and ".if ..asm.arch.cris.common_v10_v32" and a few others. */
int i = 0;
/* Set up a hash table for the instructions. */
- if ((crx_inst_hash = str_htab_create ()) == NULL)
- as_fatal (_("Virtual memory exhausted"));
+ crx_inst_hash = str_htab_create ();
while (crx_instruction[i].mnemonic != NULL)
{
}
/* Initialize reg_hash hash table. */
- if ((reg_hash = str_htab_create ()) == NULL)
- as_fatal (_("Virtual memory exhausted"));
-
+ reg_hash = str_htab_create ();
{
const reg_entry *regtab;
}
/* Initialize copreg_hash hash table. */
- if ((copreg_hash = str_htab_create ()) == NULL)
- as_fatal (_("Virtual memory exhausted"));
-
+ copreg_hash = str_htab_create ();
{
const reg_entry *copregtab;
init_defaults ();
insn_hash = str_htab_create ();
- if (insn_hash == NULL)
- as_fatal (_("Virtual memory exhausted"));
for (i = 0; i < pdp11_num_opcodes; i++)
str_hash_insert (insn_hash, pdp11_opcodes[i].name, pdp11_opcodes + i, 0);
{
const struct s3_reg_entry *r;
- if ((map->htab = str_htab_create ()) == NULL)
- {
- as_fatal (_("virtual memory exhausted"));
- }
+ map->htab = str_htab_create ();
for (r = map->names; r->name != NULL; r++)
- {
- s3_insert_reg (r, map->htab);
- }
+ s3_insert_reg (r, map->htab);
}
/* Iterate over the base tables to create the instruction patterns. */
segT seg;
subsegT subseg;
- if ((s3_score_ops_hsh = str_htab_create ()) == NULL)
- as_fatal (_("virtual memory exhausted"));
+ s3_score_ops_hsh = str_htab_create ();
s3_build_score_ops_hsh ();
- if ((s3_dependency_insn_hsh = str_htab_create ()) == NULL)
- as_fatal (_("virtual memory exhausted"));
+ s3_dependency_insn_hsh = str_htab_create ();
s3_build_dependency_insn_hsh ();
{
const struct s7_reg_entry *r;
- if ((map->htab = str_htab_create ()) == NULL)
- {
- as_fatal (_("virtual memory exhausted"));
- }
+ map->htab = str_htab_create ();
for (r = map->names; r->name != NULL; r++)
- {
- s7_insert_reg (r, map->htab);
- }
+ s7_insert_reg (r, map->htab);
}
\f
segT seg;
subsegT subseg;
- if ((s7_score_ops_hsh = str_htab_create ()) == NULL)
- as_fatal (_("virtual memory exhausted"));
+ s7_score_ops_hsh = str_htab_create ();
s7_build_score_ops_hsh ();
- if ((s7_dependency_insn_hsh = str_htab_create ()) == NULL)
- as_fatal (_("virtual memory exhausted"));
+ s7_dependency_insn_hsh = str_htab_create ();
s7_build_dependency_insn_hsh ();