static void spu_cons (int);
extern char *myname;
-static struct hash_control *op_hash = NULL;
+static htab_t op_hash = NULL;
/* These bits should be turned off in the first address of every segment */
int md_seg_align = 7;
void
md_begin (void)
{
- const char *retval = NULL;
int i;
/* initialize hash table */
- op_hash = hash_new ();
+ op_hash = str_htab_create ();
/* loop until you see the end of the list */
for (i = 0; i < spu_num_opcodes; i++)
- {
- /* hash each mnemonic and record its position */
-
- retval = hash_insert (op_hash, spu_opcodes[i].mnemonic,
- (void *) &spu_opcodes[i]);
-
- if (retval != NULL && strcmp (retval, "exists") != 0)
- as_fatal (_("Can't hash instruction '%s':%s"),
- spu_opcodes[i].mnemonic, retval);
- }
+ /* hash each mnemonic and record its position */
+ if (str_hash_find (op_hash, spu_opcodes[i].mnemonic) == NULL)
+ str_hash_insert (op_hash, spu_opcodes[i].mnemonic,
+ (void *) &spu_opcodes[i]);
}
\f
const char *md_shortopts = "";
/* try to find the instruction in the hash table */
- if ((format = (struct spu_opcode *) hash_find (op_hash, op)) == NULL)
+ if ((format = (struct spu_opcode *) str_hash_find (op_hash, op)) == NULL)
{
as_bad (_("Invalid mnemonic '%s'"), op);
return;