Port gas/config/* to str_htab.
[deliverable/binutils-gdb.git] / gas / config / tc-d10v.c
index 13f03546a6ee3d53b61548b6db264430ab6d5214..bc87dc637d2739d2e613b3b68be32b6a94b48503 100644 (file)
@@ -101,7 +101,7 @@ struct option md_longopts[] =
 size_t md_longopts_size = sizeof (md_longopts);
 
 /* Opcode hash table.  */
-static struct hash_control *d10v_hash;
+static htab_t d10v_hash;
 
 /* Do a binary search of the d10v_predefined_registers array to see if
    NAME is a valid register name.  Return the register number from the
@@ -277,7 +277,7 @@ md_begin (void)
 {
   const char *prev_name = "";
   struct d10v_opcode *opcode;
-  d10v_hash = hash_new ();
+  d10v_hash = str_htab_create ();
 
   /* Insert unique names into hash table.  The D10v instruction set
      has many identical opcode names that have different opcodes based
@@ -289,7 +289,7 @@ md_begin (void)
       if (strcmp (prev_name, opcode->name))
        {
          prev_name = (char *) opcode->name;
-         hash_insert (d10v_hash, opcode->name, (char *) opcode);
+         str_hash_insert (d10v_hash, opcode->name, (char *) opcode);
        }
     }
 
@@ -1430,7 +1430,7 @@ do_assemble (char *str, struct d10v_opcode **opcode)
     return -1;
 
   /* Find the first opcode with the proper name.  */
-  *opcode = (struct d10v_opcode *) hash_find (d10v_hash, name);
+  *opcode = (struct d10v_opcode *) str_hash_find (d10v_hash, name);
   if (*opcode == NULL)
     return -1;
 
@@ -1558,8 +1558,8 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
        {
          struct d10v_opcode *rep, *repi;
 
-         rep = (struct d10v_opcode *) hash_find (d10v_hash, "rep");
-         repi = (struct d10v_opcode *) hash_find (d10v_hash, "repi");
+         rep = (struct d10v_opcode *) str_hash_find (d10v_hash, "rep");
+         repi = (struct d10v_opcode *) str_hash_find (d10v_hash, "repi");
          if ((insn & FM11) == FM11
              && ((repi != NULL
                   && (insn & repi->mask) == (unsigned) repi->opcode)
This page took 0.038547 seconds and 4 git commands to generate.