static struct seh_seg_list *
seh_hash_find (char *name)
{
- return (struct seh_seg_list *) str_hash_find (seh_hash, name);
+ return str_hash_find (seh_hash, name);
}
static struct seh_seg_list *
static symbolS *
tag_find (char *name)
{
- return (symbolS *) str_hash_find (tag_hash, name);
+ return str_hash_find (tag_hash, name);
}
static symbolS *
p++;
while (ISALPHA (*p) || ISDIGIT (*p) || *p == '_');
- reg = (reg_entry *) str_hash_find_n (aarch64_reg_hsh, start, p - start);
+ reg = str_hash_find_n (aarch64_reg_hsh, start, p - start);
if (!reg)
return NULL;
static templates *
lookup_mnemonic (const char *start, int len)
{
- templates *templ = NULL;
-
- templ = str_hash_find_n (aarch64_ops_hsh, start, len);
- return templ;
+ return str_hash_find_n (aarch64_ops_hsh, start, len);
}
/* Subroutine of md_assemble, responsible for looking up the primary
}
static void
-checked_hash_insert (htab_t table, const char *key, void *value)
+checked_hash_insert (htab_t table, const char *key, const void *value)
{
str_hash_insert (table, key, value, 0);
}
static void
-sysreg_hash_insert (htab_t table, const char *key, void *value)
+sysreg_hash_insert (htab_t table, const char *key, const void *value)
{
gas_assert (strlen (key) < AARCH64_MAX_SYSREG_NAME_LEN);
checked_hash_insert (table, key, value);
new_templ->next = NULL;
if (!templ)
- checked_hash_insert (aarch64_ops_hsh, opcode->name, (void *) new_templ);
+ checked_hash_insert (aarch64_ops_hsh, opcode->name, new_templ);
else
{
new_templ->next = templ->next;
for (i = 0; aarch64_sys_regs[i].name != NULL; ++i)
sysreg_hash_insert (aarch64_sys_regs_hsh, aarch64_sys_regs[i].name,
- (void *) (aarch64_sys_regs + i));
+ aarch64_sys_regs + i);
for (i = 0; aarch64_pstatefields[i].name != NULL; ++i)
sysreg_hash_insert (aarch64_pstatefield_hsh,
- aarch64_pstatefields[i].name,
- (void *) (aarch64_pstatefields + i));
+ aarch64_pstatefields[i].name,
+ aarch64_pstatefields + i);
for (i = 0; aarch64_sys_regs_ic[i].name != NULL; i++)
sysreg_hash_insert (aarch64_sys_regs_ic_hsh,
- aarch64_sys_regs_ic[i].name,
- (void *) (aarch64_sys_regs_ic + i));
+ aarch64_sys_regs_ic[i].name,
+ aarch64_sys_regs_ic + i);
for (i = 0; aarch64_sys_regs_dc[i].name != NULL; i++)
sysreg_hash_insert (aarch64_sys_regs_dc_hsh,
- aarch64_sys_regs_dc[i].name,
- (void *) (aarch64_sys_regs_dc + i));
+ aarch64_sys_regs_dc[i].name,
+ aarch64_sys_regs_dc + i);
for (i = 0; aarch64_sys_regs_at[i].name != NULL; i++)
sysreg_hash_insert (aarch64_sys_regs_at_hsh,
- aarch64_sys_regs_at[i].name,
- (void *) (aarch64_sys_regs_at + i));
+ aarch64_sys_regs_at[i].name,
+ aarch64_sys_regs_at + i);
for (i = 0; aarch64_sys_regs_tlbi[i].name != NULL; i++)
sysreg_hash_insert (aarch64_sys_regs_tlbi_hsh,
- aarch64_sys_regs_tlbi[i].name,
- (void *) (aarch64_sys_regs_tlbi + i));
+ aarch64_sys_regs_tlbi[i].name,
+ aarch64_sys_regs_tlbi + i);
for (i = 0; aarch64_sys_regs_sr[i].name != NULL; i++)
sysreg_hash_insert (aarch64_sys_regs_sr_hsh,
- aarch64_sys_regs_sr[i].name,
- (void *) (aarch64_sys_regs_sr + i));
+ aarch64_sys_regs_sr[i].name,
+ aarch64_sys_regs_sr + i);
for (i = 0; i < ARRAY_SIZE (reg_names); i++)
checked_hash_insert (aarch64_reg_hsh, reg_names[i].name,
- (void *) (reg_names + i));
+ reg_names + i);
for (i = 0; i < ARRAY_SIZE (nzcv_names); i++)
checked_hash_insert (aarch64_nzcv_hsh, nzcv_names[i].template,
- (void *) (nzcv_names + i));
+ nzcv_names + i);
for (i = 0; aarch64_operand_modifiers[i].name != NULL; i++)
{
const char *name = aarch64_operand_modifiers[i].name;
checked_hash_insert (aarch64_shift_hsh, name,
- (void *) (aarch64_operand_modifiers + i));
+ aarch64_operand_modifiers + i);
/* Also hash the name in the upper case. */
checked_hash_insert (aarch64_shift_hsh, get_upper_str (name),
- (void *) (aarch64_operand_modifiers + i));
+ aarch64_operand_modifiers + i);
}
for (i = 0; i < ARRAY_SIZE (aarch64_conds); i++)
if (name == NULL)
break;
checked_hash_insert (aarch64_cond_hsh, name,
- (void *) (aarch64_conds + i));
+ aarch64_conds + i);
/* Also hash the name in the upper case. */
checked_hash_insert (aarch64_cond_hsh, get_upper_str (name),
- (void *) (aarch64_conds + i));
+ aarch64_conds + i);
}
}
if ((i & 0x3) == 0)
continue;
checked_hash_insert (aarch64_barrier_opt_hsh, name,
- (void *) (aarch64_barrier_options + i));
+ aarch64_barrier_options + i);
/* Also hash the name in the upper case. */
checked_hash_insert (aarch64_barrier_opt_hsh, get_upper_str (name),
- (void *) (aarch64_barrier_options + i));
+ aarch64_barrier_options + i);
}
for (i = 0; i < ARRAY_SIZE (aarch64_barrier_dsb_nxs_options); i++)
{
const char *name = aarch64_barrier_dsb_nxs_options[i].name;
checked_hash_insert (aarch64_barrier_opt_hsh, name,
- (void *) (aarch64_barrier_dsb_nxs_options + i));
+ aarch64_barrier_dsb_nxs_options + i);
/* Also hash the name in the upper case. */
checked_hash_insert (aarch64_barrier_opt_hsh, get_upper_str (name),
- (void *) (aarch64_barrier_dsb_nxs_options + i));
+ aarch64_barrier_dsb_nxs_options + i);
}
for (i = 0; i < ARRAY_SIZE (aarch64_prfops); i++)
if (name == NULL)
continue;
checked_hash_insert (aarch64_pldop_hsh, name,
- (void *) (aarch64_prfops + i));
+ aarch64_prfops + i);
/* Also hash the name in the upper case. */
checked_hash_insert (aarch64_pldop_hsh, get_upper_str (name),
- (void *) (aarch64_prfops + i));
+ aarch64_prfops + i);
}
for (i = 0; aarch64_hint_options[i].name != NULL; i++)
const char* upper_name = get_upper_str(name);
checked_hash_insert (aarch64_hint_opt_hsh, name,
- (void *) (aarch64_hint_options + i));
+ aarch64_hint_options + i);
/* Also hash the name in the upper case if not the same. */
if (strcmp (name, upper_name) != 0)
checked_hash_insert (aarch64_hint_opt_hsh, upper_name,
- (void *) (aarch64_hint_options + i));
+ aarch64_hint_options + i);
}
/* Set the cpu variant based on the command-line options. */
sprintf (buffer, "!%ld", sequence);
- info = (struct alpha_reloc_tag *) str_hash_find (alpha_literal_hash, buffer);
+ info = str_hash_find (alpha_literal_hash, buffer);
if (! info)
{
size_t len = strlen (buffer);
const struct alpha_opcode *opcode;
/* Search opcodes. */
- opcode = (const struct alpha_opcode *) str_hash_find (alpha_opcode_hash,
- opname);
+ opcode = str_hash_find (alpha_opcode_hash, opname);
if (opcode)
{
int cpumatch;
#endif
if (local_macros_on)
{
- macro = (const struct alpha_macro *) str_hash_find (alpha_macro_hash,
- opname);
+ macro = str_hash_find (alpha_macro_hash, opname);
if (macro)
{
found_something = 1;
}
/* Search opcodes. */
- opcode = (const struct alpha_opcode *) str_hash_find (alpha_opcode_hash,
- opname);
+ opcode = str_hash_find (alpha_opcode_hash, opname);
if (opcode)
{
found_something = 1;
p++;
while (ISALPHA (*p) || ISDIGIT (*p) || *p == '_');
- reg = (struct reg_entry *) str_hash_find_n (arm_reg_hsh, start, p - start);
+ reg = str_hash_find_n (arm_reg_hsh, start, p - start);
if (!reg)
return NULL;
if (*q != ')')
return -1;
- if ((r = (struct reloc_entry *)
- str_hash_find_n (arm_reloc_hsh, p, q - p)) == NULL)
+ if ((r = str_hash_find_n (arm_reloc_hsh, p, q - p)) == NULL)
return -1;
*str = q + 1;
struct reg_entry *new_reg;
const char *name;
- if ((new_reg = (struct reg_entry *) str_hash_find (arm_reg_hsh, str)) != 0)
+ if ((new_reg = str_hash_find (arm_reg_hsh, str)) != 0)
{
if (new_reg->builtin)
as_warn (_("ignoring attempt to redefine built-in register '%s'"), str);
if (*oldname == '\0')
return false;
- old = (struct reg_entry *) str_hash_find (arm_reg_hsh, oldname);
+ old = str_hash_find (arm_reg_hsh, oldname);
if (!old)
{
as_warn (_("unknown register '%s' -- .req ignored"), oldname);
as_bad (_("invalid syntax for .unreq directive"));
else
{
- struct reg_entry *reg
- = (struct reg_entry *) str_hash_find (arm_reg_hsh, name);
+ struct reg_entry *reg = str_hash_find (arm_reg_hsh, name);
if (!reg)
as_bad (_("unknown register alias '%s'"), name);
nbuf = strdup (name);
for (p = nbuf; *p; p++)
*p = TOUPPER (*p);
- reg = (struct reg_entry *) str_hash_find (arm_reg_hsh, nbuf);
+ reg = str_hash_find (arm_reg_hsh, nbuf);
if (reg)
{
str_hash_delete (arm_reg_hsh, nbuf);
for (p = nbuf; *p; p++)
*p = TOLOWER (*p);
- reg = (struct reg_entry *) str_hash_find (arm_reg_hsh, nbuf);
+ reg = str_hash_find (arm_reg_hsh, nbuf);
if (reg)
{
str_hash_delete (arm_reg_hsh, nbuf);
return FAIL;
}
- shift_name
- = (const struct asm_shift_name *) str_hash_find_n (arm_shift_hsh, *str,
- p - *str);
+ shift_name = str_hash_find_n (arm_shift_hsh, *str, p - *str);
if (shift_name == NULL)
{
|| strncasecmp (start, "psr", 3) == 0)
p = start + strcspn (start, "rR") + 1;
- psr = (const struct asm_psr *) str_hash_find_n (arm_v7m_psr_hsh, start,
- p - start);
+ psr = str_hash_find_n (arm_v7m_psr_hsh, start, p - start);
if (!psr)
return FAIL;
}
else
{
- psr = (const struct asm_psr *) str_hash_find_n (arm_psr_hsh, start,
- p - start);
+ psr = str_hash_find_n (arm_psr_hsh, start, p - start);
if (!psr)
goto error;
n++;
}
- c = (const struct asm_cond *) str_hash_find_n (arm_cond_hsh, cond, n);
+ c = str_hash_find_n (arm_cond_hsh, cond, n);
if (!c)
{
inst.error = _("condition required");
while (ISALPHA (*q))
q++;
- o = (const struct asm_barrier_opt *) str_hash_find_n (arm_barrier_opt_hsh, p,
- q - p);
+ o = str_hash_find_n (arm_barrier_opt_hsh, p, q - p);
if (!o)
return FAIL;
{
const struct asm_opcode *opcode;
- opcode = (const struct asm_opcode *) str_hash_find (arm_ops_hsh, opname);
+ opcode = str_hash_find (arm_ops_hsh, opname);
if (!opcode)
abort ();
*str = end;
/* Look for unaffixed or special-case affixed mnemonic. */
- opcode = (const struct asm_opcode *) str_hash_find_n (arm_ops_hsh, base,
- end - base);
+ opcode = str_hash_find_n (arm_ops_hsh, base, end - base);
cond = NULL;
if (opcode)
{
if (warn_on_deprecated && unified_syntax)
as_tsktsk (_("conditional infixes are deprecated in unified syntax"));
affix = base + (opcode->tag - OT_odd_infix_0);
- cond = (const struct asm_cond *) str_hash_find_n (arm_cond_hsh, affix, 2);
+ cond = str_hash_find_n (arm_cond_hsh, affix, 2);
gas_assert (cond);
inst.cond = cond->value;
if (end - base < 2)
return NULL;
affix = end - 1;
- cond = (const struct asm_cond *) str_hash_find_n (arm_vcond_hsh, affix, 1);
- opcode = (const struct asm_opcode *) str_hash_find_n (arm_ops_hsh, base,
- affix - base);
+ cond = str_hash_find_n (arm_vcond_hsh, affix, 1);
+ opcode = str_hash_find_n (arm_ops_hsh, base, affix - base);
/* A known edge case is a conflict between an 'e' as a suffix for an
Else of a VPT predication block and an 'ne' suffix for an IT block.
/* Look for suffixed mnemonic. */
affix = end - 2;
- cond = (const struct asm_cond *) str_hash_find_n (arm_cond_hsh, affix, 2);
- opcode = (const struct asm_opcode *) str_hash_find_n (arm_ops_hsh, base,
- affix - base);
+ cond = str_hash_find_n (arm_cond_hsh, affix, 2);
+ opcode = str_hash_find_n (arm_ops_hsh, base, affix - base);
}
if (opcode && cond)
/* Look for infixed mnemonic in the usual position. */
affix = base + 3;
- cond = (const struct asm_cond *) str_hash_find_n (arm_cond_hsh, affix, 2);
+ cond = str_hash_find_n (arm_cond_hsh, affix, 2);
if (!cond)
return NULL;
memcpy (save, affix, 2);
memmove (affix, affix + 2, (end - affix) - 2);
- opcode = (const struct asm_opcode *) str_hash_find_n (arm_ops_hsh, base,
- (end - base) - 2);
+ opcode = str_hash_find_n (arm_ops_hsh, base, (end - base) - 2);
memmove (affix + 2, affix, (end - affix) - 2);
memcpy (affix, save, 2);
str_hash_insert_int (avr_no_sreg_hash, avr_no_sreg[i], 0 /* dummy */, 0);
}
- avr_gccisr_opcode = (struct avr_opcodes_s*) str_hash_find (avr_hash,
- "__gcc_isr");
+ avr_gccisr_opcode = str_hash_find (avr_hash, "__gcc_isr");
gas_assert (avr_gccisr_opcode);
bfd_set_arch_mach (stdoutput, TARGET_ARCH, avr_mcu->mach);
if (!op[0])
as_bad (_("can't find opcode "));
- opcode = (struct avr_opcodes_s *) str_hash_find (avr_hash, op);
+ opcode = str_hash_find (avr_hash, op);
if (opcode && !avr_opt.all_opcodes)
{
{
const int sreg = 0x3f;
unsigned bin = 0;
- const struct avr_opcodes_s *op
- = (struct avr_opcodes_s*) str_hash_find (avr_hash, insn);
+ const struct avr_opcodes_s *op = str_hash_find (avr_hash, insn);
/* We only have to deal with: IN, OUT, PUSH, POP, CLR, LDI 0, MOV R1.
All of these deal with at least one Reg and are 1-word instructions. */
{
const reg_entry *rreg;
- rreg = (const reg_entry *) str_hash_find (reg_hash, reg_name);
+ rreg = str_hash_find (reg_hash, reg_name);
if (rreg != NULL)
return rreg->value.reg_val;
tmp_rp[0] = '(';
strcat (tmp_rp, reg_name);
strcat (tmp_rp,")");
- rreg = (const reg_entry *) str_hash_find (regp_hash, tmp_rp);
+ rreg = str_hash_find (regp_hash, tmp_rp);
}
else
- rreg = (const reg_entry *) str_hash_find (regp_hash, reg_name);
+ rreg = str_hash_find (regp_hash, reg_name);
if (rreg != NULL)
return rreg->value.reg_val;
{
const reg_entry *rreg;
- rreg = (const reg_entry *) str_hash_find (reg_hash, reg_name);
+ rreg = str_hash_find (reg_hash, reg_name);
if ((rreg != NULL)
&& ((rreg->value.reg_val == 12) || (rreg->value.reg_val == 13)))
{
const reg_entry *rreg;
- rreg = (const reg_entry *) str_hash_find (regp_hash, reg_name);
+ rreg = str_hash_find (regp_hash, reg_name);
if (rreg != NULL)
{
{
const reg_entry *prreg;
- prreg = (const reg_entry *) str_hash_find (preg_hash, preg_name);
+ prreg = str_hash_find (preg_hash, preg_name);
if (prreg != NULL)
return prreg->value.preg_val;
{
const reg_entry *prreg;
- prreg = (const reg_entry *) str_hash_find (pregp_hash, preg_name);
+ prreg = str_hash_find (pregp_hash, preg_name);
if (prreg != NULL)
return prreg->value.preg_val;
ins cr16_ins;
/* Find the instruction. */
- instruction = (const inst *) str_hash_find (cr16_inst_hash, op);
+ instruction = str_hash_find (cr16_inst_hash, op);
if (instruction == NULL)
{
as_bad (_("Unknown opcode: `%s'"), op);
{
strcpy (param1, param);
/* Find the instruction. */
- instruction = (const inst *) str_hash_find (cr16_inst_hash, op);
+ instruction = str_hash_find (cr16_inst_hash, op);
parse_operands (&cr16_ins, param1);
if (((&cr16_ins)->arg[0].type == arg_ic)
&& ((&cr16_ins)->arg[0].constant >= 0))
}
/* Find the instruction. */
- instruction = (struct cris_opcode *) str_hash_find (op_hash, insn_text);
+ instruction = str_hash_find (op_hash, insn_text);
if (instruction == NULL)
{
as_bad (_("Unknown opcode: `%s'"), insn_text);
{
const reg_entry *rreg;
- rreg = (const reg_entry *) str_hash_find (reg_hash, reg_name);
+ rreg = str_hash_find (reg_hash, reg_name);
if (rreg != NULL)
return rreg->value.reg_val;
{
const reg_entry *coreg;
- coreg = (const reg_entry *) str_hash_find (copreg_hash, copreg_name);
+ coreg = str_hash_find (copreg_hash, copreg_name);
if (coreg != NULL)
return coreg->value.copreg_val;
*param++ = '\0';
/* Find the instruction. */
- instruction = (const inst *) str_hash_find (crx_inst_hash, op);
+ instruction = str_hash_find (crx_inst_hash, op);
if (instruction == NULL)
{
as_bad (_("Unknown opcode: `%s'"), op);
csky_insn.number = csky_count_operands (opcode_end);
/* Find hash by name in csky_macros_hash and csky_opcodes_hash. */
- csky_insn.macro = (struct csky_macro_info *) str_hash_find (csky_macros_hash,
- macro_name);
- csky_insn.opcode = (struct csky_opcode *) str_hash_find (csky_opcodes_hash,
- name);
+ csky_insn.macro = str_hash_find (csky_macros_hash, macro_name);
+ csky_insn.opcode = str_hash_find (csky_opcodes_hash, name);
if (csky_insn.macro == NULL && csky_insn.opcode == NULL)
return false;
if (val <= 6)
{
const char *name = "movi";
- csky_insn.opcode = (struct csky_opcode *)
- str_hash_find (csky_opcodes_hash, name);
+ csky_insn.opcode = str_hash_find (csky_opcodes_hash, name);
csky_insn.val[csky_insn.idx - 1] = 1 << val;
}
return true;
if (log <= 6)
{
const char *name = "movi";
- csky_insn.opcode = (struct csky_opcode *)
- str_hash_find (csky_opcodes_hash, name);
+ csky_insn.opcode = str_hash_find (csky_opcodes_hash, name);
as_warn (_("translating mgeni to movi"));
}
else
if (mask_val > 0 && mask_val < 8)
{
const char *op_movi = "movi";
- csky_insn.opcode = (struct csky_opcode *)
- str_hash_find (csky_opcodes_hash, op_movi);
+ csky_insn.opcode = str_hash_find (csky_opcodes_hash, op_movi);
if (csky_insn.opcode == NULL)
return false;
csky_insn.val[csky_insn.idx - 1] = (1 << mask_val) - 1;
if (mask_val > 0 && mask_val < 16)
{
const char *op_movi = "movi";
- csky_insn.opcode = (struct csky_opcode *)
- str_hash_find (csky_opcodes_hash, op_movi);
+ csky_insn.opcode = str_hash_find (csky_opcodes_hash, op_movi);
if (csky_insn.opcode == NULL)
return false;
csky_insn.val[csky_insn.idx - 1] = (1 << (mask_val + 1)) - 1;
{
/* Using jsri instruction. */
const char *name = "jsri";
- csky_insn.opcode = (struct csky_opcode *)
- str_hash_find (csky_opcodes_hash, name);
+ csky_insn.opcode = str_hash_find (csky_opcodes_hash, name);
csky_insn.opcode_idx = 0;
csky_insn.isize = 2;
v2_work_rotlc (void)
{
const char *name = "addc";
- csky_insn.opcode
- = (struct csky_opcode *) str_hash_find (csky_opcodes_hash, name);
+ csky_insn.opcode = str_hash_find (csky_opcodes_hash, name);
csky_insn.opcode_idx = 0;
if (csky_insn.isize == 2)
{
name = "movih";
val >>= 16;
}
- csky_insn.opcode
- = (struct csky_opcode *) str_hash_find (csky_opcodes_hash, name);
+ csky_insn.opcode = str_hash_find (csky_opcodes_hash, name);
csky_insn.opcode_idx = 0;
csky_insn.val[1] = val;
v2_work_not (void)
{
const char *name = "nor";
- csky_insn.opcode
- = (struct csky_opcode *) str_hash_find (csky_opcodes_hash, name);
+ csky_insn.opcode = str_hash_find (csky_opcodes_hash, name);
csky_insn.opcode_idx = 0;
if (csky_insn.number == 1)
{
return -1;
/* Find the first opcode with the proper name. */
- *opcode = (struct d10v_opcode *) str_hash_find (d10v_hash, name);
+ *opcode = str_hash_find (d10v_hash, name);
if (*opcode == NULL)
return -1;
{
struct d10v_opcode *rep, *repi;
- rep = (struct d10v_opcode *) str_hash_find (d10v_hash, "rep");
- repi = (struct d10v_opcode *) str_hash_find (d10v_hash, "repi");
+ rep = str_hash_find (d10v_hash, "rep");
+ repi = str_hash_find (d10v_hash, "repi");
if ((insn & FM11) == FM11
&& ((repi != NULL
&& (insn & repi->mask) == (unsigned) repi->opcode)
}
/* Find the first opcode with the proper name. */
- opcode->op = (struct d30v_opcode *) str_hash_find (d30v_hash, name);
+ opcode->op = str_hash_find (d30v_hash, name);
if (opcode->op == NULL)
{
as_bad (_("unknown opcode: %s"), name);
}
/* Hash the opcode, insn will have the string from opcode table. */
- if ((insn = (struct machine_opcode *) str_hash_find (op_hash, str)) == NULL)
+ if ((insn = str_hash_find (op_hash, str)) == NULL)
{
/* Handle the ret and return macro here. */
if ((strcmp (str, "ret") == 0) || (strcmp (str, "return") == 0))
if (nlen == 0)
as_bad (_("can't find opcode "));
- opcode = (ft32_opc_info_t *) str_hash_find (opcode_hash_control, op_start);
+ opcode = str_hash_find (opcode_hash_control, op_start);
*op_end = pend;
if (opcode == NULL)
while (*++slash)
*slash = TOLOWER (*slash);
- instruction = (const struct h8_instruction *)
- str_hash_find (opcode_hash_control, op_start);
+ instruction = str_hash_find (opcode_hash_control, op_start);
if (instruction == NULL)
{
}
/* Look up the opcode in the hash table. */
- if ((insn = (struct pa_opcode *) str_hash_find (op_hash, str)) == NULL)
+ if ((insn = str_hash_find (op_hash, str)) == NULL)
{
as_bad (_("Unknown opcode: `%s'"), str);
return;
and 3 sources. */
for (j = i.operands; j > 0; j--)
copy_operand (j, j - 1);
- i.op[0].regs
- = (const reg_entry *) str_hash_find (reg_hash, "xmm0");
+ i.op[0].regs = str_hash_find (reg_hash, "xmm0");
i.types[0] = regxmm;
i.tm.operand_types[0] = regxmm;
|| ((!i.mem_operands != !intel_syntax)
&& t->operand_types[1].bitfield.baseindex))
op = 1;
- expected_reg
- = (const reg_entry *) str_hash_find (reg_hash,
- di_si[addr_mode][op == es_op]);
+ expected_reg = str_hash_find (reg_hash,
+ di_si[addr_mode][op == es_op]);
}
else
{
*end_op = (char *) s;
- r = (const reg_entry *) str_hash_find (reg_hash, reg_name_given);
+ r = str_hash_find (reg_hash, reg_name_given);
/* Handle floating point regs, allowing spaces in the (i) part. */
if (r == reg_st0)
ch = get_symbol_name (&temp);
mnemonic = temp;
- pdesc = (struct pseudo_opcode *) str_hash_find (md.pseudo_hash, mnemonic);
+ pdesc = str_hash_find (md.pseudo_hash, mnemonic);
if (pdesc)
{
(void) restore_line_pointer (ch);
/* Check if alias has been used before. */
- h = (struct alias *) str_hash_find (ahash, alias);
+ h = str_hash_find (ahash, alias);
if (h)
{
if (strcmp (h->name, name))
}
/* Check if name already has an alias. */
- a = (const char *) str_hash_find (nhash, name);
+ a = str_hash_find (nhash, name);
if (a)
{
if (strcmp (a, alias))
static unsigned int nop_single = 0;
if (!nop_single)
{
- const struct kvxopc *opcode =
- (struct kvxopc *) str_hash_find (env.opcode_hash, "nop");
+ const struct kvxopc *opcode = str_hash_find (env.opcode_hash, "nop");
if (opcode == NULL)
as_fatal
if ((!it->include || (it->include && *it->include))
&& (!it->exclude || (it->exclude && !(*it->exclude)))
&& !(it->pinfo & INSN_DIS_ALIAS))
- str_hash_insert (ase->name_hash_entry, it->name,
- (void *) it, 0);
+ str_hash_insert (ase->name_hash_entry, it->name, it, 0);
}
}
struct m68hc11_opcode *opcode;
char buf[128];
- opc = (struct m68hc11_opcode_def *) str_hash_find (m68hc11_hash, name);
+ opc = str_hash_find (m68hc11_hash, name);
if (opc == NULL)
{
as_bad (_("Instruction `%s' is not recognized."), name);
if (current_architecture == cpuxgate)
{
/* Find the opcode definition given its name. */
- opc = (struct m68hc11_opcode_def *) str_hash_find (m68hc11_hash, name);
+ opc = str_hash_find (m68hc11_hash, name);
if (opc == NULL)
{
as_bad (_("Opcode `%s' is not recognized."), name);
}
/* Find the opcode definition given its name. */
- opc = (struct m68hc11_opcode_def *) str_hash_find (m68hc11_hash, name);
+ opc = str_hash_find (m68hc11_hash, name);
/* If it's not recognized, look for 'jbsr' and 'jbxx'. These are
pseudo insns for relative branch. For these branches, we always
is given. */
if (opc == NULL && name[0] == 'j' && name[1] == 'b')
{
- opc = (struct m68hc11_opcode_def *) str_hash_find (m68hc11_hash,
- &name[1]);
+ opc = str_hash_find (m68hc11_hash, &name[1]);
if (opc
&& (!(opc->format & M6811_OP_JUMP_REL)
|| (opc->format & M6811_OP_BITMASK)))
{
name[nlen++] = TOLOWER (*op_end++);
name[nlen] = 0;
- opc = (struct m68hc11_opcode_def *) str_hash_find (m68hc11_hash,
- name);
+ opc = str_hash_find (m68hc11_hash, name);
}
}
}
c = *p;
*p = '\0';
- opcode = (const struct m68k_incant *) str_hash_find (op_hash, instring);
+ opcode = str_hash_find (op_hash, instring);
*p = c;
if (pdot != NULL)
{
const char *name = m68k_opcode_aliases[i].primary;
const char *alias = m68k_opcode_aliases[i].alias;
- void *val = (void *) str_hash_find (op_hash, name);
+ void *val = str_hash_find (op_hash, name);
if (!val)
as_fatal (_("Internal Error: Can't find %s in hash table"), name);
{
const char *name = mri_aliases[i].primary;
const char *alias = mri_aliases[i].alias;
- void *val = (void *) str_hash_find (op_hash, name);
+ void *val = str_hash_find (op_hash, name);
if (!val)
as_fatal (_("Internal Error: Can't find %s in hash table"), name);
return;
}
- opcode = (mcore_opcode_info *) str_hash_find (opcode_hash_control, name);
+ opcode = str_hash_find (opcode_hash_control, name);
if (opcode == NULL)
{
as_bad (_("unknown opcode \"%s\""), name);
return;
}
- opcode = (struct op_code_struct *) str_hash_find (opcode_hash_control, name);
+ opcode = str_hash_find (opcode_hash_control, name);
if (opcode == NULL)
{
as_bad (_("unknown opcode \"%s\""), name);
count = 32 - reg1;
if (streq (name, "lmi"))
- opcode
- = (struct op_code_struct *) str_hash_find (opcode_hash_control,
- "lwi");
+ opcode = str_hash_find (opcode_hash_control, "lwi");
else
- opcode
- = (struct op_code_struct *) str_hash_find (opcode_hash_control,
- "swi");
+ opcode = str_hash_find (opcode_hash_control, "swi");
if (opcode == NULL)
{
as_bad (_("unknown opcode \"%s\""), "lwi");
if ((temp != 0) && (temp != 0xFFFF8000))
{
/* Needs an immediate inst. */
- opcode1
- = (struct op_code_struct *) str_hash_find (opcode_hash_control,
- "imm");
+ opcode1 = str_hash_find (opcode_hash_control, "imm");
if (opcode1 == NULL)
{
as_bad (_("unknown opcode \"%s\""), "imm");
if ((temp != 0) && (temp != 0xFFFF8000))
{
/* Needs an immediate inst. */
- opcode1
- = (struct op_code_struct *) str_hash_find (opcode_hash_control,
- "imm");
+ opcode1 = str_hash_find (opcode_hash_control, "imm");
if (opcode1 == NULL)
{
as_bad (_("unknown opcode \"%s\""), "imm");
if ((temp != 0) && (temp != 0xFFFF8000))
{
/* Needs an immediate inst. */
- opcode1
- = (struct op_code_struct *) str_hash_find (opcode_hash_control,
- "imm");
+ opcode1 = str_hash_find (opcode_hash_control, "imm");
if (opcode1 == NULL)
{
as_bad (_("unknown opcode \"%s\""), "imm");
if ((temp != 0) && (temp != 0xFFFF8000))
{
/* Needs an immediate inst. */
- opcode1
- = (struct op_code_struct *) str_hash_find (opcode_hash_control,
- "imm");
+ opcode1 = str_hash_find (opcode_hash_control, "imm");
if (opcode1 == NULL)
{
as_bad (_("unknown opcode \"%s\""), "imm");
buf[i + INST_WORD_SIZE] = buf[i];
/* Generate the imm instruction. */
- opcode1
- = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imm");
+ opcode1 = str_hash_find (opcode_hash_control, "imm");
if (opcode1 == NULL)
{
as_bad (_("unknown opcode \"%s\""), "imm");
buf[i + INST_WORD_SIZE] = buf[i];
/* Generate the imm instruction. */
- opcode1
- = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imm");
+ opcode1 = str_hash_find (opcode_hash_control, "imm");
if (opcode1 == NULL)
{
as_bad (_("unknown opcode \"%s\""), "imm");
r[1] = BFD_RELOC_UNUSED;
r[2] = BFD_RELOC_UNUSED;
hash = mips_opts.micromips ? micromips_op_hash : op_hash;
- amo = (struct mips_opcode *) str_hash_find (hash, name);
+ amo = str_hash_find (hash, name);
gas_assert (amo);
gas_assert (strcmp (name, amo->name) == 0);
bfd_reloc_code_real_type r[3]
= {BFD_RELOC_UNUSED, BFD_RELOC_UNUSED, BFD_RELOC_UNUSED};
- mo = (struct mips_opcode *) str_hash_find (mips16_op_hash, name);
+ mo = str_hash_find (mips16_op_hash, name);
gas_assert (mo);
gas_assert (strcmp (name, mo->name) == 0);
name = xstrndup (start, length);
/* Look up the instruction as-is. */
- insn = (struct mips_opcode *) str_hash_find (hash, name);
+ insn = str_hash_find (hash, name);
if (insn)
goto end;
if (*p == 0 && mask != 0)
{
*dot = 0;
- insn = (struct mips_opcode *) str_hash_find (hash, name);
+ insn = str_hash_find (hash, name);
*dot = '.';
if (insn && (insn->pinfo2 & INSN2_VU0_CHANNEL_SUFFIX) != 0)
{
if (suffix)
{
memmove (name + opend - 2, name + opend, length - opend + 1);
- insn = (struct mips_opcode *) str_hash_find (hash, name);
+ insn = str_hash_find (hash, name);
if (insn)
{
forced_insn_length = suffix;
forced_insn_length = l;
*end = 0;
- first = (struct mips_opcode *) str_hash_find (mips16_op_hash, str);
+ first = str_hash_find (mips16_op_hash, str);
*end = c;
if (!first)
*operands++ = '\0';
}
- instruction = (struct mmix_opcode *) str_hash_find (mmix_opcode_hash, str);
+ instruction = str_hash_find (mmix_opcode_hash, str);
if (instruction == NULL)
{
as_bad (_("unknown opcode: `%s'"), str);
*s++ = '\0';
/* Find the first opcode with the proper name. */
- opcode = (struct mn10200_opcode *) str_hash_find (mn10200_hash, str);
+ opcode = str_hash_find (mn10200_hash, str);
if (opcode == NULL)
{
as_bad (_("Unrecognized opcode: `%s'"), str);
*s++ = '\0';
/* Find the first opcode with the proper name. */
- opcode = (struct mn10300_opcode *) str_hash_find (mn10300_hash, str);
+ opcode = str_hash_find (mn10300_hash, str);
if (opcode == NULL)
{
as_bad (_("Unrecognized opcode: `%s'"), str);
if (nlen == 0)
as_bad (_("can't find opcode "));
- opcode = (moxie_opc_info_t *) str_hash_find (opcode_hash_control, op_start);
+ opcode = str_hash_find (opcode_hash_control, op_start);
*op_end = pend;
if (opcode == NULL)
return;
}
- opcode = (struct msp430_opcode_s *) str_hash_find (msp430_hash, cmd);
+ opcode = str_hash_find (msp430_hash, cmd);
if (opcode == NULL)
{
c = *lineptr;
*(char *) lineptr = '\0';
- desc = (struct ns32k_opcode *) str_hash_find (inst_hash_handle, line);
+ desc = str_hash_find (inst_hash_handle, line);
if (!desc)
as_fatal (_("No such opcode"));
c = *p;
*p = '\0';
- op = (struct pdp11_opcode *)str_hash_find (insn_hash, str);
+ op = str_hash_find (insn_hash, str);
*p = c;
if (op == 0)
{
if (nlen == 0)
as_bad (_("can't find opcode "));
- opcode = (pj_opc_info_t *) str_hash_find (opcode_hash_control, op_start);
+ opcode = str_hash_find (opcode_hash_control, op_start);
*op_end = pend;
if (opcode == NULL)
*s++ = '\0';
/* Look up the opcode in the hash table. */
- opcode = (const struct powerpc_opcode *) str_hash_find (ppc_hash, str);
- if (opcode == (const struct powerpc_opcode *) NULL)
+ opcode = str_hash_find (ppc_hash, str);
+ if (opcode == NULL)
{
as_bad (_("unrecognized opcode: `%s'"), str);
ppc_clear_labels ();
/* Opcode hash table. */
static htab_t pru_opcode_hash = NULL;
#define pru_opcode_lookup(NAME) \
- ((struct pru_opcode *) str_hash_find (pru_opcode_hash, (NAME)))
+ (str_hash_find (pru_opcode_hash, (NAME)))
/* Register hash table. */
static htab_t pru_reg_hash = NULL;
#define pru_reg_lookup(NAME) \
- ((struct pru_reg *) str_hash_find (pru_reg_hash, (NAME)))
+ (str_hash_find (pru_reg_hash, (NAME)))
/* The known current alignment of the current section. */
static int pru_current_align;
save_c = *e;
*e = '\0';
- o = (struct opcode_name_t *) str_hash_find (opcode_names_hash, *s);
+ o = str_hash_find (opcode_names_hash, *s);
/* Advance to next token if one was recognized. */
if (o)
bool need_enrty = true;
pre_entry = NULL;
- entry = (struct riscv_csr_extra *) str_hash_find (csr_extra_hash, name);
+ entry = str_hash_find (csr_extra_hash, name);
while (need_enrty && entry != NULL)
{
if (entry->csr_class == class
static unsigned int
reg_csr_lookup_internal (const char *s)
{
- struct riscv_csr_extra *r =
- (struct riscv_csr_extra *) str_hash_find (csr_extra_hash, s);
+ struct riscv_csr_extra *r = str_hash_find (csr_extra_hash, s);
if (r == NULL)
return -1U;
va_start (args, fmt);
r = BFD_RELOC_UNUSED;
- mo = (struct riscv_opcode *) str_hash_find (op_hash, name);
+ mo = str_hash_find (op_hash, name);
gas_assert (mo);
/* Find a non-RVC variant of the instruction. append_insn will compress
break;
}
- insn = (struct riscv_opcode *) str_hash_find (hash, str);
+ insn = str_hash_find (hash, str);
probing_insn_operands = true;
*s++ = '\0';
/* Look up the opcode in the hash table. */
- opcode = (struct s390_opcode *) str_hash_find (s390_opcode_hash, str);
- if (opcode == (const struct s390_opcode *) NULL)
+ opcode = str_hash_find (s390_opcode_hash, str);
+ if (opcode == NULL)
{
as_bad (_("Unrecognized opcode: `%s'"), str);
return;
*s++ = '\0';
/* Look up the opcode in the hash table. */
- opformat = (struct s390_opcode *)
- str_hash_find (s390_opformat_hash, input_line_pointer);
- if (opformat == (const struct s390_opcode *) NULL)
+ opformat = str_hash_find (s390_opformat_hash, input_line_pointer);
+ if (opformat == NULL)
{
as_bad (_("Unrecognized opcode format: `%s'"), input_line_pointer);
return;
c = *p++;
*--p = 0;
- reg = (struct s3_reg_entry *) str_hash_find (htab, start);
+ reg = str_hash_find (htab, start);
*p = c;
if (reg)
const struct s3_insn_to_dependency *tmp;
strcpy (name, insn_name);
- tmp = (const struct s3_insn_to_dependency *)
- str_hash_find (s3_dependency_insn_hsh, name);
+ tmp = str_hash_find (s3_dependency_insn_hsh, name);
if (tmp)
return tmp->type;
c = *p;
*p = '\0';
- opcode = (const struct s3_asm_opcode *) str_hash_find (s3_score_ops_hsh,
- operator);
+ opcode = str_hash_find (s3_score_ops_hsh, operator);
*p = c;
memset (&s3_inst, '\0', sizeof (s3_inst));
c = *p;
*p = '\0';
- opcode = (const struct s3_asm_opcode *) str_hash_find (s3_score_ops_hsh,
- operator);
+ opcode = str_hash_find (s3_score_ops_hsh, operator);
*p = c;
memset (&s3_inst, '\0', sizeof (s3_inst));
c = *p++;
*--p = 0;
- reg = (struct s7_reg_entry *) str_hash_find (htab, start);
+ reg = str_hash_find (htab, start);
*p = c;
if (reg)
const struct s7_insn_to_dependency *tmp;
strcpy (name, insn_name);
- tmp = (const struct s7_insn_to_dependency *)
- str_hash_find (s7_dependency_insn_hsh, name);
+ tmp = str_hash_find (s7_dependency_insn_hsh, name);
if (tmp)
return tmp->type;
c = *p;
*p = '\0';
- opcode = (const struct s7_asm_opcode *) str_hash_find (s7_score_ops_hsh,
- operator);
+ opcode = str_hash_find (s7_score_ops_hsh, operator);
*p = c;
memset (&s7_inst, '\0', sizeof (s7_inst));
if (nlen == 0)
as_bad (_("can't find opcode "));
- return (sh_opcode_info *) str_hash_find (opcode_hash_control, name);
+ return str_hash_find (opcode_hash_control, name);
}
/* Assemble a parallel processing insn. */
{
const struct sparc_opcode *insn;
const char *name = ((sparc_arch_size == 32)
- ? native_op_table[i].name32
- : native_op_table[i].name64);
- insn = (struct sparc_opcode *) str_hash_find (op_hash, name);
+ ? native_op_table[i].name32
+ : native_op_table[i].name64);
+ insn = str_hash_find (op_hash, name);
if (insn == NULL)
{
as_bad (_("Internal error: can't find opcode `%s' for `%s'\n"),
*pinsn = NULL;
return special_case;
}
- insn = (struct sparc_opcode *) str_hash_find (op_hash, str);
+ insn = str_hash_find (op_hash, str);
*pinsn = insn;
if (insn == NULL)
{
/* try to find the instruction in the hash table */
- if ((format = (struct spu_opcode *) str_hash_find (op_hash, op)) == NULL)
+ if ((format = str_hash_find (op_hash, op)) == NULL)
{
as_bad (_("Invalid mnemonic '%s'"), op);
return;
return NULL;
}
- ind_addr_op = (ind_addr_type *) str_hash_find (ind_hash, ind_buffer);
+ ind_addr_op = str_hash_find (ind_hash, ind_buffer);
if (ind_addr_op)
{
debug ("Found indirect reference: %s\n", ind_addr_op->syntax);
}
else
{
- reg *regop = (reg *) str_hash_find (reg_hash, token);
+ reg *regop = str_hash_find (reg_hash, token);
if (regop)
{
/* Find instruction. */
save_char = *current_posn;
*current_posn = '\0';
- p_opcode = (partemplate *) str_hash_find (parop_hash, token);
+ p_opcode = str_hash_find (parop_hash, token);
if (p_opcode)
{
debug ("Found instruction %s\n", p_opcode->name);
debug ("first_opcode = %s\n", first_opcode);
debug ("second_opcode = %s\n", second_opcode);
sprintf (token, "q_%s_%s", second_opcode, first_opcode);
- p_opcode = (partemplate *) str_hash_find (parop_hash, token);
+ p_opcode = str_hash_find (parop_hash, token);
if (p_opcode)
{
/* Find instruction. */
save_char = *current_posn;
*current_posn = '\0';
- op = (insn_template *) str_hash_find (op_hash, token_start);
+ op = str_hash_find (op_hash, token_start);
if (op)
{
debug ("Found instruction %s\n", op->name);
if (insn->in_use)
{
- if ((insn->inst = (struct tic4x_inst *)
- str_hash_find (tic4x_op_hash, insn->name)) == NULL)
+ if ((insn->inst = str_hash_find (tic4x_op_hash, insn->name)) == NULL)
{
as_bad (_("Unknown opcode `%s'."), insn->name);
insn->parallel = 0;
{
char *name;
int c = get_symbol_name (&name);
- struct stag *stag = (struct stag *) str_hash_find (stag_hash, name);
+ struct stag *stag = str_hash_find (stag_hash, name);
if (!stag)
{
static int
subsym_structsz (char *name, char *ignore ATTRIBUTE_UNUSED)
{
- struct stag *stag = (struct stag *) str_hash_find (stag_hash, name);
+ struct stag *stag = str_hash_find (stag_hash, name);
if (stag)
return stag->size;
static int
encode_condition (tic54x_insn *insn, struct opstruct *operand)
{
- tic54x_symbol *cc = (tic54x_symbol *) str_hash_find (cc_hash, operand->buf);
+ tic54x_symbol *cc = str_hash_find (cc_hash, operand->buf);
if (!cc)
{
as_bad (_("Unrecognized condition code \"%s\""), operand->buf);
static int
encode_cc3 (tic54x_insn *insn, struct opstruct *operand)
{
- tic54x_symbol *cc3 = (tic54x_symbol *) str_hash_find (cc3_hash, operand->buf);
+ tic54x_symbol *cc3 = str_hash_find (cc3_hash, operand->buf);
int value = cc3 ? cc3->value : operand->exp.X_add_number << 8;
if ((value & 0x0300) != value)
static int
encode_cc2 (tic54x_insn *insn, struct opstruct *operand)
{
- tic54x_symbol *cc2 = (tic54x_symbol *) str_hash_find (cc2_hash, operand->buf);
+ tic54x_symbol *cc2 = str_hash_find (cc2_hash, operand->buf);
if (!cc2)
{
0, 65535, 0xFFFF);
case OP_SBIT:
{
- tic54x_symbol *sbit = (tic54x_symbol *)
- str_hash_find (sbit_hash, operand->buf);
+ tic54x_symbol *sbit = str_hash_find (sbit_hash, operand->buf);
int value = is_absolute (operand) ?
operand->exp.X_add_number : (sbit ? sbit->value : -1);
int reg = 0;
static int
tic54x_parse_insn (tic54x_insn *insn, char *line)
{
- insn->tm = (insn_template *) str_hash_find (op_hash, insn->mnemonic);
+ insn->tm = str_hash_find (op_hash, insn->mnemonic);
if (!insn->tm)
{
as_bad (_("Unrecognized instruction \"%s\""), insn->mnemonic);
/* SUCCESS! now try some optimizations. */
if (optimize_insn (insn))
{
- insn->tm = (insn_template *) str_hash_find (op_hash,
- insn->mnemonic);
+ insn->tm = str_hash_find (op_hash, insn->mnemonic);
continue;
}
static int
tic54x_parse_parallel_insn_firstline (tic54x_insn *insn, char *line)
{
- insn->tm = (insn_template *) str_hash_find (parop_hash, insn->mnemonic);
+ insn->tm = str_hash_find (parop_hash, insn->mnemonic);
if (!insn->tm)
{
as_bad (_("Unrecognized parallel instruction \"%s\""),
tic54x_symbol *sym;
/* Not sure how to handle predefined symbols. */
- if ((sym = (tic54x_symbol *) str_hash_find (cc_hash, name)) != NULL
- || (sym = (tic54x_symbol *) str_hash_find (cc2_hash, name)) != NULL
- || (sym = (tic54x_symbol *) str_hash_find (cc3_hash, name)) != NULL
+ if ((sym = str_hash_find (cc_hash, name)) != NULL
+ || (sym = str_hash_find (cc2_hash, name)) != NULL
+ || (sym = str_hash_find (cc3_hash, name)) != NULL
|| str_hash_find (misc_symbol_hash, name) != NULL
- || (sym = (tic54x_symbol *) str_hash_find (sbit_hash, name)) != NULL
- || (sym = (tic54x_symbol *) str_hash_find (reg_hash, name)) != NULL
- || (sym = (tic54x_symbol *) str_hash_find (mmreg_hash, name)) != NULL
+ || (sym = str_hash_find (sbit_hash, name)) != NULL
+ || (sym = str_hash_find (reg_hash, name)) != NULL
+ || (sym = str_hash_find (mmreg_hash, name)) != NULL
|| !strcasecmp (name, "a")
|| !strcasecmp (name, "b"))
{
*s++ = '\0';
/* Find the first opcode with the proper name. */
- opcode = (struct v850_opcode *) str_hash_find (v850_hash, str);
+ opcode = str_hash_find (v850_hash, str);
if (opcode == NULL)
{
/* xgettext:c-format */
/* Here with instring pointing to what better be an op-name, and p
pointing to character just past that.
We trust instring points to an op-name, with no whitespace. */
- vwP = (struct vot_wot *) str_hash_find (op_hash, instring);
+ vwP = str_hash_find (op_hash, instring);
/* Restore char after op-code. */
*p = c;
if (vwP == 0)
if (!op[0])
as_bad (_("can't find opcode "));
- opcode = (struct wasm32_opcode_s *) str_hash_find (wasm32_hash, op);
+ opcode = str_hash_find (wasm32_hash, op);
if (opcode == NULL)
{
if (!op_name[0])
as_bad (_("opcode missing or not found on input line"));
- opcode_handle = (struct xgate_opcode_handle *) str_hash_find (xgate_hash,
- op_name);
+ opcode_handle = str_hash_find (xgate_hash, op_name);
if (!opcode_handle)
as_bad (_("opcode %s not found in opcode hash table"), op_name);
else
input_line = macro_inline; /* Rewind. */
p = extract_word (p, op_name, 10);
- opcode_handle
- = (struct xgate_opcode_handle *) str_hash_find (xgate_hash,
- op_name);
+ opcode_handle = str_hash_find (xgate_hash, op_name);
if (!opcode_handle)
{
as_bad (_(": processing macro, real opcode handle"
*op_end = 0; /* Zero-terminate op code string for str_hash_find() call. */
- opcode = (opcode_entry_type *) str_hash_find (opcode_hash_control, op_start);
+ opcode = str_hash_find (opcode_hash_control, op_start);
if (opcode == NULL)
{
if (len >= PAGE_USIZE)
as_fatal (_("string too big (%lu bytes)"), len);
- hash_ptr = (shash_t *) str_hash_find (hash_tbl, str);
- if (hash_ptr == (shash_t *) NULL)
+ hash_ptr = str_hash_find (hash_tbl, str);
+ if (hash_ptr == NULL)
{
if (vp->objects_last_page + len >= PAGE_USIZE)
{
if (cur_file_ptr == (efdr_t *) NULL)
as_fatal (_("no current file pointer"));
- hash_ptr = (shash_t *) str_hash_find (tag_hash, tag);
+ hash_ptr = str_hash_find (tag_hash, tag);
if (hash_ptr != (shash_t *) NULL
&& hash_ptr->tag_ptr != (tag_t *) NULL)
label_ginsn_map_find (const symbolS *label)
{
const char *name = S_GET_NAME (label);
- ginsnS *ginsn
- = (ginsnS *) str_hash_find (frchain_now->frch_ginsn_data->label_ginsn_map,
- name);
+ ginsnS *ginsn = str_hash_find (frchain_now->frch_ginsn_data->label_ginsn_map,
+ name);
return ginsn;
}
hashval_t
hash_string_tuple (const void *e)
{
- string_tuple_t *tuple = (string_tuple_t *) e;
+ const string_tuple_t *tuple = e;
return htab_hash_string (tuple->key);
}
int
eq_string_tuple (const void *a, const void *b)
{
- const string_tuple_t *ea = (const string_tuple_t *) a;
- const string_tuple_t *eb = (const string_tuple_t *) b;
+ const string_tuple_t *ea = a;
+ const string_tuple_t *eb = b;
return strcmp (ea->key, eb->key) == 0;
}