Port gas/config/* to str_htab.
[deliverable/binutils-gdb.git] / gas / config / tc-msp430.c
index 57538824e9299a0db66d9f38222f55d434cec8f0..92ede74c08ce7e013128bb07cb4e0fe6a0c2798b 100644 (file)
@@ -194,7 +194,7 @@ const char FLT_CHARS[] = "dD";
 /* Handle  long expressions.  */
 extern LITTLENUM_TYPE generic_bignum[];
 
-static struct hash_control *msp430_hash;
+static htab_t msp430_hash;
 
 /* Relaxations.  */
 #define STATE_UNCOND_BRANCH    1       /* jump */
@@ -620,7 +620,7 @@ msp430_profiler (int dummy ATTRIBUTE_UNUSED)
   subseg = now_subseg;
 
   /* Now go to .profiler section.  */
-  obj_elf_change_section (".profiler", SHT_PROGBITS, 0, 0, 0, 0, 0, 0);
+  obj_elf_change_section (".profiler", SHT_PROGBITS, 0, 0, 0, 0, 0);
 
   /* Save flags.  */
   emit_expr (& exp, 2);
@@ -685,8 +685,6 @@ static bfd_boolean warn_interrupt_nops = TRUE;
 #define OPTION_NO_UNKNOWN_INTR_NOPS 'U'
 static bfd_boolean do_unknown_interrupt_nops = TRUE;
 #define OPTION_MCPU 'c'
-#define OPTION_MOVE_DATA 'd'
-static bfd_boolean move_data = FALSE;
 #define OPTION_DATA_REGION 'r'
 static bfd_boolean upper_data_region_in_use = FALSE;
 /* The default is to use the lower region only.  */
@@ -1467,10 +1465,6 @@ md_parse_option (int c, const char * arg)
       do_unknown_interrupt_nops = FALSE;
       return 1;
 
-    case OPTION_MOVE_DATA:
-      move_data = TRUE;
-      return 1;
-
     case OPTION_DATA_REGION:
       if (strcmp (arg, "upper") == 0
          || strcmp (arg, "either") == 0)
@@ -1756,7 +1750,6 @@ struct option md_longopts[] =
   {"my", no_argument, NULL, OPTION_WARN_INTR_NOPS},
   {"mu", no_argument, NULL, OPTION_UNKNOWN_INTR_NOPS},
   {"mU", no_argument, NULL, OPTION_NO_UNKNOWN_INTR_NOPS},
-  {"md", no_argument, NULL, OPTION_MOVE_DATA},
   {"mdata-region", required_argument, NULL, OPTION_DATA_REGION},
   {NULL, no_argument, NULL, 0}
 };
@@ -1794,8 +1787,6 @@ md_show_usage (FILE * stream)
           _("  -mu - for an instruction which changes interrupt state, but where it is not\n"
             "        known how the state is changed, warn/insert NOPs (default)\n"
             "        -mn and/or -my are required for this to have any effect\n"));
-  fprintf (stream,
-          _("  -md - Force copying of data from ROM to RAM at startup\n"));
   fprintf (stream,
           _("  -mdata-region={none|lower|upper|either} - select region data will be\n"
             "    placed in.\n"));
@@ -1834,10 +1825,11 @@ void
 md_begin (void)
 {
   struct msp430_opcode_s * opcode;
-  msp430_hash = hash_new ();
+  msp430_hash = str_htab_create ();
 
   for (opcode = msp430_opcodes; opcode->name; opcode++)
-    hash_insert (msp430_hash, opcode->name, (char *) opcode);
+    if (str_hash_find (msp430_hash, opcode->name) == NULL)
+      str_hash_insert (msp430_hash, opcode->name, (char *) opcode);
 
   bfd_set_arch_mach (stdoutput, TARGET_ARCH,
                     target_is_430x () ? bfd_mach_msp430x : bfd_mach_msp11);
@@ -2871,7 +2863,7 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line)
       char real_name[32];
 
       sprintf (real_name, "%sa", old_name);
-      opcode = hash_find (msp430_hash, real_name);
+      opcode = str_hash_find (msp430_hash, real_name);
       if (opcode == NULL)
        {
          as_bad (_("instruction %s.a does not exist"), old_name);
@@ -4355,7 +4347,7 @@ md_assemble (char * str)
       return;
     }
 
-  opcode = (struct msp430_opcode_s *) hash_find (msp430_hash, cmd);
+  opcode = (struct msp430_opcode_s *) str_hash_find (msp430_hash, cmd);
 
   if (opcode == NULL)
     {
This page took 0.02485 seconds and 4 git commands to generate.